From 8eccfa86c0c7f1645556a119d8b217d7173af10d Mon Sep 17 00:00:00 2001 From: David Sterba Date: Sat, 23 Sep 2017 20:44:02 +0200 Subject: [PATCH] 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 --- messages.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/messages.h b/messages.h index a308b4b..4999c7b 100644 --- a/messages.h +++ b/messages.h @@ -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 -- 2.7.4