Small diff to remove two commas from gcrypt.h.in which cause warnings with -pedantic
Opal Raava
opalraava at hushmail.com
Thu Mar 19 05:00:06 CET 2015
Hi all,
This is my first post to the mailing list, so I hope I'm doing things right.
I pulled the latest libgcrypt from the git and compiled an example program with it. I used gcc -Wpedantic to compile it, and I get two warnings. For a header so public as gcrypt.h it would sure be nice if people can compile it with -Wall -pedantic without complaints from the compiler.
The warnings are about comma's at the end of enumerator lists. Here is the output:
---
In file included from pubkey_example.c:27:0:
/usr/include/gcrypt.h:514:32: warning: comma at end of enumerator list [-Wpedantic]
GCRYMPI_FLAG_USER4 = 0x0800,/* User flag 4. */
^
/usr/include/gcrypt.h:1375:29: warning: comma at end of enumerator list [-Wpedantic]
GCRY_MAC_FLAG_SECURE = 1, /* Allocate all buffers in "secure" memory. */
^
---
To remove the commas I made a small git diff that removes them. I hope this humble change in 'gcrypt.h.in' will make it through:)
Thanks,
--Opal
diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in
index 10099e1..cac2b49 100644
--- a/src/gcrypt.h.in
+++ b/src/gcrypt.h.in
@@ -511,7 +511,7 @@ enum gcry_mpi_flag
GCRYMPI_FLAG_USER1 = 0x0100,/* User flag 1. */
GCRYMPI_FLAG_USER2 = 0x0200,/* User flag 2. */
GCRYMPI_FLAG_USER3 = 0x0400,/* User flag 3. */
- GCRYMPI_FLAG_USER4 = 0x0800,/* User flag 4. */
+ GCRYMPI_FLAG_USER4 = 0x0800 /* User flag 4. */
};
@@ -1372,7 +1372,7 @@ enum gcry_mac_algos
/* Flags used with the open function. */
enum gcry_mac_flags
{
- GCRY_MAC_FLAG_SECURE = 1, /* Allocate all buffers in "secure" memory. */
+ GCRY_MAC_FLAG_SECURE = 1 /* Allocate all buffers in "secure" memory. */
};
/* Create a MAC handle for algorithm ALGO. FLAGS may be given as an bitwise OR
More information about the Gcrypt-devel
mailing list