Nmap Development mailing list archives
Re: Reduce warnings from nsock/include/nsock.h
From: Fyodor <fyodor () insecure org>
Date: Mon, 16 Feb 2009 23:21:52 -0800
On Wed, Feb 11, 2009 at 02:16:05PM +0100, Gisle Vanem wrote:
In nse_nsock.c: struct l_dnet_udata { char *interface; eth_t *eth; }; "g++" trips on 'interface' since this is defined in Win32's <basetyps.h> as '_COM_interface' and this again defined as 'struct'!! What a mess MS have created. This is what's gets emitted by the pre-processor: struct l_dnet_udata { char *struct; eth_t *eth; }; An easy fix would be to undefine 'interface' in nse_nsock.c With the attached simple diff-9.txt, I was able to reduce the number of warnings from ~200 to 95. That is with "-Wall -Wcast-align".
Thanks Gisle! But rather than mess with the mswin32 interface define (which I'm worried might cause strange problems in the future if not now), maybe we should just change the name of this structure member. For example, we could use "iface" rather than "interface". If that sounds reasonable to you, can you make that change, test it, and send a patch to nmap-dev? Thanks, -F _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Reduce warnings from nsock/include/nsock.h Gisle Vanem (Feb 11)
- Re: Reduce warnings from nsock/include/nsock.h Fyodor (Feb 16)