lkml.org 
[lkml]   [2009]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/7] ipc: fix trivial warning
    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@gmail.com>
    > ---
    > 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]"

    $ make ipc/msg.o
    CHK include/linux/version.h
    CHK include/linux/utsrelease.h
    SYMLINK include/asm -> include/asm-x86
    CALL scripts/checksyscalls.sh
    CC ipc/msg.o
    $

    --
    Jiri Kosina
    SUSE Labs, Novell Inc.


    \
     
     \ /
      Last update: 2009-10-19 16:15    [W:0.034 / U:216.500 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site