diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/n3.c | 4 | ||||
-rw-r--r-- | src/stack.h | 2 | ||||
-rw-r--r-- | src/string_utils.h | 8 |
3 files changed, 7 insertions, 7 deletions
@@ -310,14 +310,14 @@ read_ws_star(SerdReader* reader) } static inline bool -peek_delim(SerdReader* reader, const char delim) +peek_delim(SerdReader* reader, const uint8_t delim) { read_ws_star(reader); return peek_byte(reader) == delim; } static inline bool -eat_delim(SerdReader* reader, const char delim) +eat_delim(SerdReader* reader, const uint8_t delim) { if (peek_delim(reader, delim)) { eat_byte_safe(reader, delim); diff --git a/src/stack.h b/src/stack.h index fef33390..ac30658c 100644 --- a/src/stack.h +++ b/src/stack.h @@ -47,7 +47,7 @@ serd_stack_new(size_t size) } static inline bool -serd_stack_is_empty(SerdStack* stack) +serd_stack_is_empty(const SerdStack* stack) { return stack->size <= SERD_STACK_BOTTOM; } diff --git a/src/string_utils.h b/src/string_utils.h index ac2b40c5..a5dad100 100644 --- a/src/string_utils.h +++ b/src/string_utils.h @@ -84,7 +84,7 @@ is_print(const int c) } static inline bool -is_base64(const uint8_t c) +is_base64(const int c) { return is_alpha(c) || is_digit(c) || c == '+' || c == '/' || c == '='; } @@ -146,9 +146,9 @@ utf8_num_bytes(const uint8_t c) static inline uint32_t parse_counted_utf8_char(const uint8_t* utf8, size_t size) { - uint32_t c = utf8[0] & ((1u << (8 - size)) - 1); + uint32_t c = utf8[0] & ((1u << (8u - size)) - 1u); for (size_t i = 1; i < size; ++i) { - const uint8_t in = utf8[i] & 0x3F; + const uint8_t in = utf8[i] & 0x3Fu; c = (c << 6) | in; } return c; @@ -166,7 +166,7 @@ parse_utf8_char(const uint8_t* utf8, size_t* size) return parse_counted_utf8_char(utf8, *size); default: *size = 0; - return 0; + return 0u; } } |