Hey Ezequiel,

On Thu, Jun 28, 2012 at 1:02 AM, Ezequiel Garcia <elezegar...@gmail.com> wrote:
> Hey Peter,
>
> On Wed, Jun 27, 2012 at 7:18 PM, Peter Senna Tschudin
> <peter.se...@gmail.com> wrote:
>> -                       no_signal = stv090x_chk_signal(state);
>> +                       (void) stv090x_chk_signal(state);
>
> Why are you casting return to void? I can't see there is a reason to it.
The idea is to tell the compiler that I know that stv090x_chk_signal()
return a value and I want to ignore it. It is to prevent the compiler
to issue warn_unused_result. I found two ways of doing it. First is
casting the return to void, second is to change the function
definition adding the macro __must_check defined at <linux/compiler.c>
like on:

http://lxr.linux.no/linux+v3.4.4/include/linux/kernel.h#L215

The (void) solution looked simpler to me, but I'll be happy to change
to the __must_check solution if better. What do you think? Keep as is?
Add a comment? Change to __must_check?




>
> Regards,
> Ezequiel.

Regards,

Peter

-- 
Peter Senna Tschudin
peter.se...@gmail.com
gpg id: 48274C36
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to