From 94d83de3d941e53ecdd28cc417e72394fc30bec3 Mon Sep 17 00:00:00 2001 From: Aleksejs Popovs Date: Mon, 5 Jun 2017 17:58:56 -0400 Subject: [PATCH 1/2] Revert "Update FMT UNUSED case to resolve libsnark compilation issues". This change resulted in the type of FMT(...) being void when DEBUG is enabled, instead of char*. The libsnark compilation issue is actually unrelated to this, and should be resolved by removing the unnecessary "libff::" from libsnark source code when calling FMT, as macros cannot be namespaced. This reverts commit 693fcc676d7ccb6d8bd98b05c1a8405ea910d1fd. --- src/common/utils.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/utils.hpp b/src/common/utils.hpp index 08fd7fda..44a5a4de 100755 --- a/src/common/utils.hpp +++ b/src/common/utils.hpp @@ -45,7 +45,7 @@ void UNUSED(Types&&...) {} #ifdef DEBUG #define FMT FORMAT #else -#define FMT UNUSED +#define FMT(...) (UNUSED(__VA_ARGS__), "") #endif void serialize_bit_vector(std::ostream &out, const bit_vector &v); From ca6413d1ed22c4ea3233c338f4c709fefe23deaa Mon Sep 17 00:00:00 2001 From: Aleksejs Popovs Date: Mon, 5 Jun 2017 18:47:07 -0400 Subject: [PATCH 2/2] Make the FMT macro usable outside of libff namespace. --- src/common/utils.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/utils.hpp b/src/common/utils.hpp index 44a5a4de..4cb05123 100755 --- a/src/common/utils.hpp +++ b/src/common/utils.hpp @@ -43,9 +43,9 @@ template void UNUSED(Types&&...) {} #ifdef DEBUG -#define FMT FORMAT +#define FMT libff::FORMAT #else -#define FMT(...) (UNUSED(__VA_ARGS__), "") +#define FMT(...) (libff::UNUSED(__VA_ARGS__), "") #endif void serialize_bit_vector(std::ostream &out, const bit_vector &v);