summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2016-10-20 11:16:19 +0000
committerMichael Kruse <llvm@meinersbur.de>2016-10-20 11:16:19 +0000
commit3d0266b66446dd1cd0a9d843dd8cd20954e9b980 (patch)
tree9471b9c018cb27576f9fed11be5221c547e71161
parent618d3aedaf3d6e346cf528f3e9524360f881eb66 (diff)
downloadbcm5719-llvm-3d0266b66446dd1cd0a9d843dd8cd20954e9b980.tar.gz
bcm5719-llvm-3d0266b66446dd1cd0a9d843dd8cd20954e9b980.zip
[cmake] Avoid warnings in feature tests. NFC.
Apply the __attribute__((unused)) before the function to unambiguously apply to the function declaration. Add more casts-to-void to mark return values unused as intended. Contributed-by: Andy Gibbs <andyg1001@hotmail.co.uk> llvm-svn: 284718
-rw-r--r--polly/lib/External/CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/polly/lib/External/CMakeLists.txt b/polly/lib/External/CMakeLists.txt
index 7471cef04ae..eafb6be7619 100644
--- a/polly/lib/External/CMakeLists.txt
+++ b/polly/lib/External/CMakeLists.txt
@@ -65,7 +65,7 @@ if (HAS_ATTRIBUTE_WARN_UNUSED_RESULT)
endif ()
check_c_source_compiles("
- static void foo(void) __attribute__ ((unused));
+ __attribute__ ((unused)) static void foo(void);
int main() { return 0; }
" HAVE___ATTRIBUTE__)
@@ -76,12 +76,12 @@ check_c_source_compiles_numeric("
" HAVE_DECL_FFS)
check_c_source_compiles_numeric("
- int main() { __builtin_ffs(0); return 0; }
+ int main() { (void)__builtin_ffs(0); return 0; }
" HAVE_DECL___BUILTIN_FFS)
check_c_source_compiles_numeric("
#include <intrin.h>
- int main() { _BitScanForward(NULL, 0); return 0; }
+ int main() { (void)_BitScanForward(NULL, 0); return 0; }
" HAVE_DECL__BITSCANFORWARD)
if (NOT HAVE_DECL_FFS AND
@@ -98,7 +98,7 @@ check_c_source_compiles_numeric("
check_c_source_compiles_numeric("
#include <string.h>
- int main() { _stricmp(\"\", \"\"); return 0; }
+ int main() { (void)_stricmp(\"\", \"\"); return 0; }
" HAVE_DECL__STRICMP)
if (NOT HAVE_DECL_STRCASECMP AND NOT HAVE_DECL__STRICMP)
@@ -113,7 +113,7 @@ check_c_source_compiles_numeric("
check_c_source_compiles_numeric("
#include <string.h>
- int main() { _strnicmp(\"\", \"\", 0); return 0; }
+ int main() { (void)_strnicmp(\"\", \"\", 0); return 0; }
" HAVE_DECL__STRNICMP)
if (NOT HAVE_DECL_STRNCASECMP AND NOT HAVE_DECL__STRNICMP)
OpenPOWER on IntegriCloud