diff -urN tetrinet-0.11-orig/server.c tetrinet-0.11/server.c
--- tetrinet-0.11-orig/server.c	2003-09-08 01:29:29 +0900
+++ tetrinet-0.11/server.c	2025-09-20 13:52:37 +0900
@@ -641,12 +641,14 @@
 	send_to_all_but(player, "f %d %s", player, s);
 
     } else if (strcmp(cmd, "lvl") == 0) {
+	int level;
+
 	if (!(s = strtok(NULL, " ")) || atoi(s) != player)
 	    return 1;
 	if (!(s = strtok(NULL, " ")))
 	    return 1;
-	levels[player] = atoi(s);
-	send_to_all_but(player, "lvl %d %d", player, levels[player]);
+	level = atoi(s);
+	send_to_all_but(player, "lvl %d %d", player, level);
 
     } else if (strcmp(cmd, "sb") == 0) {
 	int from, to;
@@ -839,7 +841,7 @@
 
     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++)
@@ -857,7 +859,7 @@
 #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 -urN tetrinet-0.11-orig/sockets.c tetrinet-0.11/sockets.c
--- tetrinet-0.11-orig/sockets.c	2003-09-10 04:15:04 +0900
+++ tetrinet-0.11/sockets.c	2025-09-20 13:30:35 +0900
@@ -126,7 +126,7 @@
 /*************************************************************************/
 /*************************************************************************/
 
-int conn(const char *host, int port, char ipbuf[4])
+int conn(const char *host, int port, unsigned char ipbuf[4])
 {
 #ifdef HAVE_IPV6
     char hbuf[NI_MAXHOST];
diff -urN tetrinet-0.11-orig/sockets.h tetrinet-0.11/sockets.h
--- tetrinet-0.11-orig/sockets.h	2003-09-05 19:28:55 +0900
+++ tetrinet-0.11/sockets.h	2025-09-20 13:28:39 +0900
@@ -12,7 +12,7 @@
 extern char *sgets(char *buf, int len, int s);
 extern int sputs(const char *buf, int len);
 extern int sockprintf(int s, const char *fmt, ...);
-extern int conn(const char *host, int port, char ipbuf[4]);
+extern int conn(const char *host, int port, unsigned char ipbuf[4]);
 extern void disconn(int s);
 
 #endif	/* SOCKETS_H */
diff -urN tetrinet-0.11-orig/tetris.c tetrinet-0.11/tetris.c
--- tetrinet-0.11-orig/tetris.c	2003-09-08 01:29:29 +0900
+++ tetrinet-0.11/tetris.c	2025-09-20 13:44:52 +0900
@@ -26,6 +26,12 @@
 int special_count;	/* Number of special blocks added each time */
 int special_capacity;	/* Capacity of special block inventory */
 
+/*************************************************************************/
+
+#ifndef SERVER_ONLY
+
+/*************************************************************************/
+
 Field fields[6];	/* Current field states */
 int levels[6];		/* Current levels */
 int lines;		/* Lines completed (by us) */
@@ -43,10 +49,6 @@
 
 /*************************************************************************/
 
-#ifndef SERVER_ONLY
-
-/*************************************************************************/
-
 /* The array of piece shapes.  It is organized as:
  *	- 7 pieces
  *	  - 4 rows
diff -urN tetrinet-0.11-orig/tty.c tetrinet-0.11/tty.c
--- tetrinet-0.11-orig/tty.c	2003-09-12 05:26:53 +0900
+++ tetrinet-0.11/tty.c	2025-09-20 13:49:04 +0900
@@ -558,7 +558,7 @@
     mvaddstr(y, x-1, buf);
     for (i = 2; i < FIELD_HEIGHT*2 && players[my_playernum-1][i-2]; i++)
 	mvaddch(y+i, x-1, players[my_playernum-1][i-2]);
-    if (teams[my_playernum-1] != '\0') {
+    if (teams[my_playernum-1]) {
 	mvaddstr(y, x+FIELD_WIDTH*2+2, "T");
 	for (i = 2; i < FIELD_HEIGHT*2 && teams[my_playernum-1][i-2]; i++)
 	    mvaddch(y+i, x+FIELD_WIDTH*2+2, teams[my_playernum-1][i-2]);
@@ -594,7 +594,7 @@
 	    if (players[j+1]) {
 		for (i = 0; i < FIELD_HEIGHT-2 && players[j+1][i]; i++)
 		    mvaddch(y+i+2, x-1, players[j+1][i]);
-		if (teams[j+1] != '\0') {
+		if (teams[j+1]) {
 		    mvaddstr(y, x+FIELD_WIDTH+2, "T");
 		    for (i = 0; i < FIELD_HEIGHT-2 && teams[j+1][i]; i++)
 			mvaddch(y+i+2, x+FIELD_WIDTH+2, teams[j+1][i]);
@@ -607,7 +607,7 @@
 	    if (players[j]) {
 		for (i = 0; i < FIELD_HEIGHT-2 && players[j][i]; i++)
 		    mvaddch(y+i+2, x-1, players[j][i]);
-		if (teams[j] != '\0') {
+		if (teams[j]) {
 		    mvaddstr(y, x+FIELD_WIDTH+2, "T");
 		    for (i = 0; i < FIELD_HEIGHT-2 && teams[j][i]; i++)
 			mvaddch(y+i+2, x+FIELD_WIDTH+2, teams[j][i]);
@@ -859,10 +859,9 @@
 
 static void draw_attdef(const char *type, int from, int to)
 {
-    int i, width;
+    int i;
     char buf[512];
 
-    width = other_coord[4][0] - attdef_coord[0] - 1;
     for (i = 0; msgs[i][0]; i++) {
 	if (strcmp(type, msgs[i][0]) == 0)
 	    break;
diff -urN tetrinet-0.11-orig/xwin.c tetrinet-0.11/xwin.c
--- tetrinet-0.11-orig/xwin.c	2003-09-08 01:29:29 +0900
+++ tetrinet-0.11/xwin.c	2025-09-20 13:49:18 +0900
@@ -799,10 +799,9 @@
 
 static void draw_attdef(const char *type, int from, int to)
 {
-    int i, width;
+    int i;
     char buf[512];
 
-    width = other_coord[4][0] - attdef_coord[0] - 1;
     for (i = 0; msgs[i][0]; i++) {
 	if (strcmp(type, msgs[i][0]) == 0)
 	    break;
