fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35473?usp=email )
Change subject: vty: suppress warnings about len being set but not used ......................................................................
vty: suppress warnings about len being set but not used
This commit fixes the following warning 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;
... and finally allows to build libosmocore with --enable-werror.
Change-Id: I0040ef20ba3fc53ee7ccefc4885170f333f80566 --- M src/vty/utils.c 1 file changed, 17 insertions(+), 0 deletions(-)
Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved dexter: Looks good to me, but someone else must approve Jenkins Builder: Verified
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;