aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/client.c2
-rw-r--r--src/client.h5
-rw-r--r--src/command.c8
-rw-r--r--src/command.h5
-rw-r--r--src/log.c4
-rw-r--r--src/log.h14
6 files changed, 17 insertions, 21 deletions
diff --git a/src/client.c b/src/client.c
index 991f0d0b2..f654797b7 100644
--- a/src/client.c
+++ b/src/client.c
@@ -760,7 +760,7 @@ void client_vprintf(struct client *client, const char *fmt, va_list args)
free(buffer);
}
-mpd_fprintf void client_printf(struct client *client, const char *fmt, ...)
+G_GNUC_PRINTF(2, 3) void client_printf(struct client *client, const char *fmt, ...)
{
va_list args;
diff --git a/src/client.h b/src/client.h
index 9c7031820..196afe7fa 100644
--- a/src/client.h
+++ b/src/client.h
@@ -19,8 +19,7 @@
#ifndef MPD_CLIENT_H
#define MPD_CLIENT_H
-#include "gcc.h"
-
+#include <glib.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdarg.h>
@@ -65,7 +64,7 @@ void client_vprintf(struct client *client, const char *fmt, va_list args);
/**
* Write a printf-like formatted string to the client.
*/
-mpd_fprintf void client_printf(struct client *client, const char *fmt, ...);
+G_GNUC_PRINTF(2, 3) void client_printf(struct client *client, const char *fmt, ...);
/**
* Adds the specified idle flags to all clients and immediately sends
diff --git a/src/command.c b/src/command.c
index 6b01fd45d..c725282aa 100644
--- a/src/command.c
+++ b/src/command.c
@@ -102,8 +102,8 @@ static void command_error_v(struct client *client, enum ack error,
current_command = NULL;
}
-mpd_fprintf_ void command_error(struct client *client, enum ack error,
- const char *fmt, ...)
+G_GNUC_PRINTF(3, 4) void command_error(struct client *client, enum ack error,
+ const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -111,7 +111,7 @@ mpd_fprintf_ void command_error(struct client *client, enum ack error,
va_end(args);
}
-static bool mpd_fprintf__
+static bool G_GNUC_PRINTF(4, 5)
check_uint32(struct client *client, uint32_t *dst,
const char *s, const char *fmt, ...)
{
@@ -128,7 +128,7 @@ check_uint32(struct client *client, uint32_t *dst,
return true;
}
-static bool mpd_fprintf__
+static bool G_GNUC_PRINTF(4, 5)
check_int(struct client *client, int *value_r,
const char *s, const char *fmt, ...)
{
diff --git a/src/command.h b/src/command.h
index ac557b2fc..b67e9567e 100644
--- a/src/command.h
+++ b/src/command.h
@@ -19,7 +19,6 @@
#ifndef MPD_COMMAND_H
#define MPD_COMMAND_H
-#include "gcc.h"
#include "ack.h"
#include <glib.h>
@@ -47,7 +46,7 @@ command_process(struct client *client, char *commandString);
void command_success(struct client *client);
-mpd_fprintf_ void command_error(struct client *client, enum ack error,
- const char *fmt, ...);
+G_GNUC_PRINTF(3, 4) void command_error(struct client *client, enum ack error,
+ const char *fmt, ...);
#endif
diff --git a/src/log.c b/src/log.c
index e30511397..e09aaf32a 100644
--- a/src/log.c
+++ b/src/log.c
@@ -164,7 +164,7 @@ void setup_log_output(bool use_stdout)
}
#define log_func(func,level) \
-mpd_printf void func(const char *fmt, ...) \
+G_GNUC_PRINTF(1, 2) void func(const char *fmt, ...) \
{ \
if (level <= (int)log_threshold) { \
va_list args; \
@@ -182,7 +182,7 @@ log_func(DEBUG, G_LOG_LEVEL_DEBUG)
#undef log_func
-mpd_printf G_GNUC_NORETURN void FATAL(const char *fmt, ...)
+G_GNUC_PRINTF(1, 2) G_GNUC_NORETURN void FATAL(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
diff --git a/src/log.h b/src/log.h
index 436d54d97..68ae995aa 100644
--- a/src/log.h
+++ b/src/log.h
@@ -19,17 +19,15 @@
#ifndef MPD_LOG_H
#define MPD_LOG_H
-#include "gcc.h"
-
#include <glib.h>
#include <stdbool.h>
-mpd_printf void ERROR(const char *fmt, ...);
-mpd_printf void LOG(const char *fmt, ...);
-mpd_printf void SECURE(const char *fmt, ...);
-mpd_printf void DEBUG(const char *fmt, ...);
-mpd_printf void WARNING(const char *fmt, ...);
-mpd_printf G_GNUC_NORETURN void FATAL(const char *fmt, ...);
+G_GNUC_PRINTF(1, 2) void ERROR(const char *fmt, ...);
+G_GNUC_PRINTF(1, 2) void LOG(const char *fmt, ...);
+G_GNUC_PRINTF(1, 2) void SECURE(const char *fmt, ...);
+G_GNUC_PRINTF(1, 2) void DEBUG(const char *fmt, ...);
+G_GNUC_PRINTF(1, 2) void WARNING(const char *fmt, ...);
+G_GNUC_PRINTF(1, 2) G_GNUC_NORETURN void FATAL(const char *fmt, ...);
void initLog(bool verbose);