From 1c0ad8aa262c5f1234cc047ef219be85719aff8e Mon Sep 17 00:00:00 2001 From: rfm Date: Tue, 25 Oct 2011 08:02:38 +0000 Subject: [PATCH] Tweaks to avoid compiler warnings git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34054 72102866-910b-0410-8b05-ffd578937521 --- Source/Additions/NSURL+GNUstepBase.m | 1 + Tools/gdomap.c | 27 ++++++++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Source/Additions/NSURL+GNUstepBase.m b/Source/Additions/NSURL+GNUstepBase.m index 4f2ee4f62..bebd3212f 100644 --- a/Source/Additions/NSURL+GNUstepBase.m +++ b/Source/Additions/NSURL+GNUstepBase.m @@ -24,6 +24,7 @@ */ #import "common.h" +#import "Foundation/NSValue.h" #import "GNUstepBase/NSURL+GNUstepBase.h" @implementation NSURL (GNUstepBaseAdditions) diff --git a/Tools/gdomap.c b/Tools/gdomap.c index c807e4e2c..6719f0aea 100644 --- a/Tools/gdomap.c +++ b/Tools/gdomap.c @@ -3090,10 +3090,7 @@ handle_request(int desc) */ if (ri->addr.sin_port == my_port) { - struct in_addr *ptr; struct in_addr sin; - unsigned long net; - int c; memcpy(&sin, ri->buf.r.name, IASIZE); if (debug > 2) @@ -3101,6 +3098,21 @@ handle_request(int desc) snprintf(ebuf, sizeof(ebuf), "Probe from '%s'", inet_ntoa(sin)); gdomap_log(LOG_DEBUG); } + prb_add(&sin); + + /* + * Irrespective of what we are told to do - we also add the + * interface from which this packet arrived so we have a + * route we KNOW we can use. + */ + prb_add(&ri->addr.sin_addr); + +#if 0 + { + struct in_addr *ptr; + unsigned long net; + int c; + #if defined(__MINGW__) if (IN_CLASSA(sin.s_addr)) { @@ -3119,8 +3131,6 @@ handle_request(int desc) #endif ptr = (struct in_addr*)&ri->buf.r.name[2*IASIZE]; c = (ri->buf.r.nsize - 2*IASIZE)/IASIZE; - prb_add(&sin); -#if 0 while (c-- > 0) { if (debug > 2) @@ -3132,13 +3142,8 @@ handle_request(int desc) prb_add(ptr); ptr++; } + } #endif - /* - * Irrespective of what we are told to do - we also add the - * interface from which this packet arrived so we have a - * route we KNOW we can use. - */ - prb_add(&ri->addr.sin_addr); } /* * For a UDP request from another name server, we send a reply