diff --git a/CHANGES b/CHANGES index f355038..20a502f 100644 --- a/CHANGES +++ b/CHANGES @@ -123,6 +123,9 @@ porting: Lion 7.1); thanks to Jerry Jacobs to reporting this problem and proposing a solution + fixed compiler warnings on Mac OS X 64bit. Thanks to Guy Harris for + providing the patch. + ####################### V 2.0.0-b7: security: diff --git a/filan.c b/filan.c index 6461e47..6a38fae 100644 --- a/filan.c +++ b/filan.c @@ -1,5 +1,5 @@ /* source: filan.c */ -/* Copyright Gerhard Rieger 2001-2008 */ +/* Copyright Gerhard Rieger 2001-2012 */ /* Published under the GNU General Public License V.2, see file COPYING */ /* the subroutine filan makes a "FILe descriptor ANalysis". It checks the @@ -490,7 +490,10 @@ int cdevan(int fd, FILE *outfile) { return -1; } fprintf(outfile, " \tIFLAGS=%08x OFLAGS=%08x CFLAGS=%08x LFLAGS=%08x", - termarg.c_iflag, termarg.c_oflag, termarg.c_cflag, termarg.c_lflag); + (unsigned int)termarg.c_iflag, + (unsigned int)termarg.c_oflag, + (unsigned int)termarg.c_cflag, + (unsigned int)termarg.c_lflag); /* and the control characters */ if (filan_rawoutput) { diff --git a/hostan.c b/hostan.c index 9977914..02f2774 100644 --- a/hostan.c +++ b/hostan.c @@ -1,5 +1,5 @@ /* source: hostan.c */ -/* Copyright Gerhard Rieger 2006-2008 */ +/* Copyright Gerhard Rieger 2006-2012 */ /* Published under the GNU General Public License V.2, see file COPYING */ /* the subroutine hostan makes a "HOST ANalysis". It gathers information @@ -59,7 +59,9 @@ static int iffan(FILE *outfile) { for (i = 0; i < ic.ifc_len; i += sizeof(struct ifreq)) { struct ifreq *ifp = (struct ifreq *)((caddr_t)ic.ifc_req + i); +#if 0 || defined(SIOCGIFINDEX) /* not NetBSD, OpenBSD */ struct ifreq ifr; +#endif #if 0 || defined(SIOCGIFINDEX) /* not NetBSD, OpenBSD */ strcpy(ifr.ifr_name, ifp->ifr_name); @@ -74,7 +76,7 @@ static int iffan(FILE *outfile) { fprintf(outfile, "%2d: %s\n", ifr.ifr_ifindex, ifp->ifr_name); #endif /* HAVE_STRUCT_IFREQ_IFR_INDEX */ #else /* !defined(SIOCGIFINDEX) */ - fprintf(outfile, "%2d: %s\n", i/sizeof(struct ifreq), ifp->ifr_name); + fprintf(outfile, "%2d: %s\n", i/(int)sizeof(struct ifreq), ifp->ifr_name); #endif /* defined(SIOCGIFINDEX) */ } Close(s); diff --git a/xio-ip.c b/xio-ip.c index bc2da84..8db8f6d 100644 --- a/xio-ip.c +++ b/xio-ip.c @@ -454,8 +454,10 @@ int xiolog_ancillary_ip(struct cmsghdr *cmsg, int *num, const char *cmsgtype, *cmsgname = NULL, *cmsgenvn = NULL, *cmsgfmt = NULL; size_t msglen; char scratch1[16]; /* can hold an IPv4 address in ASCII */ +#if WITH_IP4 && defined(IP_PKTINFO) && HAVE_STRUCT_IN_PKTINFO char scratch2[16]; char scratch3[16]; +#endif msglen = cmsg->cmsg_len-((char *)CMSG_DATA(cmsg)-(char *)cmsg); envbuff[0] = '\0'; diff --git a/xio-socket.c b/xio-socket.c index 9bfadc4..df8bc0f 100644 --- a/xio-socket.c +++ b/xio-socket.c @@ -1926,7 +1926,7 @@ xiolog_ancillary_socket(struct cmsghdr *cmsg, int *num, cmsgname = "timestamp"; cmsgenvn = "TIMESTAMP"; { time_t t = tv->tv_sec; ctime_r(&t, valbuff); } - sprintf(strchr(valbuff, '\0')-1/*del \n*/, ", %06ld usecs", tv->tv_usec); + sprintf(strchr(valbuff, '\0')-1/*del \n*/, ", %06ld usecs", (long)tv->tv_usec); break; #endif /* defined(SO_TIMESTAMP) */ ;