Nmap Development mailing list archives
patch for compiler warning on win32
From: "cox () djehuti com" <cox () djehuti com>
Date: Mon, 4 Feb 2002 08:49:31 -0500
Hello,
When I built nmap-2.54BETA30 on win32, I got a warning about a variable (ch) being used before being initialized. The
variable use turns out to be innocuous, but the following patch eliminates the warning; nmap then compiles with no
warnings
Cheers,
-- Ben
*** output.c-orig Sun Oct 14 07:46:10 2001
--- output.c Mon Feb 04 13:37:29 2002
***************
*** 224,230 ****
unsigned int i;
char *temp, ch, prevch = 0, *p;
temp = malloc(strlen(str)*6+1);
! for (p = temp;(prevch = ch, ch = *str);str++) {
char *a;
switch (ch) {
case '<':
--- 224,230 ----
unsigned int i;
char *temp, ch, prevch = 0, *p;
temp = malloc(strlen(str)*6+1);
! for (p = temp; ch = *str; (str++, prevch = ch)) {
char *a;
switch (ch) {
case '<':
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to
nmap-dev-help () insecure org . List run by ezmlm-idx (www.ezmlm.org).
Current thread:
- patch for compiler warning on win32 cox () djehuti com (Feb 04)
