Bug 79238

Summary: bad source code
Product: [Retired] Red Hat Linux Reporter: d.binderman
Component: pumpAssignee: Eido Inoue <havill>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-03-11 23:04:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description d.binderman 2002-12-08 10:51:43 UTC
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 23:04:49 UTC
fixed in cvs