floodlight/infra — pull request #26 by rlane (2014-05-30 23:01:25+00:00)
Title: AIM: squelch unused variable warnings from ASSERT

Reviewer: @jnealtowns

We occasionally need to define variables solely for the purpose of asserting
on them. These assertions are compiled out on release builds, so the compiler
will warn that these variables are unused.

Using AIM_REFERENCE in the release assert macro mostly solves the problem, but
there's a chance that the assertion is actually a function call that the
compiler might not be able to optimize away. Using sizeof ensures the compiler
won't generate any code on a release build.