Bug 79238 - bad source code
bad source code
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: pump (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Eido Inoue
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-08 05:51 EST by d.binderman
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-11 18:04:49 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:51:43 EST
Description of Problem:

Hello there,

I just tried to compile package pump-0.8.12-3 from Redhat 8.0.

Here are some of the compiler messages.

pump.c:313: warning: `class' might be used uninitialized in this function
pump.c:371: warning: `o' might be used uninitialized in this function
dhcp.c:708: warning: operation on `vndptr' may be undefined
dhcp.c:708: warning: operation on `vndptr' may be undefined
dhcp.c:708: warning: operation on `vndptr' may be undefined
dhcp.c:763: warning: `timeoutTime' might be used uninitialized in this function

Here is a patch which fixes the messages.

*** ./dhcp.c.old	2002-11-20 09:47:22.000000000 +0000
--- ./dhcp.c	2002-11-20 09:48:35.000000000 +0000
***************
*** 705,711 ****
      syslog (LOG_DEBUG, "%s: bootfile: %s", name, breq->bootfile);
      
      vndptr = breq->vendor;
!     sprintf (vendor, "0x%02x 0x%02x 0x%02x 0x%02x", *vndptr++, *vndptr++, *vndptr++, *vndptr++);
      syslog (LOG_DEBUG, "%s: vendor: %s", name, vendor);
      
      
--- 705,713 ----
      syslog (LOG_DEBUG, "%s: bootfile: %s", name, breq->bootfile);
      
      vndptr = breq->vendor;
!     sprintf (vendor, "0x%02x 0x%02x 0x%02x 0x%02x", vndptr[ 0], vndptr[ 1], 
! 	vndptr[ 2], vndptr[ 3]);
!     vndptr += 4;
      syslog (LOG_DEBUG, "%s: vendor: %s", name, vendor);
      
      
***************
*** 760,766 ****
      int gotit = 0;
      int tries;
      int nextTimeout = 2;
!     time_t timeoutTime;
      int sin;
      int resend = 1;
      struct ethhdr;
--- 762,768 ----
      int gotit = 0;
      int tries;
      int nextTimeout = 2;
!     time_t timeoutTime = 0;
      int sin;
      int resend = 1;
      struct ethhdr;
*** ./pump.c.old	2002-11-20 09:45:16.000000000 +0000
--- ./pump.c	2002-11-20 09:46:59.000000000 +0000
***************
*** 310,316 ****
      pid_t child;
      char * argv[20];
      char ** nextArg;
!     char * class, * chptr;
  
      if (!script) return;
  
--- 310,316 ----
      pid_t child;
      char * argv[20];
      char ** nextArg;
!     char * class = NULL, * chptr;
  
      if (!script) return;
  
***************
*** 368,374 ****
      int closest;
      struct timeval tv;
      fd_set fds;
!     struct pumpOverrideInfo emptyOverride, * o;
  
      if (!overrides)
          readPumpConfig(configFile, &overrides);
--- 368,374 ----
      int closest;
      struct timeval tv;
      fd_set fds;
!     struct pumpOverrideInfo emptyOverride, * o = NULL;
  
      if (!overrides)
          readPumpConfig(configFile, &overrides);



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


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:
Comment 1 Eido Inoue 2003-03-11 18:04:49 EST
fixed in cvs

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