Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed warnings under Ubuntu 20 and 22:
datagram.c: In function ‘tcp_accept’: datagram.c:264:67: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness [-Wpointer-sign] 264 | acc_fd = accept(tcplistenfd, (struct sockaddr *)&cliaddr, &cli_len); | ^~~~~~~~ | | | int32_t * {aka int *} In file included from datagram.c:36: /usr/include/x86_64-linux-gnu/sys/socket.h:307:42: note: expected ‘socklen_t * restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘int32_t *’ {aka ‘int *’} 307 | socklen_t *__restrict __addr_len); | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ datagram.c: In function ‘tnfs_handle_udpmsg’: datagram.c:310:73: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness [-Wpointer-sign] 310 | (struct sockaddr *)&cliaddr, &len); | ^~~~ | | | int32_t * {aka int *} In file included from datagram.c:36: /usr/include/x86_64-linux-gnu/sys/socket.h:165:48: note: expected ‘socklen_t * restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘int32_t *’ {aka ‘int *’} 165 | socklen_t *__restrict __addr_len); | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ directory.c: In function ‘_load_directory’: directory.c:825:59: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-truncation=] 825 | snprintf(statpath, sizeof(statpath), "%s%c%s", dirh->path, FILEINFO_PATHSEPARATOR, entry->d_name); | ^~ directory.c:825:17: note: ‘snprintf’ output between 2 and 512 bytes into a destination of size 256 825 | snprintf(statpath, sizeof(statpath), "%s%c%s", dirh->path, FILEINFO_PATHSEPARATOR, entry->d_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Loading branch information