From 2c9a4f55323ce66a0fa4472b01db79db746b066a Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Tue, 11 Sep 2007 09:46:46 +0000 Subject: [PATCH] Got rid of some signedness warnings, hopefully they don't break anything --- server.c | 4 ++-- tetrinet.c | 6 +++--- tty.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server.c b/server.c index 82c4f64..3f589fc 100644 --- a/server.c +++ b/server.c @@ -858,7 +858,7 @@ static void check_sockets() if (listen_sock >= 0 && FD_ISSET(listen_sock, &fds)) { struct sockaddr_in sin; - int len = sizeof(sin); + socklen_t len = sizeof(sin); fd = accept(listen_sock, (struct sockaddr *)&sin, &len); if (fd >= 0) { for (i = 0; i < 6 && player_socks[i] != -1; i++) @@ -876,7 +876,7 @@ static void check_sockets() #ifdef HAVE_IPV6 if (listen_sock6 >= 0 && FD_ISSET(listen_sock6, &fds)) { struct sockaddr_in6 sin6; - int len = sizeof(sin6); + socklen_t len = sizeof(sin6); fd = accept(listen_sock6, (struct sockaddr *)&sin6, &len); if (fd >= 0) { for (i = 0; i < 6 && player_socks[i] != -1; i++) diff --git a/tetrinet.c b/tetrinet.c index c142859..45fcc48 100644 --- a/tetrinet.c +++ b/tetrinet.c @@ -51,7 +51,7 @@ Interface *io; /* Input/output routines */ /* Output message to a message buffer, possibly decoding the text attributes * tetrinet code. */ -void msg_text(int bufnum, const unsigned char *s) +void msg_text(int bufnum, const char *s) { /* Stolen from gtetrinet: (leading space <=> undefined) */ static enum tattr map[32] = { @@ -88,7 +88,7 @@ void msg_text(int bufnum, const unsigned char *s) TATTR_CBLACK, TATTR_UNDERLINE, }; - unsigned char tb[1024], *t; + char tb[1024], *t; for (t = tb; *s && t - tb < 1024; t++, s++) { if (*s == 0xFF) { @@ -626,7 +626,7 @@ int init(int ac, char **av) char *nick = NULL, *server = NULL; char buf[1024]; char nickmsg[1024]; - unsigned char ip[4]; + char ip[4]; char iphashbuf[32]; int len; #ifdef BUILTIN_SERVER diff --git a/tty.c b/tty.c index b417136..f9f101a 100644 --- a/tty.c +++ b/tty.c @@ -301,7 +301,7 @@ static void screen_redraw(void) /* Put a line of text in a text buffer. */ -static void outline(TextBuffer *buf, const unsigned char *s) +static void outline(TextBuffer *buf, const char *s) { if (buf->line == buf->height) { if (buf->win) -- 2.11.4.GIT