diff options
author | David Robillard <d@drobilla.net> | 2020-09-27 16:53:12 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-09-27 16:56:02 +0200 |
commit | b857fcc6a1cb09190c6a6f293aa937c258bd20a9 (patch) | |
tree | a68a5039f230d6ee69b65f3b5be0d82ddde1a039 | |
parent | d4d9b9607076f66a8b323debbec2dcd8fe9aad36 (diff) | |
download | sratom-b857fcc6a1cb09190c6a6f293aa937c258bd20a9.tar.gz sratom-b857fcc6a1cb09190c6a6f293aa937c258bd20a9.tar.bz2 sratom-b857fcc6a1cb09190c6a6f293aa937c258bd20a9.zip |
Initialize all variables
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | src/sratom.c | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/.clang-tidy b/.clang-tidy index 49a21f2..18a5a54 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -7,7 +7,6 @@ Checks: > -bugprone-suspicious-string-compare, -cert-err34-c, -clang-analyzer-unix.Malloc, - -cppcoreguidelines-init-variables, -hicpp-signed-bitwise, -llvm-header-guard, -readability-else-after-return, diff --git a/src/sratom.c b/src/sratom.c index 222d12c..248906f 100644 --- a/src/sratom.c +++ b/src/sratom.c @@ -604,7 +604,7 @@ read_literal(Sratom* sratom, LV2_Atom_Forge* forge, const SordNode* node) } else if (!strcmp(type_uri, LV2_MIDI__MidiEvent)) { lv2_atom_forge_atom(forge, len / 2, sratom->midi_MidiEvent); for (const char* s = str; s < str + len; s += 2) { - unsigned num; + unsigned num = 0u; sscanf(s, "%2X", &num); const uint8_t c = num; lv2_atom_forge_raw(forge, &c, 1); @@ -658,7 +658,7 @@ read_object(Sratom* sratom, if (mode == MODE_SEQUENCE) { SordNode* time = sord_get( model, node, sratom->nodes.atom_beatTime, NULL, NULL); - uint32_t seq_unit; + uint32_t seq_unit = 0u; if (time) { const char* time_str = (const char*)sord_node_get_string(time); lv2_atom_forge_beat_time(forge, serd_strtod(time_str, NULL)); |