[MERGED] libosmocore[master]: abis_test.c: Fix warning appearing on some buggy gcc versions
Harald Welte has submitted this change and it was merged. Change subject: abis_test.c: Fix warning appearing on some buggy gcc versions .. abis_test.c: Fix warning appearing on some buggy gcc versions Change-Id: I31d5ffc0cf461d207d6c3d43aa0a25a5448d7000 --- M tests/abis/abis_test.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified Objections: Max: I would prefer this is not merged as is diff --git a/tests/abis/abis_test.c b/tests/abis/abis_test.c index a303c91..cb88b01 100644 --- a/tests/abis/abis_test.c +++ b/tests/abis/abis_test.c @@ -122,7 +122,8 @@ static inline void chk_raw(const char *what, const uint8_t *data, uint16_t len) { - struct abis_nm_sw_desc sw = { 0 }; + /* = { 0 } triggers a warning in some gcc versions due to a bug: gcc issue #53119 */ + struct abis_nm_sw_desc sw = { {0} }; int res = abis_nm_get_sw_conf(data, len, &sw, 1); uint16_t xlen = abis_nm_get_sw_desc_len(data, len); @@ -144,7 +145,8 @@ { int res; uint16_t len; - struct abis_nm_sw_desc sw = { 0 }, put = { + /* = { 0 } triggers a warning in some gcc versions due to a bug: gcc issue #53119 */ + struct abis_nm_sw_desc sw = { {0} }, put = { .file_id_len = strlen(f_id), .file_version_len = strlen(f_ver), }; -- To view, visit https://gerrit.osmocom.org/2955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I31d5ffc0cf461d207d6c3d43aa0a25a5448d7000 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy
libosmocore[master]: abis_test.c: Fix warning appearing on some buggy gcc versions
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31d5ffc0cf461d207d6c3d43aa0a25a5448d7000 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No
libosmocore[master]: abis_test.c: Fix warning appearing on some buggy gcc versions
Patch Set 1: I can confirm that the same warning appears when compiling with clang-4.0: warning: suggest braces around initialization of subobject [-Wmissing-braces] -- To view, visit https://gerrit.osmocom.org/2955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31d5ffc0cf461d207d6c3d43aa0a25a5448d7000 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No
libosmocore[master]: abis_test.c: Fix warning appearing on some buggy gcc versions
Patch Set 1: I created a new issue in redmine to track this problem so we don't need to fix further related issues. https://osmocom.org/issues/2332 -- To view, visit https://gerrit.osmocom.org/2955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31d5ffc0cf461d207d6c3d43aa0a25a5448d7000 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
libosmocore[master]: abis_test.c: Fix warning appearing on some buggy gcc versions
Patch Set 1: The point is having a build of libosmocore with -Wall and -Werror in order to have a clean build log and no new warnings. This is the only compiler bug with the current running jenkins setup, and it's not changing lots of stuff or behaviour, so I'd like this to go in so we can push the whole patchset and enable -Wall -Werror. -- To view, visit https://gerrit.osmocom.org/2955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31d5ffc0cf461d207d6c3d43aa0a25a5448d7000 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
libosmocore[master]: abis_test.c: Fix warning appearing on some buggy gcc versions
Patch Set 1: Code-Review-1 What's the point of accommodating for compiler bugs? There're too many of those to change the code for each one of them. The proper fix would be to update compiler to version which has this bug fixed. -- To view, visit https://gerrit.osmocom.org/2955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31d5ffc0cf461d207d6c3d43aa0a25a5448d7000 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No
[PATCH] libosmocore[master]: abis_test.c: Fix warning appearing on some buggy gcc versions
Review at https://gerrit.osmocom.org/2955 abis_test.c: Fix warning appearing on some buggy gcc versions Change-Id: I31d5ffc0cf461d207d6c3d43aa0a25a5448d7000 --- M tests/abis/abis_test.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/55/2955/1 diff --git a/tests/abis/abis_test.c b/tests/abis/abis_test.c index a303c91..cb88b01 100644 --- a/tests/abis/abis_test.c +++ b/tests/abis/abis_test.c @@ -122,7 +122,8 @@ static inline void chk_raw(const char *what, const uint8_t *data, uint16_t len) { - struct abis_nm_sw_desc sw = { 0 }; + /* = { 0 } triggers a warning in some gcc versions due to a bug: gcc issue #53119 */ + struct abis_nm_sw_desc sw = { {0} }; int res = abis_nm_get_sw_conf(data, len, &sw, 1); uint16_t xlen = abis_nm_get_sw_desc_len(data, len); @@ -144,7 +145,8 @@ { int res; uint16_t len; - struct abis_nm_sw_desc sw = { 0 }, put = { + /* = { 0 } triggers a warning in some gcc versions due to a bug: gcc issue #53119 */ + struct abis_nm_sw_desc sw = { {0} }, put = { .file_id_len = strlen(f_id), .file_version_len = strlen(f_ver), }; -- To view, visit https://gerrit.osmocom.org/2955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31d5ffc0cf461d207d6c3d43aa0a25a5448d7000 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol