From: Jim Meyering Date: Tue, 6 Sep 2016 04:40:57 +0000 (-0700) Subject: getprogname.h: declare with _GL_ATTRIBUTE_PURE, when required X-Git-Tag: v1.0~6658 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=7a10276e59a05f4176464e0fbadc3f743c8ed244;p=gnulib.git getprogname.h: declare with _GL_ATTRIBUTE_PURE, when required * lib/getprogname.h (getprogname) [HAVE_DECL_PROGRAM_INVOCATION_NAME]: Declare with _GL_ATTRIBUTE_PURE, to avoid warning from gcc's -Wsuggest-attribute=pure --- diff --git a/lib/getprogname.h b/lib/getprogname.h index b21e4232b5..1887261d2f 100644 --- a/lib/getprogname.h +++ b/lib/getprogname.h @@ -24,7 +24,11 @@ extern "C" { #endif #ifndef HAVE_GETPROGNAME -extern const char *getprogname (void); +extern const char *getprogname (void) +# ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME + _GL_ATTRIBUTE_PURE +# endif + ; #endif #ifdef __cplusplus