Nmap Development mailing list archives

Re: patch for compiler warnings


From: Fyodor <fyodor () insecure org>
Date: Fri, 9 Sep 2005 20:37:33 -0700

On Fri, Sep 09, 2005 at 10:23:39AM -0400, William MacKay wrote:
I made a patch that fixes a couple compiler warnings that shouldn't  
affect nmap's functionality at all:

You didn't mention what platform you are running on, but I'm assuming
Mac OS X based on your changes.

#include <arpa/inet.h>
+#ifdef __APPLE__
+#include <sys/time.h>
+#else
#include <time.h>
#endif
+#endif

OK, I've just changed it from time.h to sys/time.h unconditionally.
Let's hope that doesn't break things on other platforms.  Thanks.

-  int slen = sizeof(struct sockaddr_storage);
+  unsigned int slen = sizeof(struct sockaddr_storage);

I worry that these sign changes might end up fixing the warning on
your system while causing it on others :(.  Operating systems aren't
always consistant with the sign of return values and function
parameters :(.

Cheers,
-F


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev


Current thread: