Re: [PATCH] [V2] stv090x: variable 'no_signal' set but not used
Hey Ezequiel,
On Thu, Jun 28, 2012 at 1:02 AM, Ezequiel Garcia <elezegarcia@xxxxxxxxx> wrote:
> Hey Peter,
>
> On Wed, Jun 27, 2012 at 7:18 PM, Peter Senna Tschudin
> <peter.senna@xxxxxxxxx> 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.senna@xxxxxxxxx
gpg id: 48274C36
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Input]
[Video for Linux]
[Mplayer Users]
[Linux USB Devel]
[Linux Audio Users]
[Photos]
[Yosemite Photos]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Yosemite Backpacking]