Re: Warning fixes for GCC 4.6

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

 



Hi,

On Fri, May 6, 2011 at 5:48 PM, Bastien Nocera <hadess@xxxxxxxxxx> wrote:
>> @@ -250,7 +250,7 @@ static int decode_key(const char *str)
>>  static void send_event(int fd, uint16_t type, uint16_t code, int32_t value)
>>  {
>>       struct uinput_event event;
>> -     int err;
>> +     int __attribute__((__unused__)) err;
>>
>>       memset(&event, 0, sizeof(event));
>>       event.type      = type;
>>
>> Can't we just removed err here, Im afraid using
>> __attribute__((__unused__)) is not a good practice and we should try
>> to avoid using it.
>
> We either get a warning that the return value is unused, or that we
> should be checking the return value. Which one do you prefer?

I guess I would prefer checking the return properly if you don't mind.
Also like Gustavo mentioned, it would be great to have the gdbus
changes in a separate patch so we can apply to other project which
uses it.

-- 
Luiz Augusto von Dentz
Computer Engineer
--
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