aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-01-07 20:48:12 +0100
committerDavid Robillard <d@drobilla.net>2019-04-13 19:48:23 +0200
commit5ff537bdaf77f0bd8bc7393f8315d91c220f939e (patch)
treeea40aac719b495952f710045a44aa59246a7716a
parent2719fc4709d05193aa89557051af1d65a738c4d5 (diff)
downloadserd-5ff537bdaf77f0bd8bc7393f8315d91c220f939e.tar.gz
serd-5ff537bdaf77f0bd8bc7393f8315d91c220f939e.tar.bz2
serd-5ff537bdaf77f0bd8bc7393f8315d91c220f939e.zip
Fix potential use of uninitialized values
-rw-r--r--src/n3.c12
1 files 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)) {