]> Savannah Git Hosting - gnulib.git/commitdiff
crypto/gc: fix build failure with -Werror=suggest-attribute=const
authorJia Zhang <qianyue.zj@alibaba-inc.com>
Sat, 28 Oct 2017 14:05:31 +0000 (10:05 -0400)
committerBruno Haible <bruno@clisp.org>
Sun, 29 Oct 2017 08:23:50 +0000 (09:23 +0100)
* lib/gc.h (gc_hash_digest_length): Mark with 'const' attribute.

ChangeLog
lib/gc.h

index 7523b34d3c0a61b7fe3ab9ecf5077b9e5b863e53..e342dd2a3433c459ffb56a806f9dfaa3387c4205 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-10-29  Jia Zhang  <qianyue.zj@alibaba-inc.com>
+            Bruno Haible  <bruno@clisp.org>
+
+       crypto/gc: fix build failure with -Werror=suggest-attribute=const
+       * lib/gc.h (gc_hash_digest_length): Mark with 'const' attribute.
+
 2017-10-29  Jia Zhang  <qianyue.zj@alibaba-inc.com>
 
        New module: crypto/gc-sm3
index e65ba49a34dee07abf8402eb77de4fe7b40981ce..00e29e135e561679af17b60645bf3c17ffebdf06 100644 (file)
--- a/lib/gc.h
+++ b/lib/gc.h
@@ -136,7 +136,8 @@ extern Gc_rc gc_cipher_close (gc_cipher_handle handle);
 extern Gc_rc gc_hash_open (Gc_hash hash, Gc_hash_mode mode,
                            gc_hash_handle *outhandle);
 extern Gc_rc gc_hash_clone (gc_hash_handle handle, gc_hash_handle *outhandle);
-extern size_t gc_hash_digest_length (Gc_hash hash);
+extern size_t gc_hash_digest_length (Gc_hash hash)
+                                     _GL_ATTRIBUTE_CONST;
 extern void gc_hash_hmac_setkey (gc_hash_handle handle,
                                  size_t len, const char *key);
 extern void gc_hash_write (gc_hash_handle handle,