1
0
mirror of https://github.com/moparisthebest/socat synced 2024-12-21 14:38:48 -05:00

corrected a few mistakes that caused compiler warnings on 64bit hosts

This commit is contained in:
Gerhard Rieger 2008-05-22 20:09:48 +02:00
parent d086001911
commit c4751d50ec
5 changed files with 10 additions and 8 deletions

View File

@ -7,6 +7,8 @@ corrections:
RECVFROM addresses with FORK option hung after processing the first
packet.
corrected a few mistakes that caused compiler warnings on 64bit hosts
####################### V 1.6.0.1:
new features:

View File

@ -1 +1 @@
"1.6.0.1+ip4bind+recvfromfork"
"1.6.0.1+ip4bind+recvfromfork+x64"

View File

@ -1,5 +1,5 @@
/* source: error.c */
/* Copyright Gerhard Rieger 2001-2007 */
/* Copyright Gerhard Rieger 2001-2008 */
/* Published under the GNU General Public License V.2, see file COPYING */
/* the logging subsystem */
@ -100,7 +100,7 @@ void diag_set(char what, const char *arg) {
sizeof(facilitynames)/sizeof(struct wordent))) == NULL) {
Error1("unknown syslog facility \"%s\"", arg);
} else {
diagopts.logfacility = (int)keywd->desc;
diagopts.logfacility = (int)(size_t)keywd->desc;
}
}
openlog(diagopts.progname, LOG_PID, diagopts.logfacility);

View File

@ -20,7 +20,7 @@ int procan_cdefs(FILE *outfile) {
fprintf(outfile, "#define FD_SETSIZE %u\n", FD_SETSIZE);
#endif
#ifdef NFDBITS
fprintf(outfile, "#define NFDBITS %u\n", NFDBITS);
fprintf(outfile, "#define NFDBITS %u\n", (unsigned int)NFDBITS);
#endif
#ifdef O_RDONLY
fprintf(outfile, "#define O_RDONLY %u\n", O_RDONLY);

View File

@ -2030,7 +2030,7 @@ int parseopts_table(const char **a, unsigned int groups, struct opt **opts,
#if WITH_IP4
case TYPE_IP4NAME:
{
struct sockaddr_in sa; size_t salen = sizeof(sa);
struct sockaddr_in sa; socklen_t salen = sizeof(sa);
const char *ends[] = { NULL };
const char *nests[] = { "[","]", NULL };
char buff[512], *buffp=buff; size_t bufspc = sizeof(buff)-1;
@ -3515,9 +3515,9 @@ mc:ifname|ifind
mc:addr
*/
union sockaddr_union sockaddr1;
size_t socklen1 = sizeof(sockaddr1.ip4);
socklen_t socklen1 = sizeof(sockaddr1.ip4);
union sockaddr_union sockaddr2;
size_t socklen2 = sizeof(sockaddr2.ip4);
socklen_t socklen2 = sizeof(sockaddr2.ip4);
/* first parameter is alway multicast address */
/*! result */
@ -3613,7 +3613,7 @@ mc:addr
{
struct ipv6_mreq ip6_mreq = {{{{0}}}};
union sockaddr_union sockaddr1;
size_t socklen1 = sizeof(sockaddr1.ip6);
socklen_t socklen1 = sizeof(sockaddr1.ip6);
/* always two parameters */
/* first parameter is multicast address */