Bug 79231

Summary: bad source code
Product: [Retired] Red Hat Linux Reporter: d.binderman
Component: nmapAssignee: Harald Hoyer <harald>
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-01-09 15:07:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description d.binderman 2002-12-08 10:32:54 UTC
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 15:07:21 UTC
fixed in nmap-3.00-3, please report upstream...