From f6a8265b9a00a0a9232bfaf0cd5d3962fbc4700a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 6 Mar 2018 09:34:03 +0100 Subject: core: drop unnecessary __useless_struct_to_allow_trailing_semicolon__ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ISO C does not allow empty statements outside of functions, and gcc will warn the trailing semicolons when compiling with -pedantic: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic] But our code cannot compile with -pedantic anyway, at least because warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic] Without -pedatnic, clang and even old gcc (3.4) generate no warnings about those semicolons, so let's just drop __useless_struct_to_allow_trailing_semicolon__. --- src/basic/macro.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/basic/macro.h') diff --git a/src/basic/macro.h b/src/basic/macro.h index 89bdd852a9..95be63a204 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -428,7 +428,6 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) { static inline void func##p(type *p) { \ if (*p) \ func(*p); \ - } \ - struct __useless_struct_to_allow_trailing_semicolon__ + } #include "log.h" -- cgit v1.2.1