[glib/revert-e7738e46] Revert "Merge branch 'mr/issue-1575' into 'master'"
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/revert-e7738e46] Revert "Merge branch 'mr/issue-1575' into 'master'"
- Date: Thu, 1 Nov 2018 15:21:55 +0000 (UTC)
commit fc23ce04fbf0eafc7022bf11502612d4fcd262b5
Author: Emmanuele Bassi <ebassi gmail com>
Date: Thu Nov 1 15:21:32 2018 +0000
Revert "Merge branch 'mr/issue-1575' into 'master'"
This reverts merge request !412
docs/reference/glib/glib-sections.txt | 1 -
glib/docs.c | 17 -----------------
glib/gdatetime.h | 2 +-
glib/gmacros.h | 5 -----
glib/tests/gdatetime.c | 8 --------
tests/datetime.c | 8 --------
6 files changed, 1 insertion(+), 40 deletions(-)
---
diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt
index e59a1c1e4..d875f9a3a 100644
--- a/docs/reference/glib/glib-sections.txt
+++ b/docs/reference/glib/glib-sections.txt
@@ -442,7 +442,6 @@ G_GNUC_FALLTHROUGH
G_GNUC_UNUSED
G_GNUC_PRINTF
G_GNUC_SCANF
-G_GNUC_STRFTIME
G_GNUC_FORMAT
G_GNUC_NULL_TERMINATED
G_GNUC_WARN_UNUSED_RESULT
diff --git a/glib/docs.c b/glib/docs.c
index 562fef0aa..5212bb582 100644
--- a/glib/docs.c
+++ b/glib/docs.c
@@ -2359,23 +2359,6 @@
* for details.
*/
-/**
- * G_GNUC_STRFTIME:
- * @format_idx: the index of the argument corresponding to
- * the format string (the arguments are numbered from 1)
- *
- * Expands to the GNU C strftime format function attribute if the compiler
- * is gcc. This is used for declaring functions which take a format argument
- * which is passed to strftime() or an API implementing its formats. It allows
- * the compiler check the format passed to the function.
- *
- * See the
- * [GNU C
documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288)
- * for details.
- *
- * Since: 2.60
- */
-
/**
* G_GNUC_FORMAT:
* @arg_idx: the index of the argument
diff --git a/glib/gdatetime.h b/glib/gdatetime.h
index 20167a60d..65f9965ac 100644
--- a/glib/gdatetime.h
+++ b/glib/gdatetime.h
@@ -261,7 +261,7 @@ GDateTime * g_date_time_to_utc (GDateTi
GLIB_AVAILABLE_IN_ALL
gchar * g_date_time_format (GDateTime *datetime,
- const gchar *format)
G_GNUC_MALLOC G_GNUC_STRFTIME (2);
+ const gchar *format)
G_GNUC_MALLOC;
G_END_DECLS
diff --git a/glib/gmacros.h b/glib/gmacros.h
index 5212d2fe8..0432d9cad 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -165,15 +165,11 @@
__attribute__((__format__ (gnu_printf, format_idx, arg_idx)))
#define G_GNUC_SCANF( format_idx, arg_idx ) \
__attribute__((__format__ (gnu_scanf, format_idx, arg_idx)))
-#define G_GNUC_STRFTIME( format_idx ) \
- __attribute__((__format__ (gnu_strftime, format_idx, 0)))
#else
#define G_GNUC_PRINTF( format_idx, arg_idx ) \
__attribute__((__format__ (__printf__, format_idx, arg_idx)))
#define G_GNUC_SCANF( format_idx, arg_idx ) \
__attribute__((__format__ (__scanf__, format_idx, arg_idx)))
-#define G_GNUC_STRFTIME( format_idx ) \
- __attribute__((__format__ (__strftime__, format_idx, 0)))
#endif
#define G_GNUC_FORMAT( arg_idx ) \
__attribute__((__format_arg__ (arg_idx)))
@@ -188,7 +184,6 @@
#else /* !__GNUC__ */
#define G_GNUC_PRINTF( format_idx, arg_idx )
#define G_GNUC_SCANF( format_idx, arg_idx )
-#define G_GNUC_STRFTIME( format_idx )
#define G_GNUC_FORMAT( arg_idx )
#define G_GNUC_NORETURN
#define G_GNUC_CONST
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index 4e262d9a9..f4000d96c 100644
--- a/glib/tests/gdatetime.c
+++ b/glib/tests/gdatetime.c
@@ -25,14 +25,6 @@
#include <glib/gstdio.h>
#include <locale.h>
-/* The tests below exercise invalid formats and y2k-unsafe formats,
- * so we need to silence the warnings here to pass.
- */
-#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-Wformat"
-#pragma GCC diagnostic ignored "-Wformat-y2k"
-#endif
-
#define ASSERT_DATE(dt,y,m,d) G_STMT_START { \
g_assert_nonnull ((dt)); \
g_assert_cmpint ((y), ==, g_date_time_get_year ((dt))); \
diff --git a/tests/datetime.c b/tests/datetime.c
index 16f4a95e2..ae46bbaea 100644
--- a/tests/datetime.c
+++ b/tests/datetime.c
@@ -18,14 +18,6 @@
#include <locale.h>
#include <glib/glib.h>
-/* The whole purpose of this test is to pass the command line argument
- * to g_date_time_format(), so the format argument cannot be compile-
- * time checked. Disable the inevitable compiler warning.
- */
-#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
-#endif
-
int
main (int argc, char *argv[])
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]