Bug 79238 - bad source code
Summary: bad source code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pump
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Eido Inoue
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-08 10:51 UTC by d.binderman
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-03-11 23:04:49 UTC
Embargoed:


Attachments (Terms of Use)

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


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