changeset 18400:20e898a34a4e

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
author Jim Meyering <meyering@fb.com>
date Mon, 05 Sep 2016 21:40:57 -0700
parents 9fe24cb73aa5
children 23c452ef1bef
files lib/getprogname.h
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/getprogname.h	Thu Aug 18 15:18:25 2016 +0200
+++ b/lib/getprogname.h	Mon Sep 05 21:40:57 2016 -0700
@@ -24,7 +24,11 @@
 #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