aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-07-09 21:31:54 +0200
committerDavid Robillard <d@drobilla.net>2017-07-10 12:06:56 +0200
commit5e9b029e9add90981d31e5577f358ec7db3de3ca (patch)
tree1be65d2a2a96c41f45fd39160a84912825d66ad4 /src
parentb43a5bd6dc50195f250e5d94289645610ede0e3e (diff)
downloadserd-5e9b029e9add90981d31e5577f358ec7db3de3ca.tar.gz
serd-5e9b029e9add90981d31e5577f358ec7db3de3ca.tar.bz2
serd-5e9b029e9add90981d31e5577f358ec7db3de3ca.zip
Fix potential use of uninitialized variable
Diffstat (limited to 'src')
-rw-r--r--src/reader.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/reader.c b/src/reader.c
index 91e0e920..d3a3336e 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -551,8 +551,8 @@ read_STRING_LITERAL(SerdReader* reader, SerdNodeFlags* flags, uint8_t q)
{
Ref ref = push_node(reader, SERD_LITERAL, "", 0);
while (true) {
- const uint8_t c = peek_byte(reader);
- uint32_t code;
+ const uint8_t c = peek_byte(reader);
+ uint32_t code = 0;
switch (c) {
case '\n': case '\r':
r_err(reader, SERD_ERR_BAD_SYNTAX, "line end in short string\n");
@@ -798,7 +798,7 @@ read_IRIREF(SerdReader* reader)
return pop_node(reader, ref);
}
- uint32_t code;
+ uint32_t code = 0;
while (true) {
const uint8_t c = peek_byte(reader);
switch (c) {