Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
3ad56081
Commit
3ad56081
authored
Apr 14, 2015
by
Philip Withnall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stun: Add missing format attributes for va_list printf functions
As detected by GCC 4.9.
parent
4e4af4be
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
agent/debug.c
agent/debug.c
+3
-0
stun/debug.c
stun/debug.c
+9
-0
stun/debug.h
stun/debug.h
+5
-0
No files found.
agent/debug.c
View file @
3ad56081
...
@@ -62,6 +62,9 @@ static const GDebugKey keys[] = {
...
@@ -62,6 +62,9 @@ static const GDebugKey keys[] = {
{
NULL
,
0
},
{
NULL
,
0
},
};
};
static
void
stun_handler
(
const
char
*
format
,
va_list
ap
)
G_GNUC_PRINTF
(
1
,
0
);
static
void
static
void
stun_handler
(
const
char
*
format
,
va_list
ap
)
stun_handler
(
const
char
*
format
,
va_list
ap
)
{
{
...
...
stun/debug.c
View file @
3ad56081
...
@@ -55,6 +55,15 @@ void stun_debug_disable (void) {
...
@@ -55,6 +55,15 @@ void stun_debug_disable (void) {
debug_enabled
=
0
;
debug_enabled
=
0
;
}
}
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
#define GNUC_PRINTF(format_idx, arg_idx) \
__attribute__((__format__ (__printf__, format_idx, arg_idx)))
#else
#define GNUC_PRINTF( format_idx, arg_idx)
#endif
static
void
default_handler
(
const
char
*
format
,
va_list
ap
)
GNUC_PRINTF
(
1
,
0
);
static
void
static
void
default_handler
(
const
char
*
format
,
va_list
ap
)
default_handler
(
const
char
*
format
,
va_list
ap
)
...
...
stun/debug.h
View file @
3ad56081
...
@@ -66,7 +66,12 @@ void stun_debug_disable (void);
...
@@ -66,7 +66,12 @@ void stun_debug_disable (void);
*
*
* Callback for a debug message from the STUN code.
* Callback for a debug message from the STUN code.
*/
*/
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))
typedef
void
(
*
StunDebugHandler
)
(
const
char
*
format
,
va_list
ap
)
__attribute__
((
__format__
(
__printf__
,
1
,
0
)));
#else
typedef
void
(
*
StunDebugHandler
)
(
const
char
*
format
,
va_list
ap
);
typedef
void
(
*
StunDebugHandler
)
(
const
char
*
format
,
va_list
ap
);
#endif
/**
/**
* stun_set_debug_handler:
* stun_set_debug_handler:
...
...
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