[Retrying with Glenn's new address... sorry for the mistake...]

---------- Forwarded message ----------
From: Roland Mainz <[email protected]>
Date: Sat, Oct 26, 2013 at 11:13 PM
Subject: (Maybe) uninitalised variable warnings from Pathscale
"pathcc" compiler...
To: "[email protected]" <[email protected]>
Cc: Glenn Fowler <[email protected]>, David Korn <[email protected]>


Hi!

----

Below are the warnings the Pathscale "pathcc" compiler reports when
building ast-ksh.2013-10-10 with optimiser enabled on SuSE
12.3/AMD64/64bit.

Please please *check* these warnings (and/or send feedback to the
list) since some of them are very likely real bugs and/or trigger
valgrind issue reports when running ksh93:
-- snip --
+ cc -D_BLD_DLL -fPIC -D_BLD_ast '-DSHOPT_CMDLIB_BLTIN=0'
'-DSH_CMDLIB_DIR="/usr/ast/bin"'
'-DSHOPT_CMDLIB_HDR="tmp_gnulinux_builtin_header.h"' -DSHOPT_SYSRC
'-D_map_libc=1' -O2 -fstrict-aliasing -Wstrict-aliasing
-Wsequence-point -Wno-parentheses -Wno-unused -Wno-trigraphs
-Wuninitialized -Waddress -I. -Isrc/lib/libast -Icomp
-Isrc/lib/libast/comp -Iport -Isrc/lib/libast/port -Isfio
-Isrc/lib/libast/sfio -Iinclude -Isrc/lib/libast/include -Istd
-Isrc/lib/libast/std -Iarch/linux.i386-64/include -D_PACKAGE_ast -c
src/lib/libast/sfio/sfputwc.c
src/lib/libast/sfio/sfputwc.c:98:5: warning: variable 's' is used
uninitialized whenever '||' condition is true
[-Wsometimes-uninitialized]
        if(n > 8 || SFWPEEK(f,s,m) < n)
           ^~~~~
src/lib/libast/sfio/sfputwc.c:99:26: note: uninitialized use occurs here
                n = SFWRITE(f,(Void_t*)s,n); /* write the hard way */
                    ~~~~~~~~~~~~~~~~~~~^~~~
src/lib/libast/sfio/sfhdr.h:929:47: note: expanded from macro 'SFWRITE'
#define SFWRITE(f,s,n)  (SETLOCAL(f),sfwrite(f,s,n))
                                               ^
src/lib/libast/sfio/sfputwc.c:98:5: note: remove the '||' if its
condition is always false
        if(n > 8 || SFWPEEK(f,s,m) < n)
           ^~~~~~~~
src/lib/libast/sfio/sfputwc.c:84:14: note: initialize the variable 's'
to silence this warning
        reg uchar       *s;
                          ^
                           = NULL
1 warning generated.




+ cc -D_BLD_DLL -fPIC '-DSHOPT_CMDLIB_BLTIN=0'
'-DSH_CMDLIB_DIR="/usr/ast/bin"'
'-DSHOPT_CMDLIB_HDR="tmp_gnulinux_builtin_header.h"' -DSHOPT_SYSRC
'-D_map_libc=1' -O2 -fstrict-aliasing -Wstrict-aliasing
-Wsequence-point -Wno-parentheses -Wno-unused -Wno-trigraphs
-Wuninitialized -Waddress -I. -Isrc/lib/libcmd
-Iarch/linux.i386-64/include/ast '-DERROR_CATALOG="libcmd"'
-D_PACKAGE_ast -D_BLD_cmd '-DUSAGE_LICENSE="[-author?Glenn Fowler
<[email protected]>][-author?David Korn
<[email protected]>][-copyright?Copyright (c) 1992-2013 AT&T
Intellectual 
Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]";'
-c src/lib/libcmd/cmp.c
src/lib/libcmd/cmp.c:313:6: warning: variable 'file1' is used
uninitialized whenever '||' condition is true
[-Wsometimes-uninitialized]
        if (error_info.errors || !(file1 = *argv++) || !(file2 = *argv++))
            ^~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/lib/libcmd/cmp.c:316:12: note: uninitialized use occurs here
        if (streq(file1, "-"))
            ~~~~~~^~~~~~~~~~~
arch/linux.i386-64/include/ast/ast.h:245:23: note: expanded from macro 'streq'
#define streq(a,b)      (*(a)==*(b)&&!strcmp(a,b))
                           ^
src/lib/libcmd/cmp.c:313:6: note: remove the '||' if its condition is
always false
        if (error_info.errors || !(file1 = *argv++) || !(file2 = *argv++))
            ^~~~~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/lib/libcmd/cmp.c:252:14: note: initialize the variable 'file1' to
silence this warning
        char*           file1;
                             ^
                              = NULL
1 warning generated.




+ cc -D_BLD_DLL -fPIC '-DSHOPT_CMDLIB_BLTIN=0'
'-DSH_CMDLIB_DIR="/usr/ast/bin"'
'-DSHOPT_CMDLIB_HDR="tmp_gnulinux_builtin_header.h"' -DSHOPT_SYSRC
'-D_map_libc=1' -O2 -fstrict-aliasing -Wstrict-aliasing
-Wsequence-point -Wno-parentheses -Wno-unused -Wno-trigraphs
-Wuninitialized -Waddress -I. -Isrc/lib/libcmd
-Iarch/linux.i386-64/include/ast '-DERROR_CATALOG="libcmd"'
-D_PACKAGE_ast -D_BLD_cmd '-DUSAGE_LICENSE="[-author?Glenn Fowler
<[email protected]>][-author?Doug McIlroy
<[email protected]>][-copyright?Copyright (c) 1995-2013 AT&T
Intellectual 
Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]";'
-c src/lib/libcmd/grep.c
src/lib/libcmd/grep.c:326:6: warning: variable 'file' is used
uninitialized whenever 'if' condition is true
[-Wsometimes-uninitialized]
        if (!(state->tmp = sfstropen()))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/libcmd/grep.c:417:20: note: uninitialized use occurs here
        error_info.file = file;
                          ^~~~
src/lib/libcmd/grep.c:326:2: note: remove the 'if' if its condition is
always false
        if (!(state->tmp = sfstropen()))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/libcmd/grep.c:321:12: note: initialize the variable 'file' to
silence this warning
        char*   file;
                    ^
                     = NULL
src/lib/libcmd/grep.c:326:6: warning: variable 'f' is used
uninitialized whenever 'if' condition is true
[-Wsometimes-uninitialized]
        if (!(state->tmp = sfstropen()))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/libcmd/grep.c:419:6: note: uninitialized use occurs here
        if (f)
            ^
src/lib/libcmd/grep.c:326:2: note: remove the 'if' if its condition is
always false
        if (!(state->tmp = sfstropen()))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/libcmd/grep.c:323:11: note: initialize the variable 'f' to
silence this warning
        Sfio_t* f;
                 ^
                  = NULL
src/lib/libcmd/grep.c:326:6: warning: variable 'line' is used
uninitialized whenever 'if' condition is true
[-Wsometimes-uninitialized]
        if (!(state->tmp = sfstropen()))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/libcmd/grep.c:418:20: note: uninitialized use occurs here
        error_info.line = line;
                          ^~~~
src/lib/libcmd/grep.c:326:2: note: remove the 'if' if its condition is
always false
        if (!(state->tmp = sfstropen()))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/libcmd/grep.c:315:10: note: initialize the variable 'line' to
silence this warning
        int     line;
                    ^
                     = 0
3 warnings generated.




+ cc '-DSHOPT_CMDLIB_BLTIN=0' '-DSH_CMDLIB_DIR="/usr/ast/bin"'
'-DSHOPT_CMDLIB_HDR="tmp_gnulinux_builtin_header.h"' -DSHOPT_SYSRC
'-D_map_libc=1' -O2 -fstrict-aliasing -Wstrict-aliasing
-Wsequence-point -Wno-parentheses -Wno-unused -Wno-trigraphs
-Wuninitialized -Waddress -I. -Isrc/cmd/ksh93 -Iinclude
-Isrc/cmd/ksh93/include -Iarch/linux.i386-64/include/ast
'-D_API_ast=20130625' '-DERROR_CONTEXT_T=Error_context_t'
-D_PACKAGE_ast -DSHOPT_POLL -D_BLD_shell -DSHOPT_DYNAMIC
-DSHOPT_MULTIBYTE -DSHOPT_PFSH -DSHOPT_STATS -DSHOPT_NAMESPACE
-DSHOPT_COSHELL -DSHOPT_FIXEDARRAY -c src/cmd/ksh93/bltins/sleep.c
src/cmd/ksh93/bltins/sleep.c:89:12: warning: variable 'ns' is used
uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
                        else if(*last!='.' && *last!=',')
                                ^~~~~~~~~~~~~~~~~~~~~~~~
src/cmd/ksh93/bltins/sleep.c:115:8: note: uninitialized use occurs here
                        d = ns - now;
                            ^~
src/cmd/ksh93/bltins/sleep.c:89:9: note: remove the 'if' if its
condition is always true
                        else if(*last!='.' && *last!=',')
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/cmd/ksh93/bltins/sleep.c:89:12: warning: variable 'ns' is used
uninitialized whenever '&&' condition is false
[-Wsometimes-uninitialized]
                        else if(*last!='.' && *last!=',')
                                ^~~~~~~~~~
src/cmd/ksh93/bltins/sleep.c:115:8: note: uninitialized use occurs here
                        d = ns - now;
                            ^~
src/cmd/ksh93/bltins/sleep.c:89:12: note: remove the '&&' if its
condition is always true
                        else if(*last!='.' && *last!=',')
                                ^~~~~~~~~~~~~
src/cmd/ksh93/bltins/sleep.c:86:8: warning: variable 'ns' is used
uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
                                if(*last==0)
                                   ^~~~~~~~
src/cmd/ksh93/bltins/sleep.c:115:8: note: uninitialized use occurs here
                        d = ns - now;
                            ^~
src/cmd/ksh93/bltins/sleep.c:86:5: note: remove the 'if' if its
condition is always true
                                if(*last==0)
                                ^~~~~~~~~~~~
src/cmd/ksh93/bltins/sleep.c:75:17: note: initialize the variable 'ns'
to silence this warning
                        Time_t now,ns;
                                     ^
                                      = 0
3 warnings generated.




+ cc '-DSHOPT_CMDLIB_BLTIN=0' '-DSH_CMDLIB_DIR="/usr/ast/bin"'
'-DSHOPT_CMDLIB_HDR="tmp_gnulinux_builtin_header.h"' -DSHOPT_SYSRC
'-D_map_libc=1' -O2 -fstrict-aliasing -Wstrict-aliasing
-Wsequence-point -Wno-parentheses -Wno-unused -Wno-trigraphs
-Wuninitialized -Waddress -I. -Isrc/cmd/ksh93 -Iinclude
-Isrc/cmd/ksh93/include -Iarch/linux.i386-64/include/ast
-DSHOPT_OPTIMIZE -DSHOPT_RAWONLY -DSHOPT_PFSH -D_BLD_shell -DKSHELL
'-D_API_ast=20130625' -D_PACKAGE_ast
'-DERROR_CONTEXT_T=Error_context_t' -DSHOPT_KIA -DSHOPT_MULTIBYTE
-DSHOPT_COSHELL -DSHOPT_EDPREDICT -DSHOPT_POLL -DSHOPT_DYNAMIC
-DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_NAMESPACE
-DSHOPT_FIXEDARRAY -c src/cmd/ksh93/sh/args.c
src/cmd/ksh93/sh/args.c:943:6: warning: variable 'argp' is used
uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
                if(ac)
                   ^~
src/cmd/ksh93/sh/args.c:976:7: note: uninitialized use occurs here
                if(!argp)
                    ^~~~
src/cmd/ksh93/sh/args.c:943:3: note: remove the 'if' if its condition
is always true
                if(ac)
                ^~~~~~
src/cmd/ksh93/sh/args.c:922:30: note: initialize the variable 'argp'
to silence this warning
        register struct argnod  *argp;
                                     ^
                                      = NULL
1 warning generated.




+ cc '-DSHOPT_CMDLIB_BLTIN=0' '-DSH_CMDLIB_DIR="/usr/ast/bin"'
'-DSHOPT_CMDLIB_HDR="tmp_gnulinux_builtin_header.h"' -DSHOPT_SYSRC
'-D_map_libc=1' -O2 -fstrict-aliasing -Wstrict-aliasing
-Wsequence-point -Wno-parentheses -Wno-unused -Wno-trigraphs
-Wuninitialized -Waddress -I. -Isrc/cmd/ksh93 -Iinclude
-Isrc/cmd/ksh93/include -Iarch/linux.i386-64/include/ast
-DSHOPT_BRACEPAT -DKSHELL -DSHOPT_COSHELL -DSHOPT_OPTIMIZE
-DSHOPT_FIXEDARRAY -DSHOPT_FILESCAN '-D_API_ast=20130625'
'-DERROR_CONTEXT_T=Error_context_t' -D_PACKAGE_ast -DSHOPT_MULTIBYTE
-DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_PFSH -D_BLD_shell
-DSHOPT_SUID_EXEC -DSHOPT_KIA -DSHOPT_DYNAMIC -c
src/cmd/ksh93/sh/macro.c
src/cmd/ksh93/sh/macro.c:2146:7: warning: variable 'r' is used
uninitialized whenever '&&' condition is false
[-Wsometimes-uninitialized]
                        if((ip=t->tre.treio) &&
                           ^~~~~~~~~~~~~~~~~~~~
src/cmd/ksh93/sh/macro.c:2153:7: note: uninitialized use occurs here
                        if(r==0 && ip && (ip->iofile&IOLSEEK))
                           ^
src/cmd/ksh93/sh/macro.c:2146:7: note: remove the '&&' if its
condition is always true
                        if((ip=t->tre.treio) &&
                           ^~~~~~~~~~~~~~~~~~~~~
src/cmd/ksh93/sh/macro.c:2146:7: warning: variable 'r' is used
uninitialized whenever '&&' condition is false
[-Wsometimes-uninitialized]
                        if((ip=t->tre.treio) &&
                           ^~~~~~~~~~~~~~~~~
src/cmd/ksh93/sh/macro.c:2153:7: note: uninitialized use occurs here
                        if(r==0 && ip && (ip->iofile&IOLSEEK))
                           ^
src/cmd/ksh93/sh/macro.c:2146:7: note: remove the '&&' if its
condition is always true
                        if((ip=t->tre.treio) &&
                           ^~~~~~~~~~~~~~~~~~~~
src/cmd/ksh93/sh/macro.c:2142:9: note: initialize the variable 'r' to
silence this warning
                        int r;
                             ^
                              = 0
2 warnings generated.




+ cc '-DSHOPT_CMDLIB_BLTIN=0' '-DSH_CMDLIB_DIR="/usr/ast/bin"'
'-DSHOPT_CMDLIB_HDR="tmp_gnulinux_builtin_header.h"' -DSHOPT_SYSRC
'-D_map_libc=1' -O2 -fstrict-aliasing -Wstrict-aliasing
-Wsequence-point -Wno-parentheses -Wno-unused -Wno-trigraphs
-Wuninitialized -Waddress -I. -Isrc/cmd/ksh93 -Iinclude
-Isrc/cmd/ksh93/include -Iarch/linux.i386-64/include/ast
-DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT
-D_BLD_shell -DSHOPT_STATS -DSHOPT_PFSH '-D_API_ast=20130625'
-D_PACKAGE_ast '-DERROR_CONTEXT_T=Error_context_t' -DSHOPT_FIXEDARRAY
-DSHOPT_MULTIBYTE -DSHOPT_KIA -DSHOPT_DYNAMIC -DSHOPT_POLL -DKSHELL -c
src/cmd/ksh93/sh/parse.c
src/cmd/ksh93/sh/parse.c:320:5: warning: variable 't' is used
uninitialized whenever 'if' condition is true
[-Wsometimes-uninitialized]
        if(!l || !r)
           ^~~~~~~~
src/cmd/ksh93/sh/parse.c:332:9: note: uninitialized use occurs here
        return(t);
               ^
src/cmd/ksh93/sh/parse.c:320:2: note: remove the 'if' if its condition
is always false
        if(!l || !r)
        ^~~~~~~~~~~~
src/cmd/ksh93/sh/parse.c:320:5: warning: variable 't' is used
uninitialized whenever '||' condition is true
[-Wsometimes-uninitialized]
        if(!l || !r)
           ^~
src/cmd/ksh93/sh/parse.c:332:9: note: uninitialized use occurs here
        return(t);
               ^
src/cmd/ksh93/sh/parse.c:320:5: note: remove the '||' if its condition
is always false
        if(!l || !r)
           ^~~~~
src/cmd/ksh93/sh/parse.c:319:22: note: initialize the variable 't' to
silence this warning
        register Shnode_t       *t;
                                  ^
                                   = NULL
2 warnings generated.




+ cc '-DSHOPT_CMDLIB_BLTIN=0' '-DSH_CMDLIB_DIR="/usr/ast/bin"'
'-DSHOPT_CMDLIB_HDR="tmp_gnulinux_builtin_header.h"' -DSHOPT_SYSRC
'-D_map_libc=1' -O2 -fstrict-aliasing -Wstrict-aliasing
-Wsequence-point -Wno-parentheses -Wno-unused -Wno-trigraphs
-Wuninitialized -Waddress -Iarch/linux.i386-64/include/ast
-D_PACKAGE_ast '-DUSAGE_LICENSE="[-author?Glenn Fowler
<[email protected]>][-copyright?Copyright (c) 2000-2013 AT&T
Intellectual 
Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?msggen]";'
-c src/cmd/msggen/msgget.c
src/cmd/msggen/msgget.c:79:6: warning: variable 'loc' is used
uninitialized whenever '||' condition is true
[-Wsometimes-uninitialized]
        if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++)
|| !(s = *argv++))
            ^~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/cmd/msggen/msgget.c:89:12: note: uninitialized use occurs here
        if (streq(loc, "-"))
            ~~~~~~^~~~~~~~~
arch/linux.i386-64/include/ast/ast.h:245:23: note: expanded from macro 'streq'
#define streq(a,b)      (*(a)==*(b)&&!strcmp(a,b))
                           ^
src/cmd/msggen/msgget.c:79:6: note: remove the '||' if its condition
is always false
        if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++)
|| !(s = *argv++))
            ^~~~~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/cmd/msggen/msgget.c:54:12: note: initialize the variable 'loc' to
silence this warning
        char*           loc;
                           ^
                            = NULL
src/cmd/msggen/msgget.c:79:6: warning: variable 's' is used
uninitialized whenever '||' condition is true
[-Wsometimes-uninitialized]
        if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++)
|| !(s = *argv++))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/cmd/msggen/msgget.c:81:12: note: uninitialized use occurs here
        if (streq(s, "-"))
            ~~~~~~^~~~~~~
arch/linux.i386-64/include/ast/ast.h:245:23: note: expanded from macro 'streq'
#define streq(a,b)      (*(a)==*(b)&&!strcmp(a,b))
                           ^
src/cmd/msggen/msgget.c:79:6: note: remove the '||' if its condition
is always false
        if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++)
|| !(s = *argv++))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/cmd/msggen/msgget.c:79:6: warning: variable 's' is used
uninitialized whenever '||' condition is true
[-Wsometimes-uninitialized]
        if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++)
|| !(s = *argv++))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/cmd/msggen/msgget.c:81:12: note: uninitialized use occurs here
        if (streq(s, "-"))
            ~~~~~~^~~~~~~
arch/linux.i386-64/include/ast/ast.h:245:23: note: expanded from macro 'streq'
#define streq(a,b)      (*(a)==*(b)&&!strcmp(a,b))
                           ^
src/cmd/msggen/msgget.c:79:6: note: remove the '||' if its condition
is always false
        if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++)
|| !(s = *argv++))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/cmd/msggen/msgget.c:79:6: warning: variable 's' is used
uninitialized whenever '||' condition is true
[-Wsometimes-uninitialized]
        if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++)
|| !(s = *argv++))
            ^~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/cmd/msggen/msgget.c:81:12: note: uninitialized use occurs here
        if (streq(s, "-"))
            ~~~~~~^~~~~~~
arch/linux.i386-64/include/ast/ast.h:245:23: note: expanded from macro 'streq'
#define streq(a,b)      (*(a)==*(b)&&!strcmp(a,b))
                           ^
src/cmd/msggen/msgget.c:79:6: note: remove the '||' if its condition
is always false
        if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++)
|| !(s = *argv++))
            ^~~~~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/cmd/msggen/msgget.c:53:18: note: initialize the variable 's' to
silence this warning
        register char*  s;
                         ^
                          = NULL
src/cmd/msggen/msgget.c:79:6: warning: variable 'cmd' is used
uninitialized whenever '||' condition is true
[-Wsometimes-uninitialized]
        if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++)
|| !(s = *argv++))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/cmd/msggen/msgget.c:91:19: note: uninitialized use occurs here
        if (cat = strchr(cmd, ':'))
                         ^~~
src/cmd/msggen/msgget.c:79:6: note: remove the '||' if its condition
is always false
        if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++)
|| !(s = *argv++))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/cmd/msggen/msgget.c:79:6: warning: variable 'cmd' is used
uninitialized whenever '||' condition is true
[-Wsometimes-uninitialized]
        if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++)
|| !(s = *argv++))
            ^~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/cmd/msggen/msgget.c:91:19: note: uninitialized use occurs here
        if (cat = strchr(cmd, ':'))
                         ^~~
src/cmd/msggen/msgget.c:79:6: note: remove the '||' if its condition
is always false
        if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++)
|| !(s = *argv++))
            ^~~~~~~~~~~~~~~~~~~~
arch/linux.i386-64/include/ast/error.h:186:20: note: expanded from
macro 'error_info'
#define error_info      (*_error_infop_)
                        ^
src/cmd/msggen/msgget.c:55:12: note: initialize the variable 'cmd' to
silence this warning
        char*           cmd;
                           ^
                            = NULL
6 warnings generated.
-- snip --

----

Bye,
Roland


--
  __ .  . __
 (o.\ \/ /.o) [email protected]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)


-- 
  __ .  . __
 (o.\ \/ /.o) [email protected]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

Email secured by Check Point
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to