summaryrefslogtreecommitdiff
path: root/pixman/pixman-compiler.h
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-11-17 16:48:01 -0800
committerMatt Turner <mattst88@gmail.com>2020-04-26 13:46:43 -0700
commit3b1fefda7f073491aacad93b4197fbfd0383c77f (patch)
tree29d8e36c9b666abf3ffd4eaee0ec57e213e25e2f /pixman/pixman-compiler.h
parent10a057e27f3a256c3b3ffc4fa71c45b0bbb783f7 (diff)
downloadpixman-3b1fefda7f073491aacad93b4197fbfd0383c77f.tar.gz
Prevent empty top-level declaration
The expansion of PIXMAN_DEFINE_THREAD_LOCAL(...) may end in a function definition, so the following semicolon is considered an empty top-level declaration, which is not allowed in ISO C. Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'pixman/pixman-compiler.h')
-rw-r--r--pixman/pixman-compiler.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/pixman/pixman-compiler.h b/pixman/pixman-compiler.h
index a02aa49..6394156 100644
--- a/pixman/pixman-compiler.h
+++ b/pixman/pixman-compiler.h
@@ -109,14 +109,14 @@
#if defined(PIXMAN_NO_TLS)
# define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
- static type name
+ static type name;
# define PIXMAN_GET_THREAD_LOCAL(name) \
(&name)
#elif defined(TLS)
# define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
- static TLS type name
+ static TLS type name;
# define PIXMAN_GET_THREAD_LOCAL(name) \
(&name)
@@ -176,7 +176,7 @@
#elif defined(_MSC_VER)
# define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
- static __declspec(thread) type name
+ static __declspec(thread) type name;
# define PIXMAN_GET_THREAD_LOCAL(name) \
(&name)