Skip to content

Commit b18a295

Browse files
committed
Squelch compiler warnings
Unused variable, signed/unsigned comparison. Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent 743bb41 commit b18a295

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

network.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ int *tcp_listener(const char *s)
207207
if (listen(fd, 128) < 0)
208208
err_sys("listen");
209209

210-
if (allocated_fds < fd_num + 1 + 1) {
210+
if (allocated_fds < (size_t)fd_num + 1 + 1) {
211211
allocated_fds += 8;
212212
fd_list = realloc(fd_list, allocated_fds * sizeof(int));
213213
}
@@ -218,7 +218,7 @@ int *tcp_listener(const char *s)
218218
}
219219

220220
/* and then add -1 as the list terminator */
221-
if (allocated_fds < fd_num + 1 + 1)
221+
if (allocated_fds < (size_t)fd_num + 1 + 1)
222222
fd_list = realloc(fd_list, ++allocated_fds * sizeof(int));
223223
fd_list[fd_num] = -1;
224224

udptunnel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ static void send_handshake(struct relay *relay)
387387

388388
static void wait_for_child(int sig)
389389
{
390+
(void)sig;
390391
while (waitpid(-1, NULL, WNOHANG) > 0);
391392
}
392393

0 commit comments

Comments
 (0)