Tue, Mar 28, 2017 at 09:58:57AM CEST, ivec...@redhat.com wrote:
>Dne 28.3.2017 v 08:51 Jiri Pirko napsal(a):
>> Tue, Mar 28, 2017 at 12:48:34AM CEST, da...@davemloft.net wrote:
>> > 
>> > Please fix up these warnings and resubmit:
>> > 
>> > drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c: In function 
>> > ‘mlxsw_sp_rif_counter_free’:
>> > drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:208:2: warning: 
>> > ‘p_counter_index’ may be used uninitialized in this function 
>> > [-Wmaybe-uninitialized]
>> >  mlxsw_sp_rif_counter_edit(mlxsw_sp, rif->rif_index,
>> >  ^
>> > drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c: In function 
>> > ‘mlxsw_sp_table_erif_entries_dump’:
>> > drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c:220:9: warning: 
>> > missing braces around initializer [-Wmissing-braces]
>> >  struct devlink_dpipe_value match_value = {0}, action_value = {0};
>> 
>> I know about this warning. I believe that it is a gcc bug. It happens
>> for gcc 4, but gcc 6 is silent, therefore I choose to ignore this. Do
>> you still want me to fix it?
>> 
>Yes, this is gcc bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119).
>The problem is the first member of struct is union so older gcc assumes
>initializer like '{ { 0 } }' instead of '{ 0 }'.
>
>IMHO it should be better to workaround this bug for older gccs as gcc6 is not
>only supported compiler.

Okay. Thanks!

Reply via email to