aboutsummaryrefslogtreecommitdiff
path: root/pattern.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-17 23:06:37 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-17 23:06:37 -0800
commitffdf32da2f20d21d5adee1231e3ac8207edab78d (patch)
tree25f05c94ab280d85b5934cc6607909a35c8c22fb /pattern.c
parentff597be5fc52d1d8bd8050fc81050308f76c9b05 (diff)
Code cleanup on utils
Diffstat (limited to 'pattern.c')
-rw-r--r--pattern.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pattern.c b/pattern.c
index b378bc3..94643f9 100644
--- a/pattern.c
+++ b/pattern.c
@@ -284,11 +284,11 @@ static pat_t *_bp_simplepattern(file_t *f, const char *str)
pat_t *esc;
const char *opstart = str;
- unsigned char e = unescapechar(str, &str);
+ unsigned char e = (unsigned char)unescapechar(str, &str);
if (*str == '-') { // Escape range (e.g. \x00-\xFF)
++str;
const char *seqstart = str;
- unsigned char e2 = unescapechar(str, &str);
+ unsigned char e2 = (unsigned char)unescapechar(str, &str);
if (str == seqstart)
file_err(f, seqstart, str+1, "This value isn't a valid escape sequence");
if (e2 < e)
@@ -516,7 +516,7 @@ pat_t *bp_stringpattern(file_t *f, const char *str)
}
const char *after_escape;
- unsigned char e = unescapechar(&str[1], &after_escape);
+ char e = unescapechar(&str[1], &after_escape);
// If there is not a special escape sequence (\n, \x0A, etc.)
// or \\, \", \', \`, then check for an interpolated value:
// The special cases for single and double quotes aren't