Commit 28f81122 authored by Georgi Chorbadzhiyski's avatar Georgi Chorbadzhiyski Committed by Christophe Massiot

* dvblast.h: Annotate functions with printf stype params and use -Wformat-security.

parent d62978ef
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
VERSION = 2.0.0 VERSION = 2.0.0
TOPDIR = `basename ${PWD}` TOPDIR = `basename ${PWD}`
CFLAGS += -Wall -O3 -fomit-frame-pointer CFLAGS += -Wall -Wformat-security -O3 -fomit-frame-pointer
CFLAGS += -g CFLAGS += -g
LDLIBS += -lrt LDLIBS += -lrt
LDLIBS_DVBLAST += -lpthread LDLIBS_DVBLAST += -lpthread
......
...@@ -1638,6 +1638,7 @@ char *demux_Iconv(void *_unused, const char *psz_encoding, ...@@ -1638,6 +1638,7 @@ char *demux_Iconv(void *_unused, const char *psz_encoding,
* This code is from biTStream's examples and is under the WTFPL (see * This code is from biTStream's examples and is under the WTFPL (see
* LICENSE.WTFPL). * LICENSE.WTFPL).
*****************************************************************************/ *****************************************************************************/
__attribute__ ((format(printf, 2, 3)))
static void demux_Print(void *_unused, const char *psz_format, ...) static void demux_Print(void *_unused, const char *psz_format, ...)
{ {
char psz_fmt[strlen(psz_format) + 2]; char psz_fmt[strlen(psz_format) + 2];
......
...@@ -192,11 +192,11 @@ void msg_Connect( const char *ident ); ...@@ -192,11 +192,11 @@ void msg_Connect( const char *ident );
void msg_Disconnect( void ); void msg_Disconnect( void );
/* */ /* */
void msg_Info( void *_unused, const char *psz_format, ... ); __attribute__ ((format(printf, 2, 3))) void msg_Info( void *_unused, const char *psz_format, ... );
void msg_Err( void *_unused, const char *psz_format, ... ); __attribute__ ((format(printf, 2, 3))) void msg_Err( void *_unused, const char *psz_format, ... );
void msg_Warn( void *_unused, const char *psz_format, ... ); __attribute__ ((format(printf, 2, 3))) void msg_Warn( void *_unused, const char *psz_format, ... );
void msg_Dbg( void *_unused, const char *psz_format, ... ); __attribute__ ((format(printf, 2, 3))) void msg_Dbg( void *_unused, const char *psz_format, ... );
void msg_Raw( void *_unused, const char *psz_format, ... ); __attribute__ ((format(printf, 2, 3))) void msg_Raw( void *_unused, const char *psz_format, ... );
/* */ /* */
mtime_t mdate( void ); mtime_t mdate( void );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment