From bcb6e934bbca30d8dfa1e2356fb4eece1668a276 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 29 Oct 2017 09:37:12 +0100 Subject: [PATCH] crypto/*: Verify that the header file is self-contained. * tests/test-gc-*.c: Include the module's header file immediately after . * tests/test-hmac-*.c: Likewise. * tests/test-arcfour.c: Likewise. * tests/test-arctwo.c: Likewise. * tests/test-des.c: Likewise. * tests/test-md2.c: Likewise. * tests/test-md4.c: Likewise. * tests/test-md5.c: Likewise. * tests/test-rijndael.c: Likewise. * tests/test-sha1.c: Likewise. * tests/test-sm3.c: Likewise. --- ChangeLog | 16 ++++++++++++++++ tests/test-arcfour.c | 3 ++- tests/test-arctwo.c | 3 ++- tests/test-des.c | 4 ++-- tests/test-gc-arcfour.c | 3 ++- tests/test-gc-arctwo.c | 3 ++- tests/test-gc-des.c | 3 ++- tests/test-gc-hmac-md5.c | 3 ++- tests/test-gc-hmac-sha1.c | 3 ++- tests/test-gc-hmac-sha256.c | 3 ++- tests/test-gc-hmac-sha512.c | 3 ++- tests/test-gc-md2.c | 3 ++- tests/test-gc-md4.c | 3 ++- tests/test-gc-md5.c | 3 ++- tests/test-gc-rijndael.c | 3 ++- tests/test-gc-sha1.c | 3 ++- tests/test-gc-sm3.c | 3 ++- tests/test-gc.c | 3 ++- tests/test-hmac-md5.c | 3 ++- tests/test-hmac-sha1.c | 3 ++- tests/test-hmac-sha256.c | 3 ++- tests/test-hmac-sha512.c | 3 ++- tests/test-md2.c | 4 ++-- tests/test-md4.c | 4 ++-- tests/test-md5.c | 4 ++-- tests/test-rijndael.c | 3 ++- tests/test-sha1.c | 4 ++-- tests/test-sm3.c | 4 ++-- 28 files changed, 70 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index e342dd2a34..a07ef22c3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2017-10-29 Bruno Haible + + crypto/*: Verify that the header file is self-contained. + * tests/test-gc-*.c: Include the module's header file immediately after + . + * tests/test-hmac-*.c: Likewise. + * tests/test-arcfour.c: Likewise. + * tests/test-arctwo.c: Likewise. + * tests/test-des.c: Likewise. + * tests/test-md2.c: Likewise. + * tests/test-md4.c: Likewise. + * tests/test-md5.c: Likewise. + * tests/test-rijndael.c: Likewise. + * tests/test-sha1.c: Likewise. + * tests/test-sm3.c: Likewise. + 2017-10-29 Jia Zhang Bruno Haible diff --git a/tests/test-arcfour.c b/tests/test-arcfour.c index 75f979de40..101094aec2 100644 --- a/tests/test-arcfour.c +++ b/tests/test-arcfour.c @@ -17,9 +17,10 @@ #include +#include "arcfour.h" + #include #include -#include "arcfour.h" int main (int argc, char *argv[]) diff --git a/tests/test-arctwo.c b/tests/test-arctwo.c index d01ce3a5c4..376ec867a5 100644 --- a/tests/test-arctwo.c +++ b/tests/test-arctwo.c @@ -17,9 +17,10 @@ #include +#include "arctwo.h" + #include #include -#include "arctwo.h" int main (int argc, char *argv[]) diff --git a/tests/test-des.c b/tests/test-des.c index 4fe2958f90..666e466efe 100644 --- a/tests/test-des.c +++ b/tests/test-des.c @@ -19,11 +19,11 @@ #include +#include "des.h" + #include #include -#include "des.h" - int main (int argc, char *argv[]) { diff --git a/tests/test-gc-arcfour.c b/tests/test-gc-arcfour.c index 75a5712bdd..0900a2de1f 100644 --- a/tests/test-gc-arcfour.c +++ b/tests/test-gc-arcfour.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc-arctwo.c b/tests/test-gc-arctwo.c index f41d107017..9ad27e14b4 100644 --- a/tests/test-gc-arctwo.c +++ b/tests/test-gc-arctwo.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc-des.c b/tests/test-gc-des.c index 9c49f93668..f6d302c3e8 100644 --- a/tests/test-gc-des.c +++ b/tests/test-gc-des.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc-hmac-md5.c b/tests/test-gc-hmac-md5.c index 5b0371382d..71b0cde203 100644 --- a/tests/test-gc-hmac-md5.c +++ b/tests/test-gc-hmac-md5.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc-hmac-sha1.c b/tests/test-gc-hmac-sha1.c index 16e0d10e5f..a4a47cc9d7 100644 --- a/tests/test-gc-hmac-sha1.c +++ b/tests/test-gc-hmac-sha1.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc-hmac-sha256.c b/tests/test-gc-hmac-sha256.c index e61c50e52a..86d9f641ab 100644 --- a/tests/test-gc-hmac-sha256.c +++ b/tests/test-gc-hmac-sha256.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc-hmac-sha512.c b/tests/test-gc-hmac-sha512.c index 5121233c74..97624f3942 100644 --- a/tests/test-gc-hmac-sha512.c +++ b/tests/test-gc-hmac-sha512.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc-md2.c b/tests/test-gc-md2.c index 3dd9c3da3f..9b9f9a1ad0 100644 --- a/tests/test-gc-md2.c +++ b/tests/test-gc-md2.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc-md4.c b/tests/test-gc-md4.c index 5830b30061..51bd8a3ccb 100644 --- a/tests/test-gc-md4.c +++ b/tests/test-gc-md4.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc-md5.c b/tests/test-gc-md5.c index ca277afd60..66ac94bb63 100644 --- a/tests/test-gc-md5.c +++ b/tests/test-gc-md5.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc-rijndael.c b/tests/test-gc-rijndael.c index dc60513ffb..2c1796ecb9 100644 --- a/tests/test-gc-rijndael.c +++ b/tests/test-gc-rijndael.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc-sha1.c b/tests/test-gc-sha1.c index 75c0e02a1a..2b5b6157b4 100644 --- a/tests/test-gc-sha1.c +++ b/tests/test-gc-sha1.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc-sm3.c b/tests/test-gc-sm3.c index 608725d0b2..9252224f60 100644 --- a/tests/test-gc-sm3.c +++ b/tests/test-gc-sm3.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-gc.c b/tests/test-gc.c index e679a88596..000ba015d5 100644 --- a/tests/test-gc.c +++ b/tests/test-gc.c @@ -17,9 +17,10 @@ #include +#include "gc.h" + #include #include -#include "gc.h" int main (int argc, char *argv[]) diff --git a/tests/test-hmac-md5.c b/tests/test-hmac-md5.c index 246fcd4951..55f2c7e3ae 100644 --- a/tests/test-hmac-md5.c +++ b/tests/test-hmac-md5.c @@ -18,9 +18,10 @@ #include +#include "hmac.h" + #include #include -#include "hmac.h" /* Test vectors from RFC 2104. */ diff --git a/tests/test-hmac-sha1.c b/tests/test-hmac-sha1.c index 149aa333d8..a27bea7bf3 100644 --- a/tests/test-hmac-sha1.c +++ b/tests/test-hmac-sha1.c @@ -18,9 +18,10 @@ #include +#include "hmac.h" + #include #include -#include "hmac.h" int main (int argc, char *argv[]) diff --git a/tests/test-hmac-sha256.c b/tests/test-hmac-sha256.c index aeaa7cccff..c0ec4fe631 100644 --- a/tests/test-hmac-sha256.c +++ b/tests/test-hmac-sha256.c @@ -18,9 +18,10 @@ #include +#include "hmac.h" + #include #include -#include "hmac.h" int main (int argc, char *argv[]) diff --git a/tests/test-hmac-sha512.c b/tests/test-hmac-sha512.c index 88efb4c083..c09620d747 100644 --- a/tests/test-hmac-sha512.c +++ b/tests/test-hmac-sha512.c @@ -18,9 +18,10 @@ #include +#include "hmac.h" + #include #include -#include "hmac.h" int main (int argc, char *argv[]) diff --git a/tests/test-md2.c b/tests/test-md2.c index 9cdf4dbf28..e874939df8 100644 --- a/tests/test-md2.c +++ b/tests/test-md2.c @@ -18,11 +18,11 @@ #include +#include "md2.h" + #include #include -#include "md2.h" - int main (int argc, char *argv[]) { diff --git a/tests/test-md4.c b/tests/test-md4.c index 67d1ed2992..d07872075a 100644 --- a/tests/test-md4.c +++ b/tests/test-md4.c @@ -19,11 +19,11 @@ #include +#include "md4.h" + #include #include -#include "md4.h" - int main (int argc, char *argv[]) { diff --git a/tests/test-md5.c b/tests/test-md5.c index 19bb6a3863..9d2d697bd0 100644 --- a/tests/test-md5.c +++ b/tests/test-md5.c @@ -19,11 +19,11 @@ #include +#include "md5.h" + #include #include -#include "md5.h" - int main (void) { diff --git a/tests/test-rijndael.c b/tests/test-rijndael.c index 4f64927a2d..cd95533e77 100644 --- a/tests/test-rijndael.c +++ b/tests/test-rijndael.c @@ -17,9 +17,10 @@ #include +#include "rijndael-api-fst.h" + #include #include -#include "rijndael-api-fst.h" int main (int argc, char *argv[]) diff --git a/tests/test-sha1.c b/tests/test-sha1.c index 6f10482f81..4e7b352a58 100644 --- a/tests/test-sha1.c +++ b/tests/test-sha1.c @@ -17,11 +17,11 @@ #include +#include "sha1.h" + #include #include -#include "sha1.h" - int main (void) { diff --git a/tests/test-sm3.c b/tests/test-sm3.c index 99c19452bc..179d72bc56 100644 --- a/tests/test-sm3.c +++ b/tests/test-sm3.c @@ -17,11 +17,11 @@ #include +#include "sm3.h" + #include #include -#include "sm3.h" - static int test (const char *in, const char *out) { -- 2.39.5