]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: give a new function the "pure" attribute
authorPádraig Brady <P@draigBrady.com>
Wed, 12 Jul 2023 19:34:47 +0000 (20:34 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 12 Jul 2023 19:41:00 +0000 (20:41 +0100)
* src/digest.c (problematic_chars): This recently introduced
function does not modify state so is pure, even though GCC 13.1 at least
did not warn about that attribute being appropriate.

src/digest.c

index 5490f96a49e1bf4b2e3ca1d36047fb5ca9cce349..e80eb3406a9b2c74bc531de076bba9c6fd9cccbd 100644 (file)
@@ -564,6 +564,7 @@ or equivalent standalone program.\
    that need escaping.  Note we escape '\' itself to provide some forward
    compat to introduce escaping of other characters.  */
 
+ATTRIBUTE_PURE
 static bool
 problematic_chars (char const *s)
 {