summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-02-14 11:22:22 +0100
committerJim Meyering <meyering@redhat.com>2009-03-02 09:10:17 +0100
commitebfbdf9f0e53d5eb8e6a1c85d825a1a9f0f1baef (patch)
tree7a663605bb08ec9c0850c50f508aceb08bc4d20e
parent2d10b7617bf846d197b881507c6c37e951e773dd (diff)
downloadcoreutils-ebfbdf9f0e53d5eb8e6a1c85d825a1a9f0f1baef.tar.xz
maint: avoid gcc warning about missing attributes
* src/prog-fprintf.h (prog_fprintf): Declare with printf attribute. * src/system.h (usage): Declare with the "noreturn" attribute.
-rw-r--r--src/prog-fprintf.h5
-rw-r--r--src/system.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/prog-fprintf.h b/src/prog-fprintf.h
index d5c3d425a..98029ab9c 100644
--- a/src/prog-fprintf.h
+++ b/src/prog-fprintf.h
@@ -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
diff --git a/src/system.h b/src/system.h
index 990be0c69..ba74da448 100644
--- a/src/system.h
+++ b/src/system.h
@@ -655,4 +655,4 @@ bad_cast (char const *s)
return (char *) s;
}
-void usage (int status);
+void usage (int status) ATTRIBUTE_NORETURN;