summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2019-11-30 13:42:03 -0800
committerPetr Štetiar <ynezz@true.cz>2019-12-11 21:51:35 +0100
commit165b444131453d63fc78c1d86f23c3ca36a2ffd7 (patch)
tree5f3b20f11844f9318f09f515c5f7d70699c70d97
parent66264ed9ec9e13321798061782b255ecb4dd64c2 (diff)
downloaduci-165b444131453d63fc78c1d86f23c3ca36a2ffd7.tar.gz
uci: Fix extra semicolons warnings
Found with clang's -Wextra-semi-stmt Fixes: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] UCI_TRAP_SAVE(ctx, error); ^ error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] UCI_TRAP_SAVE(ctx, ignore); error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] }; Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r--parse.c2
-rw-r--r--uci_internal.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index 499c32e..40645c5 100644
--- a/parse.c
+++ b/parse.c
@@ -83,7 +83,7 @@ static uint32_t hash_murmur2(uint32_t h, const void * key, int len)
/* fall through */
case 1: h ^= data[0];
h *= m;
- };
+ }
h ^= h >> 13;
h *= m;
diff --git a/uci_internal.h b/uci_internal.h
index 61f2da2..f00b394 100644
--- a/uci_internal.h
+++ b/uci_internal.h
@@ -215,7 +215,7 @@ struct uci_backend _var = { \
ctx->err = __val; \
memcpy(ctx->trap, __old_trap, sizeof(ctx->trap)); \
goto handler; \
- }
+ } while(0)
#define UCI_TRAP_RESTORE(ctx) \
memcpy(ctx->trap, __old_trap, sizeof(ctx->trap)); \
} while(0)