Bug 79228 - bad source code
Summary: bad source code
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mars-nwe
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Florian La Roche
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks: FC3BugWeekTracker
TreeView+ depends on / blocked
 
Reported: 2002-12-08 10:24 UTC by d.binderman
Modified: 2007-04-18 16:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-29 15:22:58 UTC


Attachments (Terms of Use)

Description d.binderman 2002-12-08 10:24:07 UTC
Description of Problem:

Hello there,

I just tried to compile package mars-nwe-0.99pl20-10 from Redhat 8.0.

Here are some of the compiler messages.

../nwroute.c:809: warning: `nd' might be used uninitialized in this function
../nwroute.c:917: warning: `nd' might be used uninitialized in this function
../namspace.c:1590: warning: `sequence' might be used uninitialized in this function
../nwattrib.c:146: warning: `oldattrib' might be used uninitialized in this function
../nwqueue.c:979: warning: operation on `result' may be undefined
../nwqueue.c:981: warning: operation on `result' may be undefined

Here is a patch which fixes the messages.

*** ./namspace.c.old	2002-11-14 14:36:55.000000000 +0000
--- ./namspace.c	2002-11-14 14:37:18.000000000 +0000
***************
*** 1587,1593 ****
    DIR_SEARCH_HANDLE *dsh=NULL;
    DIR_BASE_ENTRY    *dbe=NULL;
    uint8  *unixname      =NULL;
!   int sequence;
    int no_search_trustee = 0;
    *perhaps_more  = 0;
    *count         = 0;
--- 1587,1593 ----
    DIR_SEARCH_HANDLE *dsh=NULL;
    DIR_BASE_ENTRY    *dbe=NULL;
    uint8  *unixname      =NULL;
!   int sequence = 0;
    int no_search_trustee = 0;
    *perhaps_more  = 0;
    *count         = 0;
*** ./nwattrib.c.old	2002-11-14 14:37:31.000000000 +0000
--- ./nwattrib.c	2002-11-14 14:37:48.000000000 +0000
***************
*** 143,149 ****
     */
  {
    int is_dir=S_ISDIR(stb->st_mode);
!   uint32 oldattrib,newattrib;
    int voloptions=get_volume_options(volume);
    if (voloptions & VOL_OPTION_IS_PIPE)
       return(0); /* we return with no error */
--- 143,149 ----
     */
  {
    int is_dir=S_ISDIR(stb->st_mode);
!   uint32 oldattrib = 0,newattrib;
    int voloptions=get_volume_options(volume);
    if (voloptions & VOL_OPTION_IS_PIPE)
       return(0); /* we return with no error */
*** ./nwqueue.c.old	2002-11-14 14:38:06.000000000 +0000
--- ./nwqueue.c	2002-11-14 14:38:37.000000000 +0000
***************
*** 976,984 ****
          nw_delete_obj(&obj);
          result=0;
        } else
!         result=result=-0xd3;  /* no rights */
      } else 
!       result=result=-0xd3;  /* no rights */
    }
    return(result);
  }
--- 976,984 ----
          nw_delete_obj(&obj);
          result=0;
        } else
!         result=-0xd3;  /* no rights */
      } else 
!       result=-0xd3;  /* no rights */
    }
    return(result);
  }
*** ./nwroute.c.old	2002-11-14 14:36:05.000000000 +0000
--- ./nwroute.c	2002-11-14 14:36:34.000000000 +0000
***************
*** 806,812 ****
    uint8 rnetdevname[100];
    int   k = -1;
    int   foundfree=-1; /* first matching/free entry */
!   NW_NET_DEVICE *nd;
    if (!rnet || rnet == internal_net) return(0);
    while (++k < count_net_devices) {
      nd=net_devices[k];
--- 806,812 ----
    uint8 rnetdevname[100];
    int   k = -1;
    int   foundfree=-1; /* first matching/free entry */
!   NW_NET_DEVICE *nd = 0;
    if (!rnet || rnet == internal_net) return(0);
    while (++k < count_net_devices) {
      nd=net_devices[k];
***************
*** 914,920 ****
    int  find_diffs=0;
    if (f) {
      char buff[200];
!     NW_NET_DEVICE *nd;
      int  k = -1;
  
      while (++k < count_net_devices) {
--- 914,920 ----
    int  find_diffs=0;
    if (f) {
      char buff[200];
!     NW_NET_DEVICE *nd = 0;
      int  k = -1;
  
      while (++k < count_net_devices) {


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


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:

Comment 1 Marcin Garski 2004-09-29 15:22:58 UTC
Thanks for the bug report.
However, Red Hat no longer maintains mars-nwe.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some
older releases, and if you believe this bug is interesting to them,
please report the problem in the bug tracker at:
http://bugzilla.fedora.us/


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