]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Require a semicolon for libbsd_link_warning() macro
authorGuillem Jover <guillem@hadrons.org>
Thu, 11 Feb 2021 03:40:48 +0000 (04:40 +0100)
committerGuillem Jover <guillem@hadrons.org>
Sun, 28 Feb 2021 04:28:57 +0000 (05:28 +0100)
Remove the semicolon in the macro definition to force adding one on the
call sites, to make the code look like an actual function.

src/fgetln.c
src/fgetwln.c
src/local-link.h

index 7461a7adaf1a2dee671944d53513b9a738c2159b..502eb6fc987e56c6ec3467b44bb2c6c6a3ba2149 100644 (file)
@@ -77,7 +77,7 @@ fgetln(FILE *stream, size_t *len)
 }
 libbsd_link_warning(fgetln,
                     "This function cannot be safely ported, use getline(3) "
-                    "instead, as it is supported by GNU and POSIX.1-2008.")
+                    "instead, as it is supported by GNU and POSIX.1-2008.");
 #else
 #error "Function fgetln() needs to be ported."
 #endif
index 112765599a5c47d660c67e7d8d39e4d263660589..e6a0a1781dc14672dc3c696bbacd0e846751b8fb 100644 (file)
@@ -89,4 +89,4 @@ fgetwln(FILE *stream, size_t *lenp)
 }
 libbsd_link_warning(fgetwln,
                     "This function cannot be safely ported, use fgetwc(3) "
-                    "instead, as it is supported by C99 and POSIX.1-2001.")
+                    "instead, as it is supported by C99 and POSIX.1-2001.");
index 0d4351a3cb6ff7d8bd5a76b2222b37470b21b70b..55fd0285683b2904d439fe798a1c715e1f1b8134 100644 (file)
@@ -29,7 +29,7 @@
 
 #define libbsd_link_warning(symbol, msg) \
        static const char libbsd_emit_link_warning_##symbol[] \
-               __attribute__((__used__,__section__(".gnu.warning." #symbol))) = msg;
+               __attribute__((__used__,__section__(".gnu.warning." #symbol))) = msg
 
 #ifdef __ELF__
 #define libbsd_symver_default(alias, symbol, version) \