Add clang-tidy target and fix problems
This commit is contained in:
parent
fca35ade9e
commit
f97b149376
25 changed files with 199 additions and 115 deletions
src
|
@ -66,8 +66,6 @@ logger_log(int level, const char *filename, int line, const char *func, const ch
|
|||
char *buffer = malloc(sizeof(char) * (128 + strlen(msg)));
|
||||
sprintf(buffer, "%s[%5s] %s:%d:%s " COLOR_NONE "%s", color, level_str, filename, line, func, msg);
|
||||
|
||||
//fprintf(stream, "%s %s:%d:%s " COLOR_NONE, timestamp_str, filename, line, func);
|
||||
|
||||
va_list args;
|
||||
va_start(args, msg);
|
||||
vsyslog(level, buffer, args);
|
||||
|
@ -75,8 +73,9 @@ logger_log(int level, const char *filename, int line, const char *func, const ch
|
|||
|
||||
char *buffer_timed = malloc(sizeof(char) * (strlen(timestamp_str) + strlen(buffer) + 2));
|
||||
sprintf(buffer_timed, "%s %s", timestamp_str, buffer);
|
||||
|
||||
va_start(args, msg);
|
||||
vfprintf(global_config->log_file, buffer_timed, args);
|
||||
vfprintf(global_config->log_file, buffer_timed, args); // NOLINT(clang-analyzer-valist.Uninitialized): clang-tidy bug
|
||||
fflush(global_config->log_file);
|
||||
va_end(args);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue