[glib: 2/4] test-printf: use G_GNUC_CHECK_VERSION
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/4] test-printf: use G_GNUC_CHECK_VERSION
- Date: Thu, 29 Apr 2021 12:48:51 +0000 (UTC)
commit ad1fd7f998bf7b25db955f7035fceb3800737be7
Author: Nishal Kulkarni <kulknishu gmail com>
Date: Thu Apr 29 17:39:54 2021 +0530
test-printf: use G_GNUC_CHECK_VERSION
Replace `__GLIBC__` with `G_GNUC_CHECK_VERSION`
glib/tests/test-printf.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glib/tests/test-printf.c b/glib/tests/test-printf.c
index dd1107432..59a461ddb 100644
--- a/glib/tests/test-printf.c
+++ b/glib/tests/test-printf.c
@@ -728,7 +728,7 @@ test_64bit (void)
/* However, gcc doesn't know about this, so we need to disable printf
* format warnings...
*/
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#if G_GNUC_CHECK_VERSION(4, 6)
_Pragma ("GCC diagnostic push")
_Pragma ("GCC diagnostic ignored \"-Wformat\"")
_Pragma ("GCC diagnostic ignored \"-Wformat-extra-args\"")
@@ -766,7 +766,7 @@ _Pragma ("GCC diagnostic ignored \"-Wformat-extra-args\"")
g_assert_cmpint (res, ==, 5);
g_assert_cmpstr (buf, ==, "1E240");
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#if G_GNUC_CHECK_VERSION(4, 6)
_Pragma ("GCC diagnostic pop")
#endif
@@ -819,7 +819,7 @@ test_64bit2_win32 (void)
/* However, gcc doesn't know about this, so we need to disable printf
* format warnings...
*/
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#if G_GNUC_CHECK_VERSION(4, 6)
_Pragma ("GCC diagnostic push")
_Pragma ("GCC diagnostic ignored \"-Wformat\"")
_Pragma ("GCC diagnostic ignored \"-Wformat-extra-args\"")
@@ -849,7 +849,7 @@ _Pragma ("GCC diagnostic ignored \"-Wformat-extra-args\"")
res = g_printf ("%" "ll" "X\n", (gint64)123456);
g_assert_cmpint (res, ==, 6);
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#if G_GNUC_CHECK_VERSION(4, 6)
_Pragma ("GCC diagnostic pop")
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]