From e101167e55a99756cda8f86a7677959654dcbb8c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 9 Jul 2015 16:12:31 +0200 Subject: [PATCH] systemd: fix compiler warning about uninitialized variable make[4]: Entering directory './NetworkManager/src' CC libsystemd_nm_la-util.lo systemd/src/basic/util.c: In function 'cunescape_length_with_prefix': systemd/src/basic/util.c:1271:30: error: 'u' may be used uninitialized in this function [-Werror=maybe-uninitialized] t += utf8_encode_unichar(t, u); ^ systemd/src/basic/util.c:1230:26: note: 'u' was declared here uint32_t u; ^ --- src/systemd/src/basic/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systemd/src/basic/util.c b/src/systemd/src/basic/util.c index 8fe59574f8..6b07face07 100644 --- a/src/systemd/src/basic/util.c +++ b/src/systemd/src/basic/util.c @@ -1227,7 +1227,7 @@ int cunescape_length_with_prefix(const char *s, size_t length, const char *prefi for (f = s, t = r + pl; f < s + length; f++) { size_t remaining; - uint32_t u; + uint32_t u = 0; char c; int k;