OSDN Git Service

Fix void pointer arithmetic in drmProcessPciDevice
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 14 Oct 2015 03:48:52 +0000 (12:48 +0900)
committerMichel Dänzer <michel@daenzer.net>
Wed, 14 Oct 2015 03:48:52 +0000 (12:48 +0900)
commit3045523de214fb7df92ee3c8482e883637504bbe
treebeb8bf512e03400ec598579f90c32281c3f04aed
parent8c4a1cbd98bd8d185d489395f33302a17db643a9
Fix void pointer arithmetic in drmProcessPciDevice

Arithmetic on void pointers is a GCC extension.

  CC       libdrm_la-xf86drm.lo
../xf86drm.c: In function 'drmProcessPciDevice':
../xf86drm.c:3017:10: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
     addr += sizeof(drmDevice);
          ^
../xf86drm.c:3020:10: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
     addr += DRM_NODE_MAX * sizeof(void *);
          ^
../xf86drm.c:3023:14: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
         addr += max_node_str;
              ^
../xf86drm.c:3035:14: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
         addr += sizeof(drmPciBusInfo);
              ^

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
xf86drm.c