glib/gmessages.c: Use G_VA_COPY() instead of va_copy()

Some compilers may not support va_copy(), so use the G_VA_COPY macro so
that things can be supported properly on all supported compilers.
This commit is contained in:
Chun-wei Fan 2016-07-18 14:25:52 +08:00
parent c6aee1bf15
commit c08b1a6ae5

View File

@ -1408,7 +1408,7 @@ g_log_structured (const gchar *log_domain,
priority = log_level_to_priority (log_level); priority = log_level_to_priority (log_level);
/* Work out how many fields we have. */ /* Work out how many fields we have. */
va_copy (field_args, args); G_VA_COPY (field_args, args);
for (p = va_arg (args, gchar *), n_fields = 0; for (p = va_arg (args, gchar *), n_fields = 0;
p != NULL; p != NULL;