From 0ece042162b45937919b4babc79ee651acda6e3a Mon Sep 17 00:00:00 2001 From: Mark Klara Date: Tue, 19 Jan 2016 15:27:47 -0800 Subject: [PATCH] Silenced unused variable warnings. When built for release, builds were failing with unused variable warnings, since they were only used in `assert()` calls. I added explicit void casting to any potentially unused variables. Change-Id: I9947ba46891fdda5aa925caa950642dedd4e009f --- samples/sample_binary.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/sample_binary.cpp b/samples/sample_binary.cpp index 5b2f603a0..4c5f01709 100644 --- a/samples/sample_binary.cpp +++ b/samples/sample_binary.cpp @@ -90,12 +90,15 @@ int main(int /*argc*/, const char * /*argv*/[]) { assert(weps->Get(i)->name()->str() == expected_weapon_names[i]); assert(weps->Get(i)->damage() == expected_weapon_damages[i]); } + (void)expected_weapon_names; + (void)expected_weapon_damages; // Get and test the `Equipment` union (`equipped` field). assert(monster->equipped_type() == Equipment_Weapon); auto equipped = static_cast(monster->equipped()); assert(equipped->name()->str() == "Axe"); assert(equipped->damage() == 5); + (void)equipped; printf("The FlatBuffer was successfully created and verified!\n"); }