logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0001-Prevent-empty-top-level-declaration.patch (1877B)


  1. From 76c1b0d85878fb3eb6cba54b5a67ad3df095bad7 Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Thu, 11 Jul 2019 00:12:19 -0700
  4. Subject: [PATCH] Prevent empty top-level declaration
  5. Upstream: https://lists.freedesktop.org/archives/pixman/2019-November/004896.html
  6. The expansion of PIXMAN_DEFINE_THREAD_LOCAL(...) may end in a
  7. function definition, so the following semicolon is considered an
  8. empty top-level declaration, which is not allowed in ISO C.
  9. ---
  10. pixman/pixman-compiler.h | 6 +++---
  11. pixman/pixman-implementation.c | 2 +-
  12. 2 files changed, 4 insertions(+), 4 deletions(-)
  13. diff --git a/pixman/pixman-compiler.h b/pixman/pixman-compiler.h
  14. index a02aa49..6394156 100644
  15. --- a/pixman/pixman-compiler.h
  16. +++ b/pixman/pixman-compiler.h
  17. @@ -109,14 +109,14 @@
  18. #if defined(PIXMAN_NO_TLS)
  19. # define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
  20. - static type name
  21. + static type name;
  22. # define PIXMAN_GET_THREAD_LOCAL(name) \
  23. (&name)
  24. #elif defined(TLS)
  25. # define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
  26. - static TLS type name
  27. + static TLS type name;
  28. # define PIXMAN_GET_THREAD_LOCAL(name) \
  29. (&name)
  30. @@ -176,7 +176,7 @@
  31. #elif defined(_MSC_VER)
  32. # define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
  33. - static __declspec(thread) type name
  34. + static __declspec(thread) type name;
  35. # define PIXMAN_GET_THREAD_LOCAL(name) \
  36. (&name)
  37. diff --git a/pixman/pixman-implementation.c b/pixman/pixman-implementation.c
  38. index 2c7de4c..5a2cbfe 100644
  39. --- a/pixman/pixman-implementation.c
  40. +++ b/pixman/pixman-implementation.c
  41. @@ -63,7 +63,7 @@ typedef struct
  42. } cache [N_CACHED_FAST_PATHS];
  43. } cache_t;
  44. -PIXMAN_DEFINE_THREAD_LOCAL (cache_t, fast_path_cache);
  45. +PIXMAN_DEFINE_THREAD_LOCAL (cache_t, fast_path_cache)
  46. static void
  47. dummy_composite_rect (pixman_implementation_t *imp,
  48. --
  49. 2.26.2