Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Sep 2015 07:33:37 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r287348 - head/lib/libc/rpc
Message-ID:  <201509010733.t817Xbfo063936@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Tue Sep  1 07:33:36 2015
New Revision: 287348
URL: https://svnweb.freebsd.org/changeset/base/287348

Log:
  Use correct function prototype for signal handler.
  
  Eliminates gcc 4.9 warning.

Modified:
  head/lib/libc/rpc/auth_time.c

Modified: head/lib/libc/rpc/auth_time.c
==============================================================================
--- head/lib/libc/rpc/auth_time.c	Tue Sep  1 07:32:03 2015	(r287347)
+++ head/lib/libc/rpc/auth_time.c	Tue Sep  1 07:33:36 2015	(r287348)
@@ -255,7 +255,7 @@ __rpc_get_time_offset(struct timeval *td
 	char			ut[64], ipuaddr[64];
 	endpoint		teps[32];
 	nis_server		tsrv;
-	void			(*oldsig)() = NULL; /* old alarm handler */
+	void			(*oldsig)(int) = NULL; /* old alarm handler */
 	struct sockaddr_in	sin;
 	socklen_t		len;
 	int			s = RPC_ANYSOCK;
@@ -424,7 +424,7 @@ __rpc_get_time_offset(struct timeval *td
 		} else {
 			int res;
 
-			oldsig = (void (*)())signal(SIGALRM, alarm_hndler);
+			oldsig = (void (*)(int))signal(SIGALRM, alarm_hndler);
 			saw_alarm = 0; /* global tracking the alarm */
 			alarm(20); /* only wait 20 seconds */
 			res = _connect(s, (struct sockaddr *)&sin, sizeof(sin));



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