cmakelists: fixed tests to avoid clang warnings (#10705)

* clang/"dead assignment"
* clang/"Uninitialized argument value"
This commit is contained in:
Ihor Antonov
2019-08-07 06:49:33 -04:00
committed by Daniel Hahler
parent 4f148edd75
commit 935ae63a48

View File

@@ -250,7 +250,7 @@ check_c_source_compiles("
int main(void) int main(void)
{ {
void *trace[1]; void *trace[1];
int trace_size = backtrace(trace, 1); backtrace(trace, 1);
return 0; return 0;
} }
" HAVE_EXECINFO_BACKTRACE) " HAVE_EXECINFO_BACKTRACE)
@@ -258,7 +258,7 @@ int main(void)
check_c_source_compiles(" check_c_source_compiles("
int main(void) int main(void)
{ {
int a; int a = 42;
__builtin_add_overflow(a, a, &a); __builtin_add_overflow(a, a, &a);
__builtin_sub_overflow(a, a, &a); __builtin_sub_overflow(a, a, &a);
return 0; return 0;