[systemd-devel] [PATCH 1/5] journal : fix uninitialized var in coredump
philippedeswert at gmail.com
philippedeswert at gmail.com
Thu Oct 16 14:43:49 PDT 2014
From: Philippe De Swert <philippedeswert at gmail.com>
"Fix" the following warning:
src/journal/coredump.c: In function ‘main’:
src/journal/coredump.c:717:42: warning: ‘sz’ may be used uninitialized in this function [-Wmaybe-uninitialized]
---
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 79f51d1..9971db9 100644
--- a/src/journal/coredump.c
+++ b/src/journal/coredump.c
@@ -707,7 +707,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 */
--
1.8.3.2
More information about the systemd-devel
mailing list