Revert "Inline 'result' variable to avoid gcc warning about unused variable."

This reverts commit 25bdb1aef36d94271d1565e3cc66b10f61512b1f.
Evaluate condition to avoid 'unused-variable' warnings in release mode.