tree-wide: Fix false positives on newer gcc

Recent gcc versions have started to trigger false positive
maybe-uninitialized warnings. Let's make sure we initialize
variables annotated with _cleanup_ to avoid these.
This commit is contained in:
Daan De Meyer
2023-05-23 19:45:27 +01:00
committed by Luca Boccassi
parent 909eb4c01d
commit 3d41b6b8e8
26 changed files with 56 additions and 56 deletions
+1 -1
View File
@@ -259,7 +259,7 @@ TEST(strextend_with_separator) {
}
TEST(strrep) {
_cleanup_free_ char *one, *three, *zero;
_cleanup_free_ char *one = NULL, *three = NULL, *zero = NULL;
one = strrep("waldo", 1);
three = strrep("waldo", 3);
zero = strrep("waldo", 0);