mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 19:36:18 +01:00
Merge branch '1575-revert-strftime-format' into 'master'
Revert "gdatetime: Enable compile time check of g_date_time_format() format" Closes #1575 See merge request GNOME/glib!442
This commit is contained in:
commit
d3f5559780
@ -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);
|
||||
const gchar *format) G_GNUC_MALLOC;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -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))); \
|
||||
|
@ -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[])
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user