- **Milestone**: 5.18.04 --> 5.18.12


---

** [tickets:#2501] plm: Build error when using GCC 7.1.1 and -O3 optimization**

**Status:** unassigned
**Milestone:** 5.18.12
**Created:** Mon Jun 19, 2017 01:22 PM UTC by Anders Widell
**Last Updated:** Fri Feb 02, 2018 12:17 PM UTC
**Owner:** nobody


The following compilation error is seen when using GCC 7.1.1 and -O3 
optimization level:

~~~
  CC       src/plm/plmd/bin_osafplmd-plms_plmc.o
src/plm/plmd/plms_mbcsv.c: In function ‘plms_edu_enc_trk_step_info_data’:
src/plm/plmd/plms_mbcsv.c:1013:2: error: ‘msg_hdr.data_len’ may be used 
uninitialized in this function [-Werror=maybe-uninitialized]
  ncs_encode_32bit(&pdata, header.data_len);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/plm/plmd/plms_mbcsv.c:1061:20: note: ‘msg_hdr.data_len’ was declared here
  PLMS_MBCSV_HEADER msg_hdr;
                    ^~~~~~~
src/plm/plmd/plms_mbcsv.c:1011:2: error: ‘msg_hdr’ may be used uninitialized in 
this function [-Werror=maybe-uninitialized]
  ncs_encode_32bit(&pdata, header.msg_type);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/plm/plmd/plms_mbcsv.c:1061:20: note: ‘msg_hdr’ was declared here
  PLMS_MBCSV_HEADER msg_hdr;
                    ^~~~~~~
  CC       src/plm/plmd/bin_osafplmd-plms_proc.o
src/plm/plmd/plms_mbcsv.c: In function ‘plms_edu_enc_entity_grp_info_data’:
src/plm/plmd/plms_mbcsv.c:1013:2: error: ‘msg_hdr.data_len’ may be used 
uninitialized in this function [-Werror=maybe-uninitialized]
  ncs_encode_32bit(&pdata, header.data_len);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/plm/plmd/plms_mbcsv.c:1294:20: note: ‘msg_hdr.data_len’ was declared here
  PLMS_MBCSV_HEADER msg_hdr;
                    ^~~~~~~
src/plm/plmd/plms_mbcsv.c: In function ‘plms_edu_enc_client_info_data’:
src/plm/plmd/plms_mbcsv.c:1013:2: error: ‘msg_hdr.data_len’ may be used 
uninitialized in this function [-Werror=maybe-uninitialized]
  ncs_encode_32bit(&pdata, header.data_len);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/plm/plmd/plms_mbcsv.c:1400:20: note: ‘msg_hdr.data_len’ was declared here
  PLMS_MBCSV_HEADER msg_hdr;
                    ^~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:15601: src/plm/plmd/bin_osafplmd-plms_mbcsv.o] Error 1

~~~


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to