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:
committed by
Luca Boccassi
parent
909eb4c01d
commit
3d41b6b8e8
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user