I have a function (see below) that is emitting the following warning:
second parameter of ‘va_start’ not last named argument
What does it means and how to remove it?
The function is as the following:
static int ui_show_warning(GtkWindow *parent, const gchar *fmt, size_t size, ...) { GtkWidget *dialog = NULL; va_list args = NULL; int count = -1; char *msg = NULL; if((msg = malloc(size + 1)) == NULL) return -12; va_start(args, fmt); if((count = snprintf(msg, size, fmt, args)) < 0) goto outer; dialog = gtk_message_dialog_new(parent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,"%s", msg); (void) gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); outer: { if(args != NULL) va_end(args); if(msg != NULL) free(msg); return count; } }