mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-22 22:23:32 +00:00
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>
This commit is contained in:
parent
5b2fbc6f4e
commit
8eccfa86c0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user