Initialized "cmd" (and "buf" for symmetry) to sooth clang >= 8 #501
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Picked up work at #499 after merging of #500 and found out that a newer clang compiler (somewhere between 7.0.0 and 8.0.0) caused problems that show up with valgrind. GCC up to version 9.1.0 caused no trouble.
(Last good commit was 1b3792b so it was something I did)
Commandline :
LTM_CFLAGS=" -g3 " ./testme.sh --with-cc=clang-8 --test-vs-mtest=333 --with-valgrind --valgrind-options="--track-origins=yes"
Result in
test_vs_mtest_err.log
Line 70 is
srand(LTM_MTEST_RAND_SEED);
Line 336 is
} else if (strcmp(cmd, "invmod") == 0) {
Difference of assembler dumps (left column with
cmd = {0};
right as it was):Difference between Clang 7.0.0 and Clang 8.0.0, no initialisation of
cmd
Well, Clang is correct, technically, no doubt.
Mmh…is initializing
cmd
enough here?(I just saw that I initialized the buffers with
0
instead of\0
. To late for now, have to go.)