Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jan 2016 05:59:33 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r294486 - in stable/10/tools/regression/sockets: reconnect sendfile
Message-ID:  <201601210559.u0L5xXka089020@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Thu Jan 21 05:59:33 2016
New Revision: 294486
URL: https://svnweb.freebsd.org/changeset/base/294486

Log:
  MFC r294126:
  
  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(..)

Modified:
  stable/10/tools/regression/sockets/reconnect/reconnect.c
  stable/10/tools/regression/sockets/sendfile/sendfile.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/regression/sockets/reconnect/reconnect.c
==============================================================================
--- stable/10/tools/regression/sockets/reconnect/reconnect.c	Thu Jan 21 05:57:32 2016	(r294485)
+++ stable/10/tools/regression/sockets/reconnect/reconnect.c	Thu Jan 21 05:59:33 2016	(r294486)
@@ -104,7 +104,7 @@ cleanup(void)
 }
 
 int
-main()
+main(void)
 {
     int s_sock1, s_sock2, c_sock;
 
@@ -127,6 +127,7 @@ main()
     connect_uds_server(c_sock, uds_name1);
     close(s_sock1);
     connect_uds_server(c_sock, uds_name2);
+    close(s_sock2);
 
     exit (0);
 }

Modified: stable/10/tools/regression/sockets/sendfile/sendfile.c
==============================================================================
--- stable/10/tools/regression/sockets/sendfile/sendfile.c	Thu Jan 21 05:57:32 2016	(r294485)
+++ stable/10/tools/regression/sockets/sendfile/sendfile.c	Thu Jan 21 05:59:33 2016	(r294486)
@@ -459,12 +459,9 @@ cleanup(void)
 int
 main(int argc, char *argv[])
 {
-	int pagesize;
 
 	path[0] = '\0';
 
-	pagesize = getpagesize();
-
 	if (argc == 1) {
 		snprintf(path, sizeof(path), "sendfile.XXXXXXXXXXXX");
 		file_fd = mkstemp(path);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601210559.u0L5xXka089020>