mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-30 05:43:28 +02:00
Add G_GNUC_PRINTF on all functions with format strings
This allows compilation with clang without errors, even when -Wformat-nonliteral is active (as long as there are no real cases of non literal formatting). https://bugzilla.gnome.org/show_bug.cgi?id=691608
This commit is contained in:
committed by
Colin Walters
parent
120834db5b
commit
c219181cb2
@@ -46,6 +46,7 @@
|
||||
|
||||
#include "glibintl.h"
|
||||
|
||||
G_GNUC_PRINTF(1, 2)
|
||||
static void
|
||||
debug_print (const gchar *message, ...)
|
||||
{
|
||||
|
@@ -469,6 +469,7 @@ keyring_lookup_entry (const gchar *cookie_context,
|
||||
}
|
||||
|
||||
/* function for logging important events that the system administrator should take notice of */
|
||||
G_GNUC_PRINTF(1, 2)
|
||||
static void
|
||||
_log (const gchar *message,
|
||||
...)
|
||||
|
@@ -1346,6 +1346,7 @@ handle_start_service_by_name (_GFreedesktopDBus *object,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
G_GNUC_PRINTF(5, 6)
|
||||
static void
|
||||
return_error (Client *client, GDBusMessage *message,
|
||||
GQuark domain,
|
||||
|
@@ -87,12 +87,12 @@ void g_dbus_error_set_dbus_error (GError **error,
|
||||
const gchar *dbus_error_name,
|
||||
const gchar *dbus_error_message,
|
||||
const gchar *format,
|
||||
...);
|
||||
...) G_GNUC_PRINTF(4, 5);
|
||||
void g_dbus_error_set_dbus_error_valist (GError **error,
|
||||
const gchar *dbus_error_name,
|
||||
const gchar *dbus_error_message,
|
||||
const gchar *format,
|
||||
va_list var_args);
|
||||
va_list var_args) G_GNUC_PRINTF(4, 0);
|
||||
gchar *g_dbus_error_encode_gerror (const GError *error);
|
||||
|
||||
G_END_DECLS
|
||||
|
@@ -827,6 +827,7 @@ g_dbus_message_new_method_error_literal (GDBusMessage *method_call_message,
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
G_GNUC_PRINTF(3, 0)
|
||||
GDBusMessage *
|
||||
g_dbus_message_new_method_error_valist (GDBusMessage *method_call_message,
|
||||
const gchar *error_name,
|
||||
|
@@ -55,12 +55,13 @@ void g_dbus_method_invocation_return_error (GDBusMetho
|
||||
GQuark domain,
|
||||
gint code,
|
||||
const gchar *format,
|
||||
...);
|
||||
...) G_GNUC_PRINTF(4, 5);
|
||||
void g_dbus_method_invocation_return_error_valist (GDBusMethodInvocation *invocation,
|
||||
GQuark domain,
|
||||
gint code,
|
||||
const gchar *format,
|
||||
va_list var_args);
|
||||
va_list var_args)
|
||||
G_GNUC_PRINTF(4, 0);
|
||||
void g_dbus_method_invocation_return_error_literal (GDBusMethodInvocation *invocation,
|
||||
GQuark domain,
|
||||
gint code,
|
||||
|
@@ -110,7 +110,8 @@ void g_simple_async_result_set_error_va (GSimpleAsyncResult
|
||||
GQuark domain,
|
||||
gint code,
|
||||
const char *format,
|
||||
va_list args);
|
||||
va_list args)
|
||||
G_GNUC_PRINTF(4, 0);
|
||||
gboolean g_simple_async_result_is_valid (GAsyncResult *result,
|
||||
GObject *source,
|
||||
gpointer source_tag);
|
||||
@@ -121,7 +122,7 @@ void g_simple_async_report_error_in_idle (GObject *object,
|
||||
GQuark domain,
|
||||
gint code,
|
||||
const char *format,
|
||||
...);
|
||||
...) G_GNUC_PRINTF(6, 7);
|
||||
void g_simple_async_report_gerror_in_idle (GObject *object,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data,
|
||||
|
@@ -61,7 +61,7 @@ void g_task_report_new_error (gpointer source_object,
|
||||
GQuark domain,
|
||||
gint code,
|
||||
const char *format,
|
||||
...);
|
||||
...) G_GNUC_PRINTF(7, 8);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_36
|
||||
void g_task_set_task_data (GTask *task,
|
||||
|
Reference in New Issue
Block a user