Fix warnings with gcc 5.0
reconnect.c: - Convert the K&R prototype of main to an ANSI prototype to mute a warning from gcc 4.2.1 - Close s_sock2 after finishing off the last test to plug a leak and mute a warning from gcc 5.0 about a -Wunused-but-set variable sendfile.c: - Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..) MFC after: 5 days Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
c084ac2883
commit
eb1c509ffd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=294126
@ -104,7 +104,7 @@ cleanup(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
main(void)
|
||||||
{
|
{
|
||||||
int s_sock1, s_sock2, c_sock;
|
int s_sock1, s_sock2, c_sock;
|
||||||
|
|
||||||
@ -127,6 +127,7 @@ main()
|
|||||||
connect_uds_server(c_sock, uds_name1);
|
connect_uds_server(c_sock, uds_name1);
|
||||||
close(s_sock1);
|
close(s_sock1);
|
||||||
connect_uds_server(c_sock, uds_name2);
|
connect_uds_server(c_sock, uds_name2);
|
||||||
|
close(s_sock2);
|
||||||
|
|
||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
|
@ -459,12 +459,9 @@ cleanup(void)
|
|||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int pagesize;
|
|
||||||
|
|
||||||
path[0] = '\0';
|
path[0] = '\0';
|
||||||
|
|
||||||
pagesize = getpagesize();
|
|
||||||
|
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
snprintf(path, sizeof(path), "sendfile.XXXXXXXXXXXX");
|
snprintf(path, sizeof(path), "sendfile.XXXXXXXXXXXX");
|
||||||
file_fd = mkstemp(path);
|
file_fd = mkstemp(path);
|
||||||
|
Loading…
Reference in New Issue
Block a user