Re: [PATCH 2/7] ipc: fix trivial warning

From: Felipe Contreras
Date: Mon Oct 19 2009 - 10:50:30 EST


On Mon, Oct 19, 2009 at 5:12 PM, Jiri Kosina <jkosina@xxxxxxx> wrote:
> On Mon, 19 Oct 2009, Felipe Contreras wrote:
>
>> Commit a0d092f introduced the following warning:
>> ipc/msg.c: In function ?msgctl_down?:
>> ipc/msg.c:415: warning: ?msqid64? may be used uninitialized in this function
>>
>> Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
>> ---
>> Âipc/msg.c | Â Â2 +-
>> Â1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/ipc/msg.c b/ipc/msg.c
>> index 2ceab7f..085bd58 100644
>> --- a/ipc/msg.c
>> +++ b/ipc/msg.c
>> @@ -412,7 +412,7 @@ static int msgctl_down(struct ipc_namespace *ns, int msqid, int cmd,
>> Â Â Â Â Â Â Â Â Â Â Âstruct msqid_ds __user *buf, int version)
>> Â{
>> Â Â Â struct kern_ipc_perm *ipcp;
>> - Â Â struct msqid64_ds msqid64;
>> + Â Â struct msqid64_ds uninitialized_var(msqid64);
>> Â Â Â struct msg_queue *msq;
>> Â Â Â int err;
>
> What gcc are you using? I am not getting any warning at least with gcc
> "(SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision
> 135036]"

gcc (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2)

Since I moved to Fedora 11 I get more warnings than other people,
possibly because gcc 4.4.

--
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/