diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2016-11-17 16:00:50 +0000 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2017-07-10 13:20:35 +0100 |
commit | 61830ede2dcc85600b5de9647ec9fbbc83437d1b (patch) | |
tree | f96b59aeeff54a52c864b00fb13ad6e489df90e0 | |
parent | e1786ee7f6fdd4508c5f4720b9d134cd7a6753d7 (diff) |
Avoid log_level warning using a static const
Compiler warnings for unused static variable.
Not for constants.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
-rw-r--r-- | common/vdlog.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/vdlog.h b/common/vdlog.h index 6d0413b..e645409 100644 --- a/common/vdlog.h +++ b/common/vdlog.h @@ -41,18 +41,18 @@ private: FILE* _handle; }; -enum { +typedef enum { LOG_DEBUG, LOG_INFO, LOG_WARN, LOG_ERROR, LOG_FATAL -}; +} VDLogLevel; #ifdef _DEBUG -static unsigned int log_level = LOG_DEBUG; +static const VDLogLevel log_level = LOG_DEBUG; #else -static unsigned int log_level = LOG_INFO; +static const VDLogLevel log_level = LOG_INFO; #endif #define PRINT_LINE(type, format, datetime, ms, ...) \ |