From faa3d4f1d8ecff444be53215d72e32d71d9ce138 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 4 Oct 2023 11:06:24 +0200 Subject: [PATCH] Remove duplicate NDEBUG check from compat/assumptions.h The check is already done in util/check.h, which is more widely included. --- src/compat/assumptions.h | 7 ------- src/net_processing.cpp | 4 ++-- src/validation.cpp | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/compat/assumptions.h b/src/compat/assumptions.h index 4488db08868..78bf3c743f8 100644 --- a/src/compat/assumptions.h +++ b/src/compat/assumptions.h @@ -11,13 +11,6 @@ #include #include -// Assumption: We assume that the macro NDEBUG is not defined. -// Example(s): We use assert(...) extensively with the assumption of it never -// being a noop at runtime. -#if defined(NDEBUG) -# error "Bitcoin cannot be compiled without assertions." -#endif - // Assumption: We assume a C++17 (ISO/IEC 14882:2017) compiler (minimum requirement). // Example(s): We assume the presence of C++17 features everywhere :-) // ISO Standard C++17 [cpp.predefined]p1: diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 06086d6804a..686da98739b 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -16,9 +16,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -39,7 +39,7 @@ #include #include #include -#include // For NDEBUG compile time check +#include #include #include #include diff --git a/src/validation.cpp b/src/validation.cpp index 30b3dde74f0..55f2514202b 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -47,7 +47,7 @@ #include #include #include -#include // For NDEBUG compile time check +#include #include #include #include