[systemd-devel] [PATCH] coredump: suppress uninitialized sz warning

Daniel Buch boogiewasthere at gmail.com
Wed Jul 23 01:02:57 PDT 2014


Its false positive but lets make gcc happy
---
 src/journal/coredump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/journal/coredump.c b/src/journal/coredump.c
index 182c2b1..a361a51 100644
--- a/src/journal/coredump.c
+++ b/src/journal/coredump.c
@@ -700,7 +700,7 @@ log:
         /* Optionally store the entire coredump in the journal */
         if (IN_SET(arg_storage, COREDUMP_STORAGE_JOURNAL, COREDUMP_STORAGE_BOTH) &&
             coredump_size <= (off_t) arg_journal_size_max) {
-                size_t sz;
+                size_t sz = 0;
 
                 /* Store the coredump itself in the journal */
 
-- 
2.0.2



More information about the systemd-devel mailing list