mirror of
https://repo.or.cz/socat.git
synced 2024-12-23 07:52:32 +00:00
fixed compiler warnings on Mac OS X 64bit
This commit is contained in:
parent
178442ab21
commit
a65b1c7c72
5 changed files with 15 additions and 5 deletions
3
CHANGES
3
CHANGES
|
@ -123,6 +123,9 @@ porting:
|
||||||
Lion 7.1); thanks to Jerry Jacobs to reporting this problem and
|
Lion 7.1); thanks to Jerry Jacobs to reporting this problem and
|
||||||
proposing a solution
|
proposing a solution
|
||||||
|
|
||||||
|
fixed compiler warnings on Mac OS X 64bit. Thanks to Guy Harris for
|
||||||
|
providing the patch.
|
||||||
|
|
||||||
####################### V 2.0.0-b7:
|
####################### V 2.0.0-b7:
|
||||||
|
|
||||||
security:
|
security:
|
||||||
|
|
7
filan.c
7
filan.c
|
@ -1,5 +1,5 @@
|
||||||
/* source: filan.c */
|
/* 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 */
|
/* Published under the GNU General Public License V.2, see file COPYING */
|
||||||
|
|
||||||
/* the subroutine filan makes a "FILe descriptor ANalysis". It checks the
|
/* the subroutine filan makes a "FILe descriptor ANalysis". It checks the
|
||||||
|
@ -490,7 +490,10 @@ int cdevan(int fd, FILE *outfile) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
fprintf(outfile, " \tIFLAGS=%08x OFLAGS=%08x CFLAGS=%08x LFLAGS=%08x",
|
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 */
|
/* and the control characters */
|
||||||
if (filan_rawoutput) {
|
if (filan_rawoutput) {
|
||||||
|
|
6
hostan.c
6
hostan.c
|
@ -1,5 +1,5 @@
|
||||||
/* source: hostan.c */
|
/* 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 */
|
/* Published under the GNU General Public License V.2, see file COPYING */
|
||||||
|
|
||||||
/* the subroutine hostan makes a "HOST ANalysis". It gathers information
|
/* 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)) {
|
for (i = 0; i < ic.ifc_len; i += sizeof(struct ifreq)) {
|
||||||
struct ifreq *ifp = (struct ifreq *)((caddr_t)ic.ifc_req + i);
|
struct ifreq *ifp = (struct ifreq *)((caddr_t)ic.ifc_req + i);
|
||||||
|
#if 0 || defined(SIOCGIFINDEX) /* not NetBSD, OpenBSD */
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0 || defined(SIOCGIFINDEX) /* not NetBSD, OpenBSD */
|
#if 0 || defined(SIOCGIFINDEX) /* not NetBSD, OpenBSD */
|
||||||
strcpy(ifr.ifr_name, ifp->ifr_name);
|
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);
|
fprintf(outfile, "%2d: %s\n", ifr.ifr_ifindex, ifp->ifr_name);
|
||||||
#endif /* HAVE_STRUCT_IFREQ_IFR_INDEX */
|
#endif /* HAVE_STRUCT_IFREQ_IFR_INDEX */
|
||||||
#else /* !defined(SIOCGIFINDEX) */
|
#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) */
|
#endif /* defined(SIOCGIFINDEX) */
|
||||||
}
|
}
|
||||||
Close(s);
|
Close(s);
|
||||||
|
|
2
xio-ip.c
2
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;
|
const char *cmsgtype, *cmsgname = NULL, *cmsgenvn = NULL, *cmsgfmt = NULL;
|
||||||
size_t msglen;
|
size_t msglen;
|
||||||
char scratch1[16]; /* can hold an IPv4 address in ASCII */
|
char scratch1[16]; /* can hold an IPv4 address in ASCII */
|
||||||
|
#if WITH_IP4 && defined(IP_PKTINFO) && HAVE_STRUCT_IN_PKTINFO
|
||||||
char scratch2[16];
|
char scratch2[16];
|
||||||
char scratch3[16];
|
char scratch3[16];
|
||||||
|
#endif
|
||||||
|
|
||||||
msglen = cmsg->cmsg_len-((char *)CMSG_DATA(cmsg)-(char *)cmsg);
|
msglen = cmsg->cmsg_len-((char *)CMSG_DATA(cmsg)-(char *)cmsg);
|
||||||
envbuff[0] = '\0';
|
envbuff[0] = '\0';
|
||||||
|
|
|
@ -1926,7 +1926,7 @@ xiolog_ancillary_socket(struct cmsghdr *cmsg, int *num,
|
||||||
cmsgname = "timestamp";
|
cmsgname = "timestamp";
|
||||||
cmsgenvn = "TIMESTAMP";
|
cmsgenvn = "TIMESTAMP";
|
||||||
{ time_t t = tv->tv_sec; ctime_r(&t, valbuff); }
|
{ 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;
|
break;
|
||||||
#endif /* defined(SO_TIMESTAMP) */
|
#endif /* defined(SO_TIMESTAMP) */
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue