pcp
[Top] [All Lists]

Re: Warnings galore

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Subject: Re: Warnings galore
From: Mark Goodwin <markgw@xxxxxxx>
Date: Wed, 30 Apr 2008 09:40:43 +1000
Cc: nscott@xxxxxxxxxx, pcp@xxxxxxxxxxx
In-reply-to: <1208988971.27113.16.camel@bozo.localdomain>
Organization: SGI Engineering
References: <1208490519.23166.11.camel@edge.scott.net.au> <1208988971.27113.16.camel@bozo.localdomain>
Reply-to: markgw@xxxxxxx
Sender: pcp-bounce@xxxxxxxxxxx
User-agent: Thunderbird 1.5.0.14 (Windows/20071210)


Ken McDonell wrote:
I've looked at the first one.

Anyone looked at the rest of them? They can't all be bogus??

Cheers


I can PROVE mathematically, that sts at line 453 of connect.c MUST be initialized in all cases.

This appears to be a case of some "still young enough to know
everything" gcc zealot who has cocked the whole thing up.  My
recommendation is to not upgrade gcc, and leave the PCP source alone.

On Fri, 2008-04-18 at 13:48 +1000, Nathan Scott wrote:
Just upgraded gcc to ...

13:47 nathans@edge /source/git/pcp 7> gcc --version
gcc (GCC) 4.2.3 (Debian 4.2.3-3)

and, wheee, tons of shiny new warnings to work through, if
anyone's feeling brave...

connect.c: In function â__pmConnectPMCDâ:
connect.c:453: warning: âstsâ is used uninitialized in this function
connect.c:325: warning: âfdâ may be used uninitialized in this function
p_instance.c: In function â__pmDecodeInstanceâ:
p_instance.c:216: warning: ârpâ may be used uninitialized in this
function
p_result.c: In function â__pmDecodeResultâ:
p_result.c:224: warning: âiâ may be used uninitialized in this function
p_pmns.c: In function â__pmDecodeNameListâ:
p_pmns.c:304: warning: âstatusâ may be used uninitialized in this
function
pmns.c: In function âloadâ:
pmns.c:2159: warning: ânpâ may be used uninitialized in this function
pmns.c:2159: note: ânpâ was declared here
pmns.c: In function âpmGetChildrenStatusâ:
pmns.c:3084: warning: ânewnameâ may be used uninitialized in this
function
pmns.c: In function âpmTraversePMNSâ:
pmns.c:3565: warning: ânamelistâ may be used uninitialized in this
function
units.c: In function âpmUnitsStrâ:
units.c:122: warning: âspacestrâ may be used uninitialized in this
function
units.c:123: warning: âtimestrâ may be used uninitialized in this
function
units.c:124: warning: âcountstrâ may be used uninitialized in this
function
util.c: In function âpmflushâ:
util.c:899: warning: âeptrâ may be used uninitialized in this function
logutil.c: In function â__pmGetArchiveEndâ:
logutil.c:1947: warning: âphysendâ may be used uninitialized in this
function
logutil.c:1937: warning: âsaveâ may be used uninitialized in this
function
interp.c: In function â__pmLogFetchInterpâ:
interp.c:499: warning: âpcpâ may be used uninitialized in this function
rtime.c: In function âpmParseTimeWindowâ:
rtime.c:614: warning: âdeltaâ may be used uninitialized in this function
spec.c: In function âpmParseMetricSpecâ:
spec.c:93: warning: âa_endâ may be used uninitialized in this function
spec.c:97: warning: âi_endâ may be used uninitialized in this function
optfetch.c: In function â__pmOptFetchAddâ:
optfetch.c:369: warning: âpmpâ may be used uninitialized in this
function
callback.c: In function âpmdaInstanceâ:
callback.c:220: warning: âidpâ may be used uninitialized in this
function
pmnsmerge.c: In function âaddpmnsâ:
pmnsmerge.c:122: warning: âlastpâ may be used uninitialized in this
function
pmnsdel.c: In function âdelpmnsâ:
pmnsdel.c:52: warning: âlastpâ may be used uninitialized in this
function
pminfo.c: In function âreportâ:
pminfo.c:144: warning: âvspâ may be used uninitialized in this function
pmnscomp.c: In function âmainâ:
pmnscomp.c:235: warning: âstartsumâ may be used uninitialized in this
function
config.c: In function âCreateAgentâ:
config.c:1532: warning: âargvâ may be used uninitialized in this
function
config.c: In function âContactAgentsâ:
config.c:1956: warning: âstsâ may be used uninitialized in this function
dopdus.c: In function âDoInstanceâ:
dopdus.c:303: warning: âfdfailâ may be used uninitialized in this
function
dopdus.c: In function âDoDescâ:
dopdus.c:224: warning: âfdfailâ may be used uninitialized in this
function
pmie.c: In function âloadâ:
pmie.c:206: warning: âstsâ may be used uninitialized in this function
symbol.c: In function âsymInternâ:
symbol.c:134: warning: âscoopâ may be used uninitialized in this
function
dstruct.c: In function âinstExprâ:
dstruct.c:713: warning: âu.scaleSpaceâ may be used uninitialized in this
function
dstruct.c:713: warning: âu.scaleTimeâ may be used uninitialized in this
function
dstruct.c:713: warning: âu.scaleCountâ may be used uninitialized in this
function
dstruct.c:713: warning: âu.padâ may be used uninitialized in this
function
show.c: In function âlookupHostInstâ:
show.c:155: warning: âdbg_dumpâ may be used uninitialized in this
function
andor.c: In function âcndAnd_n_nâ:
andor.c:266: warning: âip2â may be used uninitialized in this function
pmprobe.c: In function âmainâ:
pmprobe.c:99: warning: âhostâ may be used uninitialized in this function
pmprobe.c:89: warning: âfetch_stsâ may be used uninitialized in this
function
pmval.c: In function âmainâ:
pmval.c:564: warning: âtmp_modeâ is used uninitialized in this function
pmval.c:1515: note: âtmp_modeâ was declared here
pmval.c:1545: warning: âidx2â may be used uninitialized in this function
pmlogger.c: In function âdo_dialogâ:
pmlogger.c:325: warning: âmsgfâ may be used uninitialized in this
function
callback.c: In function âlog_callbackâ:
callback.c:336: warning: âpdu_last_pmidâ may be used uninitialized in
this function
callback.c:335: warning: âpdu_first_pmidâ may be used uninitialized in
this function
<stdout>:1438: warning: âyyunputâ defined but not used
gram.y: In function âdometricâ:
gram.y:397: warning: âstsâ may be used uninitialized in this function
pmlogger.o: In function `do_dialog':
/source/build/pcp-2.7.4/src/pmlogger/pmlogger.c:412: warning: the use of
`tmpnam' is dangerous, better use `mkstemp'
pmdumplog.c: In function âmainâ:
pmdumplog.c:363: warning: ârawfileâ may be used uninitialized in this
function
pmdumplog.c:225: warning: âlog_sizeâ may be used uninitialized in this
function
pmdumplog.c:225: note: âlog_sizeâ was declared here
pmdumplog.c:224: warning: âmeta_sizeâ may be used uninitialized in this
function
pmdumplog.c:224: note: âmeta_sizeâ was declared here
metriclist.c: In function âsearchmlistâ:
metriclist.c:198: warning: âvlistpâ may be used uninitialized in this
function
<stdout>:1163: warning: âyyunputâ defined but not used
pmstore.c: In function âmainâ:
pmstore.c:290: warning: âhostâ may be used uninitialized in this
function
pmstore.c:301: warning: âaggr_lenâ may be used uninitialized in this
function
pmlogsummary.c: In function âmainâ:
pmlogsummary.c:661: warning: ârateâ may be used uninitialized in this
function
pmlogsummary.c:661: note: ârateâ was declared here
pmclient.c: In function âmainâ:
pmclient.c:261: warning: âhostâ may be used uninitialized in this
function
pmkstat.c: In function âmainâ:
pmkstat.c:99: warning: âhostâ may be used uninitialized in this function
pmkstat.c:112: warning: âlastdkwriteâ may be used uninitialized in this
function
pmkstat.c:111: warning: âlastdkreadâ may be used uninitialized in this
function
pmkstat.c:107: warning: âprevâ may be used uninitialized in this
function
pmlc.c: In function âmainâ:
pmlc.c:80: warning: âstsâ may be used uninitialized in this function
actions.c: In function âStatusâ:
actions.c:601: warning: âsizeâ may be used uninitialized in this
function
actions.c:600: warning: âvolâ may be used uninitialized in this function
actions.c:599: warning: âstateâ may be used uninitialized in this
function
actions.c:598: warning: âhostnameâ may be used uninitialized in this
function
actions.c:597: warning: âtimenowâ may be used uninitialized in this
function
actions.c:596: warning: âlastâ may be used uninitialized in this
function
actions.c:595: warning: âstartâ may be used uninitialized in this
function
actions.c:594: warning: âtzloggerâ may be used uninitialized in this
function
actions.c: In function âShowLoggersâ:
actions.c:214: warning: âpportâ may be used uninitialized in this
function
<stdout>:1487: warning: âyyunputâ defined but not used
dso.c: In function âdodsoâ:
dso.c:215: warning: âdesc_listâ may be used uninitialized in this
function
dso.c:213: warning: âstsâ may be used uninitialized in this function
pmda.c: In function âfillResultâ:
pmda.c:504: warning: ânbyteâ may be used uninitialized in this function
pmda.c: In function âdopmdaâ:
pmda.c:268: warning: âdesc_listâ may be used uninitialized in this
function
<stdout>:1632: warning: âyyunputâ defined but not used
pmstat.c: In function âcntDiffâ:
pmstat.c:103: warning: âdiffâ may be used uninitialized in this function
pmcd.c: In function âpmcd_instanceâ:
pmcd.c:649: warning: ânportsâ may be used uninitialized in this function
pmcd.c:651: warning: âpmiecountâ may be used uninitialized in this
function
pmcd.c:648: warning: âgetnameâ may be used uninitialized in this
function
pmcd.c: In function âpmcd_fetchâ:
pmcd.c:915: warning: âdpâ may be used uninitialized in this function
weblog.c: In function âweb_fetchâ:
weblog.c:2530: warning: âm_typeâ may be used uninitialized in this
function
weblog.c:2529: warning: âm_offsetâ may be used uninitialized in this
function
txrecord.c: In function âmainâ:
txrecord.c:44: warning: âspâ may be used uninitialized in this function
telnet.c: In function âgrab_ciscoâ:
telnet.c:338: warning: âskipâ may be used uninitialized in this function
probe.c: In function âmainâ:
probe.c:118: warning: ânameâ may be used uninitialized in this function
probe.c:118: note: ânameâ was declared here
probe.c:117: warning: âctypeâ may be used uninitialized in this function
probe.c:117: note: âctypeâ was declared here
probe.c:113: warning: âdeferâ may be used uninitialized in this function
probe.c:113: note: âdeferâ was declared here
jstat.c: In function âjstat_indom_checkâ:
jstat.c:410: warning: âstsâ is used uninitialized in this function
jstat.c: In function âjstat_refreshâ:
jstat.c:593: warning: âerrorâ is used uninitialized in this function
linuxlnk.c: In function âSetBaudCOMâ:
linuxlnk.c:380: warning: âbaudâ may be used uninitialized in this
function
telnet-probe.c: In function âmainâ:
telnet-probe.c:35: warning: âportâ may be used uninitialized in this
function





--

 Mark Goodwin                                  markgw@xxxxxxx
 Engineering Manager for XFS and PCP    Phone: +61-3-99631937
 SGI Australian Software Group           Cell: +61-4-18969583
-------------------------------------------------------------


<Prev in Thread] Current Thread [Next in Thread>