Bug 79231 - bad source code
bad source code
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: nmap (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-08 05:32 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-01-09 10:07:21 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:32:54 EST
Description of Problem:

Hello there,

I just tried to compile package nmap-3.00-1 from Redhat 8.0.

Here are some of the compiler messages.

tcpip.c:416: warning: operation on `i' may be undefined
tcpip.c:459: warning: operation on `i' may be undefined

Here is a patch which fixes the messages.
  
*** ./tcpip.c.old	2002-11-18 11:55:04.000000000 +0000
--- ./tcpip.c	2002-11-18 11:56:58.000000000 +0000
***************
*** 413,419 ****
  }
  if (readdata && i < tot_len) {
  printf("Data portion:\n");
! while(i < tot_len)  printf("%2X%c", data[i], (++i%16)? ' ' : '\n');
  printf("\n");
  }
  return 0;
--- 413,423 ----
  }
  if (readdata && i < tot_len) {
  printf("Data portion:\n");
! while(i < tot_len)  
! {
! 	printf("%2X%c", data[ i], ((i + 1) % 16) ? ' ' : '\n');
! 	++i;
! }
  printf("\n");
  }
  return 0;
***************
*** 456,462 ****
  }
   if (readdata && i < tot_len) {
     printf("Data portion:\n");
!    while(i < tot_len)  printf("%2X%c", data[i], (++i%16)? ' ' : '\n');
     printf("\n");
   }
   return 0;
--- 460,470 ----
  }
   if (readdata && i < tot_len) {
     printf("Data portion:\n");
!    while(i < tot_len)  
!    {
! 	printf("%2X%c", data[ i], ((i + 1) % 16) ? ' ' : '\n');
! 	++i;
!    }
     printf("\n");
   }
   return 0;


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


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:
Comment 1 Harald Hoyer 2003-01-09 10:07:21 EST
fixed in nmap-3.00-3, please report upstream...

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