aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils.c2
-rw-r--r--utils.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/utils.c b/utils.c
index 2572b33..cac2c7d 100644
--- a/utils.c
+++ b/utils.c
@@ -116,7 +116,7 @@ unsigned char unescapechar(const char *escaped, const char **end)
break;
}
case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': { // Octal
- ret = escaped[0] - '0';
+ ret = (unsigned char)escaped[0] - '0';
if ('0' <= escaped[1] && escaped[1] <= '7') {
++len;
ret = (ret << 3) | (escaped[1] - '0');
diff --git a/utils.h b/utils.h
index 83659d9..75026c6 100644
--- a/utils.h
+++ b/utils.h
@@ -20,7 +20,7 @@
__attribute__((nonnull))
unsigned char unescapechar(const char *escaped, const char **end);
-__attribute__((pure, nonnull, returns_nonnull))
+__attribute__((pure, nonnull))
const char *after_name(const char *str);
__attribute__((pure, nonnull, returns_nonnull))
const char *after_spaces(const char *str);