Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
c06ce447
Commit
c06ce447
authored
Dec 02, 2008
by
Thomas Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replaced mpd_printf etc by G_GNUC_PRINTF
We want to remove gcc.h eventually. This takes care of all the G_GNUC_PRINTF macros.
parent
e6ae4098
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
21 deletions
+17
-21
client.c
src/client.c
+1
-1
client.h
src/client.h
+2
-3
command.c
src/command.c
+4
-4
command.h
src/command.h
+2
-3
log.c
src/log.c
+2
-2
log.h
src/log.h
+6
-8
No files found.
src/client.c
View file @
c06ce447
...
...
@@ -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
;
...
...
src/client.h
View file @
c06ce447
...
...
@@ -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
...
...
src/command.c
View file @
c06ce447
...
...
@@ -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
,
...)
{
...
...
src/command.h
View file @
c06ce447
...
...
@@ -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
src/log.c
View file @
c06ce447
...
...
@@ -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
);
...
...
src/log.h
View file @
c06ce447
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment