OpenSAF fails to build when using the GCC 7.1.1 compiler:
CC src/clm/apitest/bin_clmtest-tet_saClmDispatch.o src/clm/apitest/tet_ClmOiOps.c: In function ‘saClmOi_01’: src/clm/apitest/tet_ClmOiOps.c:30:65: error: ‘%s’ directive writing up to 255 bytes into a region of size 198 [-Werror=format-overflow=] "immcfg -a saClmNodeLockCallbackTimeout=4000000000 safNode=%s,safCluster=myClmCluster", ^~ node_name.value); ~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from src/clm/apitest/clmtest.h:21, from src/clm/apitest/tet_ClmOiOps.c:20: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 83 and 338 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/clm/apitest/tet_ClmOiOps.c: In function ‘saClmOi_02’: src/clm/apitest/tet_ClmOiOps.c:45:50: error: ‘%s’ directive writing up to 255 bytes into a region of size 213 [-Werror=format-overflow=] "immcfg -a saClmNodeDisableReboot=1 safNode=%s,safCluster=myClmCluster", ^~ node_name.value); ~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from src/clm/apitest/clmtest.h:21, from src/clm/apitest/tet_ClmOiOps.c:20: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 68 and 323 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/clm/apitest/tet_ClmOiOps.c: In function ‘saClmOi_03’: src/clm/apitest/tet_ClmOiOps.c:59:50: error: ‘%s’ directive writing up to 255 bytes into a region of size 213 [-Werror=format-overflow=] "immcfg -a saClmNodeAddressFamily=2 safNode=%s,safCluster=myClmCluster", ^~ node_name.value); ~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from src/clm/apitest/clmtest.h:21, from src/clm/apitest/tet_ClmOiOps.c:20: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 68 and 323 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/clm/apitest/tet_ClmOiOps.c: In function ‘saClmOi_04’: src/clm/apitest/tet_ClmOiOps.c:73:58: error: ‘%s’ directive writing up to 255 bytes into a region of size 205 [-Werror=format-overflow=] "immcfg -a saClmNodeAddress=10.130.100.186 safNode=%s,safCluster=myClmCluster", ^~ node_name.value); ~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from src/clm/apitest/clmtest.h:21, from src/clm/apitest/tet_ClmOiOps.c:20: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 76 and 331 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/clm/apitest/tet_ClmOiOps.c: In function ‘saClmOi_05’: src/clm/apitest/tet_ClmOiOps.c:87:37: error: ‘%s’ directive writing up to 255 bytes into a region of size 225 [-Werror=format-overflow=] "immcfg -a saClmNodeEE=%s safNode=%s,safCluster=myClmCluster", ^~ new_eename, node_name.value); ~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from src/clm/apitest/clmtest.h:21, from src/clm/apitest/tet_ClmOiOps.c:20: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output 56 or more bytes (assuming 311) into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/clm/apitest/tet_ClmOiOps.c: In function ‘saClmOi_06’: src/clm/apitest/tet_ClmOiOps.c:98:39: error: ‘%s’ directive writing up to 255 bytes into a region of size 237 [-Werror=format-overflow=] sprintf(command, "immcfg -d safNode=%s,safCluster=myClmCluster", ^~ node_name.value); ~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from src/clm/apitest/clmtest.h:21, from src/clm/apitest/tet_ClmOiOps.c:20: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 44 and 299 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:11779: src/clm/apitest/bin_clmtest-tet_ClmOiOps.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/home/opensaf/no-backup/git/opensaf-code' CC src/clm/apitest/bin_clmtest-tet_ClmLongRdn.o In file included from src/clm/apitest/clmtest.h:26:0, from src/clm/apitest/tet_ClmLongRdn.c:25: src/clm/apitest/tet_ClmLongRdn.c: In function ‘unlock_node’: src/clm/apitest/tet_ClmLongRdn.c:215:9: error: suggest parentheses around assignment used as truth value [-Werror=parentheses] assert(rc = system(command) != -1); ^ src/clm/apitest/tet_ClmLongRdn.c: In function ‘lock_node’: src/clm/apitest/tet_ClmLongRdn.c:224:9: error: suggest parentheses around assignment used as truth value [-Werror=parentheses] assert(rc = system(command) != -1); ^ src/clm/apitest/tet_ClmLongRdn.c: In function ‘remove_node’: src/clm/apitest/tet_ClmLongRdn.c:234:9: error: suggest parentheses around assignment used as truth value [-Werror=parentheses] assert(rc = system(command) != -1); ^ cc1: all warnings being treated as errors make[2]: *** [Makefile:11835: src/clm/apitest/bin_clmtest-tet_ClmLongRdn.o] Error 1 CC src/imm/apitest/implementer/bin_immoitest-test_saImmOiRtObjectCreate_2.o src/imm/apitest/implementer/test_saImmOiRtObjectCreate_2.c: In function ‘saImmOiRtObjectCreate_2_constructor’: src/imm/apitest/implementer/test_saImmOiRtObjectCreate_2.c:275:29: error: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Werror=format-overflow=] dnObj1.length = (SaUint16T)sprintf((char *)dnObj1.value, "%s,%s", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rdnObj1.value, rootObj.value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from ./src/imm/apitest/immtest.h:21, from src/imm/apitest/implementer/test_saImmOiRtObjectCreate_2.c:18: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 2 and 512 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/imm/apitest/implementer/test_saImmOiRtObjectCreate_2.c:277:29: error: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Werror=format-overflow=] dnObj2.length = (SaUint16T)sprintf((char *)dnObj2.value, "%s,%s", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rdnObj2.value, rootObj.value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from ./src/imm/apitest/immtest.h:21, from src/imm/apitest/implementer/test_saImmOiRtObjectCreate_2.c:18: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 2 and 512 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:12059: src/imm/apitest/implementer/bin_immoitest-test_saImmOiRtObjectCreate_2.o] Error 1 CC src/imm/apitest/implementer/bin_immoitest-test_SaImmOiCcb.o src/imm/apitest/implementer/test_SaImmOiCcb.c: In function ‘objectImplementerThreadMain’: src/imm/apitest/implementer/test_SaImmOiCcb.c:195:19: error: ‘%s’ directive writing up to 255 bytes into a region of size 228 [-Werror=format-overflow=] sprintf(buf, "%s_%s", __FUNCTION__, objectName->value); ^~ In file included from /usr/include/stdio.h:939:0, from ./src/imm/apitest/immtest.h:21, from src/imm/apitest/implementer/test_SaImmOiCcb.c:21: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 29 and 284 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/imm/apitest/implementer/test_SaImmOiCcb.c: In function ‘saImmOiCcb_constructor’: src/imm/apitest/implementer/test_SaImmOiCcb.c:819:29: error: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Werror=format-overflow=] dnObj1.length = (SaUint16T)sprintf((char *)dnObj1.value, "%s,%s", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rdnObj1.value, rootObj.value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from ./src/imm/apitest/immtest.h:21, from src/imm/apitest/implementer/test_SaImmOiCcb.c:21: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 2 and 512 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/imm/apitest/implementer/test_SaImmOiCcb.c:821:29: error: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Werror=format-overflow=] dnObj2.length = (SaUint16T)sprintf((char *)dnObj2.value, "%s,%s", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rdnObj2.value, rootObj.value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from ./src/imm/apitest/immtest.h:21, from src/imm/apitest/implementer/test_SaImmOiCcb.c:21: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 2 and 512 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/imm/apitest/implementer/test_SaImmOiCcb.c:823:29: error: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Werror=format-overflow=] dnObj3.length = (SaUint16T)sprintf((char *)dnObj3.value, "%s,%s", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rdnObj3.value, rootObj.value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from ./src/imm/apitest/immtest.h:21, from src/imm/apitest/implementer/test_SaImmOiCcb.c:21: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 2 and 512 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:12115: src/imm/apitest/implementer/bin_immoitest-test_SaImmOiCcb.o] Error 1 CC src/imm/apitest/management/bin_immomtest-test_saImmOmCcbObjectDelete.o src/imm/apitest/management/test_saImmOmCcbObjectDelete.c: In function ‘saImmOmCcbObjectDelete_constructor’: src/imm/apitest/management/test_saImmOmCcbObjectDelete.c:798:29: error: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Werror=format-overflow=] dnObj1.length = (SaUint16T)sprintf((char *)dnObj1.value, "%s,%s", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rdnObj1.value, rootObj.value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from ./src/imm/apitest/immtest.h:21, from src/imm/apitest/management/test_saImmOmCcbObjectDelete.c:18: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 2 and 512 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/imm/apitest/management/test_saImmOmCcbObjectDelete.c:800:29: error: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Werror=format-overflow=] dnObj2.length = (SaUint16T)sprintf((char *)dnObj2.value, "%s,%s", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rdnObj2.value, rootObj.value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from ./src/imm/apitest/immtest.h:21, from src/imm/apitest/management/test_saImmOmCcbObjectDelete.c:18: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 2 and 512 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:12493: src/imm/apitest/management/bin_immomtest-test_saImmOmCcbObjectDelete.o] Error 1 CC src/imm/apitest/management/bin_immomtest-test_saImmOmCcbObjectModify_2.o src/imm/apitest/management/test_saImmOmCcbObjectModify_2.c: In function ‘saImmOmCcbObjectModify_2_constructor’: src/imm/apitest/management/test_saImmOmCcbObjectModify_2.c:1442:29: error: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Werror=format-overflow=] dnObj1.length = (SaUint16T)sprintf((char *)dnObj1.value, "%s,%s", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rdnObj1.value, rootObj.value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from ./src/imm/apitest/immtest.h:21, from src/imm/apitest/management/test_saImmOmCcbObjectModify_2.c:18: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 2 and 512 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/imm/apitest/management/test_saImmOmCcbObjectModify_2.c:1444:29: error: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Werror=format-overflow=] dnObj2.length = (SaUint16T)sprintf((char *)dnObj2.value, "%s,%s", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rdnObj2.value, rootObj.value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from ./src/imm/apitest/immtest.h:21, from src/imm/apitest/management/test_saImmOmCcbObjectModify_2.c:18: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 2 and 512 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:12507: src/imm/apitest/management/bin_immomtest-test_saImmOmCcbObjectModify_2.o] Error 1 CC src/ntf/apitest/bin_ntftest-tet_longDnObject_notification.o src/ntf/apitest/tet_longDnObject_notification.c: In function ‘getVal’: src/ntf/apitest/tet_longDnObject_notification.c:111:19: error: ‘%s’ directive writing up to 255 bytes into a region of size 244 [-Werror=format-overflow=] "immlist -a %s %s " ^~ In file included from /usr/include/stdio.h:939:0, from src/ntf/apitest/tet_ntf.h:20, from src/ntf/apitest/tet_longDnObject_notification.c:25: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output 40 or more bytes (assuming 295) into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ntf/apitest/tet_longDnObject_notification.c: In function ‘setVal’: src/ntf/apitest/tet_longDnObject_notification.c:153:30: error: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Werror=format-overflow=] sprintf(command, "immcfg %s %s", format, info->dn); ^~ In file included from /usr/include/stdio.h:939:0, from src/ntf/apitest/tet_ntf.h:20, from src/ntf/apitest/tet_longDnObject_notification.c:25: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output 9 or more bytes (assuming 264) into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:13515: src/ntf/apitest/bin_ntftest-tet_longDnObject_notification.o] Error 1 CXX src/amf/amfd/bin_osafamfd-imm.o src/amf/amfd/imm.cc: In member function ‘bool ImmObjCreate::immobj_update_required()’: src/amf/amfd/imm.cc:2309:28: error: unused variable ‘pos’ [-Werror=unused-variable] std::string::size_type pos; ^~~ src/amf/amfd/imm.cc:2350:28: error: unused variable ‘pos’ [-Werror=unused-variable] std::string::size_type pos; ^~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:17081: src/amf/amfd/bin_osafamfd-imm.o] Error 1 CC src/clm/clmd/bin_osafclmd-clms_imm.o src/clm/clmd/clms_imm.c: In function ‘clms_imm_ccb_obj_create_callback’: src/clm/clmd/clms_imm.c:1698:22: error: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Werror=format-overflow=] (SaUint16T)sprintf( ^~~~~~~~ (char *)operation ~~~~~~~~~~~~~~~~~ ->objectName.value, ~~~~~~~~~~~~~~~~~~~ "%s,%s", rdnVal, ~~~~~~~~~~~~~~~~ parentName->value); ~~~~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:939:0, from ./src/base/os_defs.h:38, from ./src/base/ncs_osprm.h:193, from ./src/base/ncs_lib.h:39, from src/clm/clmd/clms.h:39, from src/clm/clmd/clms_imm.c:21: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output 2 or more bytes (assuming 257) into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:13907: src/clm/clmd/bin_osafclmd-clms_imm.o] Error 1 CC src/clm/clmd/bin_osafclmd-clms_ntf.o src/clm/clmd/clms_ntf.c: In function ‘clms_node_join_ntf’: src/clm/clmd/clms_ntf.c:162:41: error: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Werror=format-overflow=] sprintf((SaInt8T *)add_text, "CLM node %s Joined", dn.value); ^~ ~~ In file included from /usr/include/stdio.h:939:0, from ./src/base/os_defs.h:38, from ./src/base/ncs_osprm.h:193, from ./src/base/ncs_lib.h:39, from src/clm/clmd/clms.h:39, from src/clm/clmd/clms_ntf.c:18: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 17 and 272 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/clm/clmd/clms_ntf.c: In function ‘clms_node_exit_ntf’: src/clm/clmd/clms_ntf.c:198:41: error: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Werror=format-overflow=] sprintf((SaInt8T *)add_text, "CLM node %s Exit", dn.value); ^~ ~~ In file included from /usr/include/stdio.h:939:0, from ./src/base/os_defs.h:38, from ./src/base/ncs_osprm.h:193, from ./src/base/ncs_lib.h:39, from src/clm/clmd/clms.h:39, from src/clm/clmd/clms_ntf.c:18: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 15 and 270 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/clm/clmd/clms_ntf.c: In function ‘clms_node_reconfigured_ntf’: src/clm/clmd/clms_ntf.c:232:41: error: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Werror=format-overflow=] sprintf((SaInt8T *)add_text, "CLM node %s Reconfigured", dn.value); ^~ ~~ In file included from /usr/include/stdio.h:939:0, from ./src/base/os_defs.h:38, from ./src/base/ncs_osprm.h:193, from ./src/base/ncs_lib.h:39, from src/clm/clmd/clms.h:39, from src/clm/clmd/clms_ntf.c:18: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 23 and 278 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/clm/clmd/clms_ntf.c: In function ‘clms_node_admin_state_change_ntf’: src/clm/clmd/clms_ntf.c:270:41: error: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Werror=format-overflow=] sprintf((SaInt8T *)add_text, "CLM node %s Admin State Change", ^~ dn.value); ~~ In file included from /usr/include/stdio.h:939:0, from ./src/base/os_defs.h:38, from ./src/base/ncs_osprm.h:193, from ./src/base/ncs_lib.h:39, from src/clm/clmd/clms.h:39, from src/clm/clmd/clms_ntf.c:18: /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 29 and 284 bytes into a destination of size 256 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:13963: src/clm/clmd/bin_osafclmd-clms_ntf.o] Error 1
Branch: develop
osaf: Fix build problems when using GCC 7.1.1 [#2502]
Fix build problems caused by the following warnings:
By Anders Widell on 06/29/2017 06:44
View Changes
Branch: release
osaf: Fix build problems when using GCC 7.1.1 [#2502]
Fix build problems caused by the following warnings:
By Anders Widell on 06/29/2017 06:44
View Changes
Related
Tickets:
#2502