Re: [PATCHv3 01/15] android: Supress missing initializers warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 9, 2013 at 4:11 PM, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote:
> Hi Andrei,
>
>> These types of warnings are disabled in BlueZ makeifiles
>>
>> main.c:67:2: warning: missing initializer [-Wmissing-field-initializers]
>> main.c:67:2: warning: (near initialization for 'options[1].short_name')
>>       [-Wmissing-field-initializers]
>> ---
>> android/Android.mk |    3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/android/Android.mk b/android/Android.mk
>> index ec820ac..5498b41 100644
>> --- a/android/Android.mk
>> +++ b/android/Android.mk
>> @@ -23,6 +23,9 @@ LOCAL_C_INCLUDES := \
>>
>> LOCAL_CFLAGS := -DVERSION=\"$(BLUEZ_VERSION)\"
>>
>> +# to suppress the "warning: missing initializer near initialization.." warning
>> +LOCAL_CFLAGS += -Wno-missing-field-initializers
>> +
>
> why are we doing this and not fixing the actual warning?

I guess because this is a stupid warning.

We do the same in autotools because otherwise we can't initialize
structs and rely on compiler setting the rest to 0. This is
particularly annoying on d-bus tables (see the exists and flags on the
end of the GDBusPropertyTable struct). I'm sure it's annoying in other
places, too.


Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux