diff options
author | David Robillard <d@drobilla.net> | 2019-01-07 20:48:12 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-04-13 19:48:23 +0200 |
commit | 5ff537bdaf77f0bd8bc7393f8315d91c220f939e (patch) | |
tree | ea40aac719b495952f710045a44aa59246a7716a | |
parent | 2719fc4709d05193aa89557051af1d65a738c4d5 (diff) | |
download | serd-5ff537bdaf77f0bd8bc7393f8315d91c220f939e.tar.gz serd-5ff537bdaf77f0bd8bc7393f8315d91c220f939e.tar.bz2 serd-5ff537bdaf77f0bd8bc7393f8315d91c220f939e.zip |
Fix potential use of uninitialized values
-rw-r--r-- | src/n3.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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)) { |