From dc6d2fe0e7930594100df9d30d0faf3814a6dcea Mon Sep 17 00:00:00 2001 From: Anish Date: Wed, 7 Apr 2021 12:39:39 +0200 Subject: [PATCH 1/2] fix unused variable error with gcc 8.3 --- include/valijson/constraints/concrete_constraints.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/valijson/constraints/concrete_constraints.hpp b/include/valijson/constraints/concrete_constraints.hpp index 5102bfc..b4df95e 100644 --- a/include/valijson/constraints/concrete_constraints.hpp +++ b/include/valijson/constraints/concrete_constraints.hpp @@ -915,6 +915,8 @@ public: throw; } #endif + + (void)freeFn; } virtual bool validate(const adapters::Adapter &target, From 03b8cccb27ca305ba971dc94e4f87ec47525d319 Mon Sep 17 00:00:00 2001 From: anishmonachan7 <43343442+anishmonachan7@users.noreply.github.com> Date: Wed, 7 Apr 2021 15:24:04 +0200 Subject: [PATCH 2/2] Update include/valijson/constraints/concrete_constraints.hpp Co-authored-by: Tristan Penman --- include/valijson/constraints/concrete_constraints.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/valijson/constraints/concrete_constraints.hpp b/include/valijson/constraints/concrete_constraints.hpp index b4df95e..9e67c19 100644 --- a/include/valijson/constraints/concrete_constraints.hpp +++ b/include/valijson/constraints/concrete_constraints.hpp @@ -914,9 +914,10 @@ public: freeFn(ptr); throw; } +#else + // pretend to use freeFn to avoid warning in GCC 8.3 + (void)freeFn; #endif - - (void)freeFn; } virtual bool validate(const adapters::Adapter &target,