Browse Source

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>
Rosen Penev 4 years ago
parent
commit
165b444131
2 changed files with 2 additions and 2 deletions
  1. 1 1
      parse.c
  2. 1 1
      uci_internal.h

+ 1 - 1
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;

+ 1 - 1
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)