Merge topic 'CheckStructHasMember-avoid-breakage-on-Wall'

8d6ba358 CheckStructHasMember: Avoid clang -Wall breakage (#15203)
This commit is contained in:
Brad King 2014-10-31 11:35:04 -04:00 committed by CMake Topic Stage
commit 14a983cce6
1 changed files with 1 additions and 2 deletions

View File

@ -69,8 +69,7 @@ macro (CHECK_STRUCT_HAS_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
${_INCLUDE_FILES}
int main()
{
${_STRUCT}* tmp;
(void) tmp->${_MEMBER};
(void)((${_STRUCT} *)0)->${_MEMBER};
return 0;
}
")