Suppress unusedStructMember except on unused check builds.

The reason is that we might have struct members as part of a public
API and we don't want to have the unused checker complaining about
the fact that they are never used when just scanning headers
Fix duplication of WARN_ONLY in test where WARN_ONLY is not required.
Merge pull request #13 from smspillaz/cppcheck-target-cmake.item_13

Suppress unusedStructMember except on unused check builds.