Bug 79232 - bad source code
bad source code
Status: CLOSED DEFERRED
Product: Red Hat Linux
Classification: Retired
Component: nmh (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Florian La Roche
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-08 05:35 EST by d.binderman
Modified: 2007-04-18 12:48 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-21 04:35:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2002-12-08 05:35:58 EST
Description of Problem:

Hello there,

I just tried to compile package nmh-1.0.4-15 from Redhat 8.0.

Here are some of the compiler messages.

msgchk.c:277: warning: operation on `home' may be undefined

Here is a patch which fixes the messages.
 
*** ./uip/msgchk.c.old	2002-11-18 12:05:50.000000000 +0000
--- ./uip/msgchk.c	2002-11-18 12:07:01.000000000 +0000
***************
*** 274,280 ****
      if (vecp == 0) {
  	char *home;
  
! 	home = (uid = geteuid()) ? home = getenv ("HOME") : NULL;
  	if (home == NULL) {
  	    pw = getpwnam (user);
  	    if (pw == NULL)
--- 274,280 ----
      if (vecp == 0) {
  	char *home;
  
! 	home = (uid = geteuid()) ? getenv ("HOME") : NULL;
  	if (home == NULL) {
  	    pw = getpwnam (user);
  	    if (pw == NULL)

Also, the compiler found

folder_addmsg.c:21: warning: `msgnum' might be used uninitialized in this function
getans.c:26: warning: `istat' might be used uninitialized in this function
getarguments.c:13: warning: `ap' might be used uninitialized in this function
fmt_scan.c:283: warning: `savestr' might be used uninitialized in this function
m_getfld.c:207: warning: `cp' might be used uninitialized in this function
pidwait.c:20: warning: `istat' might be used uninitialized in this function
pidwait.c:20: warning: `qstat' might be used uninitialized in this function
getbbent.c:592: warning: `result' might be used uninitialized in this function
sendmail.c:624: warning: `ehlo' might be used uninitialized in this function
whatnowsbr.c:269: warning: `slinked' might be used uninitialized in this function
sendsbr.c:352: warning: `status' might be used uninitialized in this function
distsbr.c:128: warning: `ofp' might be used uninitialized in this function
folder.c:134: warning: `dp' might be used uninitialized in this function
folder.c:135: warning: `ap' might be used uninitialized in this function
mhbuildsbr.c:1207: warning: `bp' might be used uninitialized in this function
mhbuildsbr.c:3620: warning: `check8bit' might be used uninitialized in this function
mhbuildsbr.c:3621: warning: `checklinelen' might be used uninitialized in this function
mhbuildsbr.c:3622: warning: `checkboundary' might be used uninitialized in this function
mhbuildsbr.c:3623: warning: `checklinespace' might be used uninitialized in this function
mhbuildsbr.c:3624: warning: `checkebcdic' might be used uninitialized in this function
mhparse.c:957: warning: `bp' might be used uninitialized in this function
mhstoresbr.c:482: warning: `msgnum' might be used uninitialized in this function
popsbr.c:651: warning: `c' might be used uninitialized in this function
msh.c:1162: warning: `i' might be used uninitialized in this function
mshcmds.c:3089: warning: `pos' might be used uninitialized in this function
picksbr.c:556: warning: `lastep' might be used uninitialized in this function
scansbr.c:71: warning: `saved_c_text' might be used uninitialized in this function
scansbr.c:74: warning: `scnmsg' might be used uninitialized in this function
scansbr.c:75: warning: `scnout' might be used uninitialized in this function
mhlsbr.c:787: warning: `cp' might be used uninitialized in this function
mhlsbr.c:788: warning: `fp' might be used uninitialized in this function
mhlsbr.c:1679: warning: `istat' might be used uninitialized in this function
mhlsbr.c:1679: warning: `pstat' might be used uninitialized in this function
mhlsbr.c:1679: warning: `qstat' might be used uninitialized in this function
mhlsbr.c:1680: warning: `cp' might be used uninitialized in this function
show.c:69: warning: `mp' might be used uninitialized in this function
whom.c:44: warning: `child_id' might be used uninitialized in this function
post.c:669: warning: `np' might be used uninitialized in this function
slocal.c:448: warning: `status' might be used uninitialized in this function
inc.c:167: warning: `hghnum' might be used uninitialized in this function
inc.c:167: warning: `msgnum' might be used uninitialized in this function
inc.c:169: warning: `maildir' might be used uninitialized in this function
inc.c:171: warning: `newmail' might be used uninitialized in this function
inc.c:174: warning: `mp' might be used uninitialized in this function
inc.c:176: warning: `in' might be used uninitialized in this function

There seems to be 45 places where the compiler thinks there is a problem.



Version-Release number of selected component (if applicable):


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:

Note You need to log in before you can comment on or make changes to this bug.