diff options
author | David Sterba <dsterba@suse.com> | 2017-09-23 20:44:02 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-09-25 15:18:17 +0200 |
commit | 8eccfa86c0c7f1645556a119d8b217d7173af10d (patch) | |
tree | 64a4c04bca84b5c377df486951fa9cffea4bc47a /messages.h | |
parent | 5b2fbc6f4e93286273f9e7a67834a02004f3f875 (diff) |
btrfs-progs: fix debugging macro checks
Sparse warns that the DEBUG_*_ERROR macros are not defined when checked.
Use the ifdef check rather then relying on the implicit behaviour.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'messages.h')
-rw-r--r-- | messages.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -17,19 +17,19 @@ #ifndef __BTRFS_MESSAGES_H__ #define __BTRFS_MESSAGES_H__ -#if DEBUG_VERBOSE_ERROR +#ifdef DEBUG_VERBOSE_ERROR #define PRINT_VERBOSE_ERROR fprintf(stderr, "%s:%d:", __FILE__, __LINE__) #else #define PRINT_VERBOSE_ERROR #endif -#if DEBUG_TRACE_ON_ERROR +#ifdef DEBUG_TRACE_ON_ERROR #define PRINT_TRACE_ON_ERROR print_trace() #else #define PRINT_TRACE_ON_ERROR #endif -#if DEBUG_ABORT_ON_ERROR +#ifdef DEBUG_ABORT_ON_ERROR #define DO_ABORT_ON_ERROR abort() #else #define DO_ABORT_ON_ERROR |