]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Configure gcc:pkcs11 CI job with "--disable-warn-error"
authorMichal Nowak <mnowak@isc.org>
Thu, 2 Dec 2021 12:50:30 +0000 (13:50 +0100)
committerMichal Nowak <mnowak@isc.org>
Tue, 14 Dec 2021 11:12:40 +0000 (12:12 +0100)
"--disable-warn-error" ./configure option disables compiler warnings.
This ensures that the job will not fail because of warnings (e.g., array
inconsistencies in lib/isc/sha2.c) we don't want to fix on BIND 9.11
because the version is in security-fixes-only mode.

    sha2.c:310:26: error: argument 1 of type 'uint8_t[]' {aka 'unsigned char[]'} with mismatched bound [-Werror=array-parameter=]
      310 | isc_sha224_final(uint8_t digest[], isc_sha224_t *context) {
          |                  ~~~~~~~~^~~~~~~~
    In file included from sha2.c:58:
    ./include/isc/sha2.h:132:24: note: previously declared as 'uint8_t[28]' {aka 'unsigned char[28]'}
      132 | void isc_sha224_final (uint8_t[ISC_SHA224_DIGESTLENGTH], isc_sha224_t *);
          |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sha2.c:376:26: error: argument 1 of type 'uint8_t[]' {aka 'unsigned char[]'} with mismatched bound [-Werror=array-parameter=]
      376 | isc_sha256_final(uint8_t digest[], isc_sha256_t *context) {
          |                  ~~~~~~~~^~~~~~~~
    In file included from sha2.c:58:
    ./include/isc/sha2.h:139:24: note: previously declared as 'uint8_t[32]' {aka 'unsigned char[32]'}
      139 | void isc_sha256_final (uint8_t[ISC_SHA256_DIGESTLENGTH], isc_sha256_t *);
          |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sha2.c:442:26: error: argument 1 of type 'uint8_t[]' {aka 'unsigned char[]'} with mismatched bound [-Werror=array-parameter=]
      442 | isc_sha512_final(uint8_t digest[], isc_sha512_t *context) {
          |                  ~~~~~~~~^~~~~~~~
    In file included from sha2.c:58:
    ./include/isc/sha2.h:153:24: note: previously declared as 'uint8_t[64]' {aka 'unsigned char[64]'}
      153 | void isc_sha512_final (uint8_t[ISC_SHA512_DIGESTLENGTH], isc_sha512_t *);
          |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sha2.c:508:26: error: argument 1 of type 'uint8_t[]' {aka 'unsigned char[]'} with mismatched bound [-Werror=array-parameter=]
      508 | isc_sha384_final(uint8_t digest[], isc_sha384_t *context) {
          |                  ~~~~~~~~^~~~~~~~
    In file included from sha2.c:58:
    ./include/isc/sha2.h:146:24: note: previously declared as 'uint8_t[48]' {aka 'unsigned char[48]'}
      146 | void isc_sha384_final (uint8_t[ISC_SHA384_DIGESTLENGTH], isc_sha384_t *);
          |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.gitlab-ci.yml

index beb114a9c11d18c24a866f070e829e1947c5daf4..be773af7a4a6dfe744be046a6c3bf2ff1cd5ef50 100644 (file)
@@ -1170,11 +1170,15 @@ unit:clang:buster:amd64:
 
 # Jobs for PKCS#11-enabled GCC builds on Fedora 34 (amd64)
 
+# "--disable-warn-error" ./configure option disables compiler warnings. This
+# ensures that the job will not fail because of warnings (e.g., array
+# inconsistencies in lib/isc/sha2.c) we don't want to fix on BIND 9.11 because
+# the version is in security-fixes-only mode.
 gcc:pkcs11:
   variables:
     CC: gcc
     CFLAGS: "${CFLAGS_COMMON}"
-    EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib64/pkcs11/libsofthsm2.so"
+    EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib64/pkcs11/libsofthsm2.so --disable-warn-error"
   <<: *fedora_34_amd64_image
   <<: *build_job