#3606 Fail to build upstream code on RHEL-7 when using the GNULIB's compiler warnings as errors
Closed a year ago Opened 2 years ago by fidencio.

I've faced that only when building our code on RHEL-7.

/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c: In function 'sss_nss_getpwnam_timeout':
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:362:9: error: missing initializer for field 'buffer' of 'struct sss_nss_pw_rep' [-Werror=missing-field-initializers]
         .result.pwrep.buffer = buffer,
         ^
In file included from /var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:31:0:
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/nss_common.h:29:11: note: 'buffer' declared here
     char *buffer;
           ^
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:363:9: error: missing initializer for field 'buflen' of 'struct sss_nss_pw_rep' [-Werror=missing-field-initializers]
         .result.pwrep.buflen = buflen};
         ^
In file included from /var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:31:0:
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/nss_common.h:30:12: note: 'buflen' declared here
     size_t buflen;
            ^
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c: In function 'sss_nss_getpwuid_timeout':
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:395:9: error: missing initializer for field 'data' of 'struct sss_cli_req_data' [-Werror=missing-field-initializers]
         .rd.data = &req_data,
         ^
In file included from /var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:29:0:
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/sss_cli.h:364:17: note: 'data' declared here
     const void *data;
                 ^
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:397:9: error: missing initializer for field 'buffer' of 'struct sss_nss_pw_rep' [-Werror=missing-field-initializers]
         .result.pwrep.buffer = buffer,
         ^
In file included from /var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:31:0:
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/nss_common.h:29:11: note: 'buffer' declared here
     char *buffer;
           ^
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:398:9: error: missing initializer for field 'buflen' of 'struct sss_nss_pw_rep' [-Werror=missing-field-initializers]
         .result.pwrep.buflen = buflen};
         ^
In file included from /var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:31:0:
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/nss_common.h:30:12: note: 'buflen' declared here
     size_t buflen;
            ^
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c: In function 'sss_nss_getgrnam_timeout':
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:425:9: error: missing initializer for field 'buffer' of 'struct sss_nss_gr_rep' [-Werror=missing-field-initializers]
         .result.grrep.buffer = buffer,
         ^
In file included from /var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:31:0:
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/nss_common.h:38:11: note: 'buffer' declared here
     char *buffer;
           ^
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:426:9: error: missing initializer for field 'buflen' of 'struct sss_nss_gr_rep' [-Werror=missing-field-initializers]
         .result.grrep.buflen = buflen};
         ^
In file included from /var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:31:0:
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/nss_common.h:39:12: note: 'buflen' declared here
     size_t buflen;
            ^
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c: In function 'sss_nss_getgrgid_timeout':
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:457:9: error: missing initializer for field 'data' of 'struct sss_cli_req_data' [-Werror=missing-field-initializers]
         .rd.data = &req_data,
         ^
In file included from /var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:29:0:
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/sss_cli.h:364:17: note: 'data' declared here
     const void *data;
                 ^
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:459:9: error: missing initializer for field 'buffer' of 'struct sss_nss_gr_rep' [-Werror=missing-field-initializers]
         .result.grrep.buffer = buffer,
         ^
In file included from /var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:31:0:
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/nss_common.h:38:11: note: 'buffer' declared here
     char *buffer;
           ^
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:460:9: error: missing initializer for field 'buflen' of 'struct sss_nss_gr_rep' [-Werror=missing-field-initializers]
         .result.grrep.buflen = buflen};
         ^
In file included from /var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/idmap/sss_nss_ex.c:31:0:
/var/lib/jenkins/workspace/ci/label/rhel7/src/sss_client/nss_common.h:39:12: note: 'buflen' declared here
     size_t buflen;
            ^
cc1: all warnings being treated as errors
make[2]: *** [src/sss_client/idmap/sss_nss_ex.lo] Error 1

This issue was reported as part of the RFC for using GNULIB manywarnings on SSSD.
As the RFC has been closed (by myself) as rejected, I'm closing this issue as well.

Metadata Update from @fidencio:
- Issue status updated to: Closed (was: Open)

a year ago

Login to comment on this ticket.

Metadata