From: Jim Meyering Date: Sat, 14 Feb 2009 10:22:22 +0000 (+0100) Subject: maint: avoid gcc warning about missing attributes X-Git-Tag: v7.2~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ebfbdf9f0e53d5eb8e6a1c85d825a1a9f0f1baef;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/src/prog-fprintf.h b/src/prog-fprintf.h index d5c3d425a5..98029ab9ce 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 -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 990be0c693..ba74da448e 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;