Fix type-limits, pointer-arith and sign-compare warnings
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>main
parent
f11b8c955c
commit
65041c4a19
|
@ -189,9 +189,9 @@ static void printhuman(unsigned long value, const char *name, int mult)
|
||||||
static void getstats(int fd, int i)
|
static void getstats(int fd, int i)
|
||||||
{
|
{
|
||||||
drmStatsT prev, curr;
|
drmStatsT prev, curr;
|
||||||
int j;
|
unsigned j;
|
||||||
double rate;
|
double rate;
|
||||||
|
|
||||||
printf(" System statistics:\n");
|
printf(" System statistics:\n");
|
||||||
|
|
||||||
if (drmGetStats(fd, &prev)) return;
|
if (drmGetStats(fd, &prev)) return;
|
||||||
|
|
|
@ -45,8 +45,6 @@ int main(int argc, char **argv)
|
||||||
ret = ioctl(fd, DRM_IOCTL_GET_STATS, &stats);
|
ret = ioctl(fd, DRM_IOCTL_GET_STATS, &stats);
|
||||||
assert(ret == 0);
|
assert(ret == 0);
|
||||||
|
|
||||||
assert(stats.count >= 0);
|
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ static inline int DRM_IOCTL(int fd, unsigned long cmd, void *arg)
|
||||||
* Util functions
|
* Util functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void* drmAllocCpy(void *array, int count, int entry_size)
|
static void* drmAllocCpy(char *array, int count, int entry_size)
|
||||||
{
|
{
|
||||||
char *r;
|
char *r;
|
||||||
int i;
|
int i;
|
||||||
|
|
Loading…
Reference in New Issue