From 5ff537bdaf77f0bd8bc7393f8315d91c220f939e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 7 Jan 2019 20:48:12 +0100 Subject: Fix potential use of uninitialized values --- src/n3.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/n3.c b/src/n3.c index 0a0760a4..fe11bcfe 100644 --- a/src/n3.c +++ b/src/n3.c @@ -416,9 +416,9 @@ is_PN_CHARS_BASE(const uint32_t c) static SerdStatus read_PN_CHARS_BASE(SerdReader* reader, SerdNode* dest) { - uint32_t code; - const uint8_t c = peek_byte(reader); - SerdStatus st = SERD_SUCCESS; + uint32_t code = 0; + const uint8_t c = peek_byte(reader); + SerdStatus st = SERD_SUCCESS; if (is_alpha(c)) { push_byte(reader, dest, eat_byte_safe(reader, c)); } else if (!(c & 0x80)) { @@ -446,9 +446,9 @@ is_PN_CHARS(const uint32_t c) static SerdStatus read_PN_CHARS(SerdReader* reader, SerdNode* dest) { - uint32_t code; - const uint8_t c = peek_byte(reader); - SerdStatus st = SERD_SUCCESS; + uint32_t code = 0; + const uint8_t c = peek_byte(reader); + SerdStatus st = SERD_SUCCESS; if (is_alpha(c) || is_digit(c) || c == '_' || c == '-') { push_byte(reader, dest, eat_byte_safe(reader, c)); } else if (!(c & 0x80)) { -- cgit v1.2.1