[babl/wip/msvc: 4/20] extensions/gegl-fixups.c: Don't assume GCC
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl/wip/msvc: 4/20] extensions/gegl-fixups.c: Don't assume GCC
- Date: Wed, 22 Jan 2020 08:09:53 +0000 (UTC)
commit ed9e57bf80faf3985493e554eb241b46f6221b58
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Jan 20 16:09:12 2020 +0800
extensions/gegl-fixups.c: Don't assume GCC
Instead, define a macro in babl/babl-macros./h that is defined to
__attribute__((unused)) on GCC and to nothing on non-GCC, and make use of it.
babl/babl-macros.h | 6 ++++++
extensions/gegl-fixups.c | 8 ++++----
2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/babl/babl-macros.h b/babl/babl-macros.h
index 010d97f7d..a286e6373 100644
--- a/babl/babl-macros.h
+++ b/babl/babl-macros.h
@@ -30,4 +30,10 @@
#define BABL_ARG_NULL_TERMINATED
#endif
+#ifdef __GNUC__
+#define BABL_GNUC_ATTRIBUTE_UNUSED __attribute__((unused))
+#else
+#define BABL_GNUC_ATTRIBUTE_UNUSED
#endif
+
+#endif /* _BABL_MACROS_H */
diff --git a/extensions/gegl-fixups.c b/extensions/gegl-fixups.c
index 45888ce65..589b57cf0 100644
--- a/extensions/gegl-fixups.c
+++ b/extensions/gegl-fixups.c
@@ -183,7 +183,7 @@ conv_F_8g (const Babl *conversion,
}
-static inline void __attribute__((unused))
+static inline void BABL_GNUC_ATTRIBUTE_UNUSED
conv_8_F (const Babl *conversion,
unsigned char *src,
unsigned char *dst,
@@ -232,7 +232,7 @@ conv_rgbaF_rgb8 (const Babl *conversion,
}
-static void __attribute__((unused))
+static void BABL_GNUC_ATTRIBUTE_UNUSED
conv_rgbaF_rgba8 (const Babl *conversion,
unsigned char *src,
unsigned char *dst,
@@ -266,7 +266,7 @@ conv_rgbaF_rgba8 (const Babl *conversion,
#define conv_rgbaF_rgbP8 conv_rgbaF_rgba8
-static void __attribute__((unused))
+static void BABL_GNUC_ATTRIBUTE_UNUSED
conv_rgbF_rgb8 (const Babl *conversion,
unsigned char *src,
unsigned char *dst,
@@ -275,7 +275,7 @@ conv_rgbF_rgb8 (const Babl *conversion,
conv_F_8g (conversion, src, dst, samples * 3);
}
-static void __attribute__((unused))
+static void BABL_GNUC_ATTRIBUTE_UNUSED
conv_gaF_ga8 (const Babl *conversion,
unsigned char *src,
unsigned char *dst,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]