[S] Change in libosmocore[master]: {gsm,vty}: suppress warnings about [total_]len being set but not used
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35473?usp=email ) Change subject: {gsm,vty}: suppress warnings about [total_]len being set but not used ...................................................................... {gsm,vty}: suppress warnings about [total_]len being set but not used This commit fixes the following warnings seen with CC=clang: utils.c:376:6: warning: variable 'len' set but not used [-Wunused-but-set-variable] int len = 0, offset = 0, ret, rem; gsm0808_utils.c:2094:6: warning: variable 'total_len' set but not used [-Wunused-but-set-variable] int total_len = 0; ... and finally allows to build libosmocore with --enable-werror. Change-Id: I0040ef20ba3fc53ee7ccefc4885170f333f80566 --- M src/gsm/gsm0808_utils.c M src/vty/utils.c 2 files changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/35473/1 diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 778630d..0d6d5ad 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -2094,6 +2094,7 @@ int total_len = 0; APPEND_STR("%s:", gsm0808_cell_id_discr_name(cid->id_discr)); APPEND_CELL_ID_U(cid->id_discr, &cid->id); + (void)total_len; /* suppress warnings about total_len being set but not used */ return buf; } diff --git a/src/vty/utils.c b/src/vty/utils.c index a651515..0f5a34e 100644 --- a/src/vty/utils.c +++ b/src/vty/utils.c @@ -415,6 +415,7 @@ if (ret < 0) goto err; OSMO_SNPRINTF_RET(ret, rem, offset, len); + (void)len; /* suppress warnings about len being set but not used */ err: str[size-1] = '\0'; return str; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35473?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0040ef20ba3fc53ee7ccefc4885170f333f80566 Gerrit-Change-Number: 35473 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
fixeria