From ebfbdf9f0e53d5eb8e6a1c85d825a1a9f0f1baef Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 14 Feb 2009 11:22:22 +0100 Subject: [PATCH] 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. --- src/prog-fprintf.h | 5 +++-- src/system.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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; -- 2.47.2