From d6b783a8ec505c8e158bd0304c5e195cff5bb8c3 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Fri, 17 Sep 2010 17:10:25 +0200 Subject: Fixed compiler warnings reported on Ubuntu 10.04 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warnings reported where: -------------------------------------------------------- misc.c:158: warning: ignoring return value of ‘nice’, declared with attribute warn_unused_result options.c:4033: warning: format not a string literal and no format arguments options.c:4043: warning: format not a string literal and no format arguments options.c:4053: warning: format not a string literal and no format arguments push.c:182: warning: format not a string literal and no format arguments push.c:199: warning: format not a string literal and no format arguments push.c:235: warning: format not a string literal and no format arguments status.c:171: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result -------------------------------------------------------- Signed-off-by: David Sommerseth Acked-by: Gert Doering Acked-by: Peter Stuge --- misc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'misc.c') diff --git a/misc.c b/misc.c index 1f7f616..f5ce590 100644 --- a/misc.c +++ b/misc.c @@ -155,9 +155,8 @@ set_nice (int niceval) { #ifdef HAVE_NICE errno = 0; - nice (niceval); - if (errno != 0) - msg (M_WARN | M_ERRNO, "WARNING: nice %d failed", niceval); + if (nice (niceval) < 0 && errno != 0) + msg (M_WARN | M_ERRNO, "WARNING: nice %d failed: %s", niceval, strerror(errno)); else msg (M_INFO, "nice %d succeeded", niceval); #else -- cgit