mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 10:27:51 +02:00
Remove warning about g_print, etc, encoding.
Thu Mar 28 18:22:53 2002 Owen Taylor <otaylor@redhat.com> * README: Remove warning about g_print, etc, encoding. * NEWS: Updates. * glib/gmessages.c (g_log_default_handler): Use %lu (plus a cast) when printing out pid_t arguments. (#76770, Morten Welinder) * glib/gstrfuncs.c (g_strdup_vprintf): Check the result of vasprintf(), return NULL on failure. (#76802, Akira Tagoh) * tests/testglib.c (TEST): Supress a warning with some GCC versions.
This commit is contained in:
@@ -50,12 +50,14 @@
|
||||
static int array[10000];
|
||||
static gboolean failed = FALSE;
|
||||
|
||||
/* We write (m ? m : "") even in the m != NULL case to suppress a warning with GCC-3.1
|
||||
*/
|
||||
#define TEST(m,cond) G_STMT_START { failed = !(cond); \
|
||||
if (failed) \
|
||||
{ if (!m) \
|
||||
g_print ("\n(%s:%d) failed for: %s\n", __FILE__, __LINE__, ( # cond )); \
|
||||
else \
|
||||
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
|
||||
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)(m ? m : "")); \
|
||||
} \
|
||||
else \
|
||||
g_print ("."); fflush (stdout); \
|
||||
|
Reference in New Issue
Block a user