mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
Make memcheck/tests/clientperm clang-friendly
The use of the ternary operator was causing diffs compared to GCC output. Switching to use two 'ifs' should remove this difference.
This commit is contained in:
parent
54ee45d208
commit
1ec5d23e73
@ -26,14 +26,20 @@ int main ( void )
|
||||
|
||||
for (i = 0; i < 100; i++)
|
||||
sum += aa[i];
|
||||
printf("sum is %s\n", sum > 0 ? "positive" : "non-positive");
|
||||
if (sum > 0)
|
||||
printf("sum is positive\n");
|
||||
else
|
||||
printf("sum is non-positive\n");
|
||||
|
||||
m = VALGRIND_DISCARD(m);
|
||||
printf("m_rm: returned value is %d\n", m );
|
||||
|
||||
for (i = 0; i < 100; i++)
|
||||
sum += aa[i];
|
||||
printf("sum is %s\n", sum > 0 ? "positive" : "non-positive");
|
||||
if (sum > 0)
|
||||
printf("sum is positive\n");
|
||||
else
|
||||
printf("sum is non-positive\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2,5 +2,5 @@ Conditional jump or move depends on uninitialised value(s)
|
||||
at 0x........: main (clientperm.c:29)
|
||||
|
||||
Conditional jump or move depends on uninitialised value(s)
|
||||
at 0x........: main (clientperm.c:36)
|
||||
at 0x........: main (clientperm.c:39)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user