chore: add additional compiler flags (#17815)

Added:
  - -Wdouble-promotion
  - -Wmissing-noreturn
  - -Wmissing-format-attribute
  - -Wsuggest-attribute={pure,const,malloc,cold}

Resolves: #343
This commit is contained in:
Lewis Russell
2022-03-24 11:14:04 +00:00
committed by GitHub
parent 0c45753119
commit fcd57980f9
10 changed files with 42 additions and 16 deletions

View File

@@ -282,6 +282,7 @@ static bool do_log_to_file(FILE *log_file, int log_level, const char *context,
static bool v_do_log_to_file(FILE *log_file, int log_level, const char *context,
const char *func_name, int line_num, bool eol, const char *fmt,
va_list args)
FUNC_ATTR_PRINTF(7, 0)
{
static const char *log_levels[] = {
[DEBUG_LOG_LEVEL] = "DEBUG",