# HG changeset patch # User Jim Meyering # Date 1388798247 28800 # Node ID 6c3a5469bbfc8bee6dee9ecb664b52590f590b7f # Parent 31d5dfacc483947945d2ecac1985156589ee8943 freadable, fwritable, fwriting: declare with the "pure" attribute * lib/freadable.h (freadable): Declare with the "pure" attribute. * lib/fwritable.h (fwritable): Likewise. * lib/fwriting.h (fwriting): Likewise. Suggested by Bruno Haible. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2014-01-03 Jim Meyering + freadable, fwritable, fwriting: declare with the "pure" attribute + * lib/freadable.h (freadable): Declare with the "pure" attribute. + * lib/fwritable.h (fwritable): Likewise. + * lib/fwriting.h (fwriting): Likewise. + Suggested by Bruno Haible. + maint.mk: adapt openat.h-include-without-use test * top/maint.mk (sc_prohibit_openat_without_use): Also check for FCHMODAT_INLINE, FCHOWNAT_INLINE and STATAT_INLINE, to avoid diff --git a/lib/freadable.h b/lib/freadable.h --- a/lib/freadable.h +++ b/lib/freadable.h @@ -33,7 +33,7 @@ extern "C" { # endif -extern bool freadable (FILE *stream); +extern bool freadable (FILE *stream) _GL_ATTRIBUTE_PURE; # ifdef __cplusplus } diff --git a/lib/fwritable.h b/lib/fwritable.h --- a/lib/fwritable.h +++ b/lib/fwritable.h @@ -33,7 +33,7 @@ extern "C" { # endif -extern bool fwritable (FILE *stream); +extern bool fwritable (FILE *stream) _GL_ATTRIBUTE_PURE; # ifdef __cplusplus } diff --git a/lib/fwriting.h b/lib/fwriting.h --- a/lib/fwriting.h +++ b/lib/fwriting.h @@ -44,7 +44,7 @@ extern "C" { # endif -extern bool fwriting (FILE *stream); +extern bool fwriting (FILE *stream) _GL_ATTRIBUTE_PURE; # ifdef __cplusplus }