regtest: fix compiler warnings with clang 16
[valgrind.git] / memcheck / tests / null_socket.c
bloba2e203e080055e5575ef8ee2a0666fb106a95419
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <sys/types.h>
4 #include <sys/socket.h>
7 // It's legit to have NULL buffers; before the bug was fixed Valgrind
8 // reported spurious errors for the buffers.
9 int main(void)
11 if (-1 != accept(99, NULL, 0))
12 printf("accept succeeded?\n");
14 if (-1 != recvfrom(0, NULL, 0, 0, NULL, 0))
15 printf("recvfrom succeeded?\n");
17 if (-1 != getsockopt(0, 0, 0, NULL, 0))
18 printf("getsockopt succeeded?\n");
20 return 0;