]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: avoid gcc warning about missing attributes
authorJim Meyering <meyering@redhat.com>
Sat, 14 Feb 2009 10:22:22 +0000 (11:22 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 2 Mar 2009 08:10:17 +0000 (09:10 +0100)
* src/prog-fprintf.h (prog_fprintf): Declare with printf attribute.
* src/system.h (usage): Declare with the "noreturn" attribute.

src/prog-fprintf.h
src/system.h

index d5c3d425a537c6c2b6cbd6cee2a3d0578238200f..98029ab9ce48513ca0c609206ed2ef67b9c627c8 100644 (file)
@@ -1,5 +1,5 @@
 /* prog-fprintf.h - common formating output functions and definitions
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008-2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
 
 # include <stdio.h>
 
-extern void prog_fprintf (FILE *fp, char const *fmt, ...);
+extern void prog_fprintf (FILE *fp, char const *fmt, ...)
+  __attribute__ ((__format__ (__printf__, 2, 3)));
 
 #endif
index 990be0c693f27ce5475bbe7138f154780242e096..ba74da448ecd056e6d57fe892f741951caa530e6 100644 (file)
@@ -655,4 +655,4 @@ bad_cast (char const *s)
   return (char *) s;
 }
 
-void usage (int status);
+void usage (int status) ATTRIBUTE_NORETURN;