On Thu, Jan 21, 2016 at 2:09 PM, Emil Velikov <emil.l.velikov at gmail.com>
wrote:
> On 21 January 2016 at 12:08, Marek Olšák <maraeo at gmail.com> wrote:
>> On Thu, Jan 21, 2016 at 11:51 AM, Emil Velikov <emil.l.velikov at gmail.com>
>> wrote:
>>> On 18 January 2016 at 22:53, Marek Olšák <maraeo at gmail.com> wrote:
>>>> Try explaining that to people who have a compulsion to fix them or
>>>> argue about them. :) Ignore? REALLY? IGNORE???
>>>>
>>> Now that we have a few people off your back can you please point out
>>> where this triggers warnings ?
>>
>> This particular warning is trigged by {}
> As mentioned previously neither {} nor {0} trigger any warning here.
> Jani hinted that you might be using an old (buggy?) compiler which
> generates them.
> Which version of GCC are you using ? Do you mind showing the first few
> warnings ?
>
>> or any { ... } which doesn't
>> initialize all members.
>>
> Do we have any outside of intel_decode.c ? I'm failing to spot any.
amdgpu_bo.c has 7 occurences of "= {}" and they all print the warning.
There are more in libdrm. I have gcc 4.9.2. If I revert this patch, I
get this nice log:
xf86drmMode.c: In function âdrmHandleEventâ:
xf86drmMode.c:891:15: warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing]
e = (struct drm_event *) &buffer[i];
^
abi16.c: In function âabi16_chan_nvc0â:
abi16.c:66:9: warning: missing initializer for field
âfb_ctxdma_handleâ of âstruct drm_nouveau_channel_allocâ
[-Wmissing-field-initializers]
struct drm_nouveau_channel_alloc req = {};
^
In file included from private.h:8:0,
from abi16.c:34:
../include/drm/nouveau_drm.h:31:11: note: âfb_ctxdma_handleâ declared here
uint32_t fb_ctxdma_handle;
^
abi16.c: In function âabi16_chan_nve0â:
abi16.c:87:9: warning: missing initializer for field
âfb_ctxdma_handleâ of âstruct drm_nouveau_channel_allocâ
[-Wmissing-field-initializers]
struct drm_nouveau_channel_alloc req = {};
^
In file included from private.h:8:0,
from abi16.c:34:
../include/drm/nouveau_drm.h:31:11: note: âfb_ctxdma_handleâ declared here
uint32_t fb_ctxdma_handle;
^
abi16.c: In function âabi16_bo_initâ:
abi16.c:316:9: warning: missing initializer for field âinfoâ of
âstruct drm_nouveau_gem_newâ [-Wmissing-field-initializers]
struct drm_nouveau_gem_new req = {};
^
In file included from private.h:8:0,
from abi16.c:34:
../include/drm/nouveau_drm.h:118:30: note: âinfoâ declared here
struct drm_nouveau_gem_info info;
^
nouveau.c: In function ânouveau_object_finiâ:
nouveau.c:222:2: warning: missing initializer for field âpad02â of
âstruct nvif_ioctl_v0â [-Wmissing-field-initializers]
};
^
In file included from nouveau.c:50:0:
nvif/ioctl.h:22:7: note: âpad02â declared here
__u8 pad02[4];
^
nouveau.c: In function ânouveau_device_newâ:
nouveau.c:371:9: warning: missing initializer for field âversionâ of
âstruct nv_device_info_v0â [-Wmissing-field-initializers]
struct nv_device_info_v0 info = {};
^
In file included from nouveau.c:49:0:
nvif/cl0080.h:14:7: note: âversionâ declared here
__u8 version;
^
pushbuf.c: In function ânouveau_pushbuf_newâ:
pushbuf.c:544:9: warning: missing initializer for field âchannelâ of
âstruct drm_nouveau_gem_pushbufâ [-Wmissing-field-initializers]
struct drm_nouveau_gem_pushbuf req = {};
^
In file included from pushbuf.c:40:0:
../include/drm/nouveau_drm.h:162:11: note: âchannelâ declared here
uint32_t channel;
^
radeon_bo_gem.c: In function âbo_get_tilingâ:
radeon_bo_gem.c:255:12: warning: missing initializer for field
âhandleâ of âstruct drm_radeon_gem_set_tilingâ
[-Wmissing-field-initializers]
struct drm_radeon_gem_set_tiling args = {};
^
In file included from radeon_bo_gem.c:44:0:
../include/drm/radeon_drm.h:829:11: note: âhandleâ declared here
uint32_t handle;
^
radeon_cs_gem.c: In function âradeon_get_device_idâ:
radeon_cs_gem.c:531:12: warning: missing initializer for field
ârequestâ of âstruct drm_radeon_infoâ [-Wmissing-field-initializers]
struct drm_radeon_info info = {};
^
In file included from radeon_cs.h:38:0,
from radeon_cs_gem.c:41:
../include/drm/radeon_drm.h:1014:11: note: ârequestâ declared here
uint32_t request;
^
radeon_surface.c: In function âradeon_get_valueâ:
radeon_surface.c:121:12: warning: missing initializer for field
ârequestâ of âstruct drm_radeon_infoâ [-Wmissing-field-initializers]
struct drm_radeon_info info = {};
^
In file included from radeon_surface.c:42:0:
../include/drm/radeon_drm.h:1014:11: note: ârequestâ declared here
uint32_t request;
^
amdgpu_bo.c: In function âamdgpu_close_kms_handleâ:
amdgpu_bo.c:50:9: warning: missing initializer for field âhandleâ of
âstruct drm_gem_closeâ [-Wmissing-field-initializers]
struct drm_gem_close args = {};
^
In file included from ../xf86drm.h:40:0,
from amdgpu_bo.c:41:
../include/drm/drm.h:590:8: note: âhandleâ declared here
__u32 handle;
^
amdgpu_bo.c: In function âamdgpu_bo_set_metadataâ:
amdgpu_bo.c:127:9: warning: missing initializer for field âhandleâ of
âstruct drm_amdgpu_gem_metadataâ [-Wmissing-field-initializers]
struct drm_amdgpu_gem_metadata args = {};
^
In file included from amdgpu_bo.c:42:0:
../include/drm/amdgpu_drm.h:231:11: note: âhandleâ declared here
uint32_t handle;
^
amdgpu_bo.c: In function âamdgpu_bo_query_infoâ:
amdgpu_bo.c:150:9: warning: missing initializer for field âhandleâ of
âstruct drm_amdgpu_gem_metadataâ [-Wmissing-field-initializers]
struct drm_amdgpu_gem_metadata metadata = {};
^
In file included from amdgpu_bo.c:42:0:
../include/drm/amdgpu_drm.h:231:11: note: âhandleâ declared here
uint32_t handle;
^
amdgpu_bo.c:151:9: warning: missing initializer for field âbo_sizeâ of
âstruct drm_amdgpu_gem_create_inâ [-Wmissing-field-initializers]
struct drm_amdgpu_gem_create_in bo_info = {};
^
In file included from amdgpu_bo.c:42:0:
../include/drm/amdgpu_drm.h:81:11: note: âbo_sizeâ declared here
uint64_t bo_size;
^
amdgpu_bo.c:152:9: warning: missing initializer for field âhandleâ of
âstruct drm_amdgpu_gem_opâ [-Wmissing-field-initializers]
struct drm_amdgpu_gem_op gem_op = {};
^
In file included from amdgpu_bo.c:42:0:
../include/drm/amdgpu_drm.h:334:11: note: âhandleâ declared here
uint32_t handle;
^
amdgpu_bo.c: In function âamdgpu_bo_export_flinkâ:
amdgpu_bo.c:240:10: warning: missing initializer for field âhandleâ of
âstruct drm_gem_closeâ [-Wmissing-field-initializers]
struct drm_gem_close args = {};
^
In file included from ../xf86drm.h:40:0,
from amdgpu_bo.c:41:
../include/drm/drm.h:590:8: note: âhandleâ declared here
__u32 handle;
^
amdgpu_bo.c: In function âamdgpu_bo_importâ:
amdgpu_bo.c:287:9: warning: missing initializer for field ânameâ of
âstruct drm_gem_openâ [-Wmissing-field-initializers]
struct drm_gem_open open_arg = {};
^
In file included from ../xf86drm.h:40:0,
from amdgpu_bo.c:41:
../include/drm/drm.h:606:8: note: ânameâ declared here
__u32 name;
^
amdgpu_gpu_info.c: In function âamdgpu_query_heap_infoâ:
amdgpu_gpu_info.c:240:9: warning: missing initializer for field
âvram_sizeâ of âstruct drm_amdgpu_info_vram_gttâ
[-Wmissing-field-initializers]
struct drm_amdgpu_info_vram_gtt vram_gtt_info = {};
^
In file included from amdgpu_gpu_info.c:33:0:
../include/drm/amdgpu_drm.h:586:11: note: âvram_sizeâ declared here
uint64_t vram_size;
^
amdgpu_gpu_info.c: In function âamdgpu_query_gds_infoâ:
amdgpu_gpu_info.c:290:9: warning: missing initializer for field
âgds_gfx_partition_sizeâ of âstruct drm_amdgpu_info_gdsâ
[-Wmissing-field-initializers]
struct drm_amdgpu_info_gds gds_config = {};
^
In file included from amdgpu_gpu_info.c:33:0:
../include/drm/amdgpu_drm.h:569:11: note: âgds_gfx_partition_sizeâ declared
here
uint32_t gds_gfx_partition_size;
^
amdgpu_device.c: In function âamdgpu_get_authâ:
amdgpu_device.c:118:2: warning: missing initializer for field âidxâ of
âdrm_client_tâ [-Wmissing-field-initializers]
drm_client_t client = {};
^
In file included from ../xf86drm.h:40:0,
from amdgpu_device.c:42:
../include/drm/drm.h:227:6: note: âidxâ declared here
int idx; /**< Which client desired? */
^
kms-universal-planes.c: In function âmainâ:
kms-universal-planes.c:212:22: warning: declaration of âplaneâ shadows
a previous local [-Wshadow]
struct kms_plane *plane = device->planes[i];
^
kms-universal-planes.c:137:20: warning: shadowed declaration is here [-Wshadow]
struct kms_plane *plane;
^
modetest.c: In function âget_resourcesâ:
modetest.c:559:3: warning: ignoring return value of âasprintfâ,
declared with attribute warn_unused_result [-Wunused-result]
asprintf(&connector->name, "%s-%u",
^
basic_tests.c: In function âamdgpu_userptr_testâ:
basic_tests.c:1028:2: warning: ignoring return value of
âposix_memalignâ, declared with attribute warn_unused_result
[-Wunused-result]
posix_memalign(&ptr, sysconf(_SC_PAGE_SIZE), BUFFER_SIZE);
^
Marek