Module Name:    src
Committed By:   martin
Date:           Sat Aug  2 09:16:22 UTC 2014

Modified Files:
        src/usr.bin/timeout: timeout.c

Log Message:
Cast signal argument of kill(2) to int, as sig_atomic_t may be larger.
Avoids:
src/usr.bin/timeout/timeout.c:331:5: error: conversion to 'int' from 
'sig_atomic_t' may alter its value [-Werror=conversion]
     kill(pid, sig_term);
     ^
warning from gcc 4.8


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/timeout/timeout.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/timeout/timeout.c
diff -u src/usr.bin/timeout/timeout.c:1.2 src/usr.bin/timeout/timeout.c:1.3
--- src/usr.bin/timeout/timeout.c:1.2	Fri Aug  1 14:01:30 2014
+++ src/usr.bin/timeout/timeout.c	Sat Aug  2 09:16:22 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: timeout.c,v 1.2 2014/08/01 14:01:30 christos Exp $ */
+/* $NetBSD: timeout.c,v 1.3 2014/08/02 09:16:22 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 Baptiste Daroussin <b...@freebsd.org>
@@ -32,7 +32,7 @@
 #if 0
 __FBSDID("$FreeBSD: head/usr.bin/timeout/timeout.c 268763 2014-07-16 13:52:05Z bapt $");
 #else
-__RCSID("$NetBSD: timeout.c,v 1.2 2014/08/01 14:01:30 christos Exp $");
+__RCSID("$NetBSD: timeout.c,v 1.3 2014/08/02 09:16:22 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -328,7 +328,7 @@ main(int argc, char **argv)
 			if (!foreground)
 				killpg(pgid, killsig);
 			else
-				kill(pid, sig_term);
+				kill(pid, (int)sig_term);
 
 			if (do_second_kill) {
 				set_interval(second_kill);

Reply via email to