Commit 94dd8843 authored by Cedric Roux's avatar Cedric Roux

redo commit cb67d586

Seems like this commit got lost at some point.

Here was the message:
-----------------------------------------------------------------------------
Author: Cedric Roux <cedric.roux@eurecom.fr>
Date:   Tue Jan 10 14:21:02 2017 +0100

    add format indicator to get LOG_X warnings

    The LOG_X macros emit a lot of warnings when compiling with the T
    because they call the function logRecord (or logRecord_mt)
    which has not been "marked" as calling printf, so gcc won't
    emit typical printf warnings.

    With the T, they directly translate to sprintf, so those warnings
    pop up, much more verbose due to several macro expansions.

    Let's make them pop up all the time so it's easier to fix them.
-----------------------------------------------------------------------------
parent f6693af6
......@@ -259,8 +259,8 @@ void log_set_instance_type (log_instance_type_t instance);
# include "log_if.h"
/*----------------------------------------------------------------------------*/
int logInit (void);
void logRecord_mt(const char *file, const char *func, int line,int comp, int level, const char *format, ...);
void logRecord(const char *file, const char *func, int line,int comp, int level, const char *format, ...);
void logRecord_mt(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
void logRecord(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
int set_comp_log(int component, int level, int verbosity, int interval);
int set_log(int component, int level, int interval);
void set_glog(int level, int verbosity);
......
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