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;
                            ^
This commit is contained in:
Thomas Haller
2015-07-09 16:12:31 +02:00
parent 2deaa39921
commit e101167e55

View File

@@ -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;