From 26e880c2a48d0c15ac41ab8d68174a9bff74fa0e Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Wed, 1 May 2019 16:20:16 +0200 Subject: [PATCH] Avoid -Wextra-semi-stmt warnings from Clang --- src/conf.c | 2 +- unittest/framework.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf.c b/src/conf.c index 61e4a4be7..0e76863a0 100644 --- a/src/conf.c +++ b/src/conf.c @@ -80,7 +80,7 @@ out: static bool parse_line(const char *line, char **key, char **value, char **errmsg) { -#define SKIP_WS(x) while (isspace(*x)) { ++x; } +#define SKIP_WS(x) do { while (isspace(*x)) { ++x; } } while (false) *key = NULL; *value = NULL; diff --git a/unittest/framework.c b/unittest/framework.c index 3893f9149..43170c831 100644 --- a/unittest/framework.c +++ b/unittest/framework.c @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2018 Joel Rosdahl +// Copyright (C) 2010-2019 Joel Rosdahl // // This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the Free @@ -294,7 +294,7 @@ cct_create_fresh_dir(const char *path) { cct_wipe(path); if (mkdir(path, 0777) != 0) { - fprintf(stderr, "mkdir: %s: %s", path, strerror(errno));; + fprintf(stderr, "mkdir: %s: %s", path, strerror(errno)); abort(); } } -- 2.47.2