OpenSSH warnings on FreeBSD

Loganaden Velvindron loganaden at gmail.com
Tue Dec 4 23:05:51 EST 2012


on FreeBSD, gcc complains that %d is used for sig_atomic_t

Casting to (int) as a solution ?


Index: serverloop.c
===================================================================
RCS file: /cvs/openssh/serverloop.c,v
retrieving revision 1.172
diff -u -p -r1.172 serverloop.c
--- serverloop.c	2 Dec 2012 22:50:55 -0000	1.172
+++ serverloop.c	4 Dec 2012 11:46:33 -0000
@@ -708,7 +708,7 @@ server_loop(pid_t pid, int fdin_arg, int
 		    &nalloc, max_time_milliseconds);

 		if (received_sigterm) {
-			logit("Exiting on signal %d", received_sigterm);
+			logit("Exiting on signal %d", (int)received_sigterm);
 			/* Clean up sessions, utmp, etc. */
 			cleanup_exit(255);
 		}
@@ -858,7 +858,7 @@ server_loop2(Authctxt *authctxt)
 		    &nalloc, 0);

 		if (received_sigterm) {
-			logit("Exiting on signal %d", received_sigterm);
+			logit("Exiting on signal %d", (int)received_sigterm);
 			/* Clean up sessions, utmp, etc. */
 			cleanup_exit(255);

-- 
Brightest day,
Blackest night,
No bug shall escape my sight,
And those who worship evil's mind,
be wary of my powers,
puffy lantern's light !


More information about the openssh-unix-dev mailing list