aboutsummaryrefslogtreecommitdiff
path: root/compiler.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2020-09-11 01:38:44 -0700
committerBruce Hill <bruce@bruce-hill.com>2020-09-11 01:38:44 -0700
commit2baadd9ba00a84b3daa5c7028e7129223fbd5b1d (patch)
treeadfc8af77a7edd866f28e0853aa6d7460b7abb86 /compiler.c
parent05ad83f8f08a342042e4cd05abbee733833c40a7 (diff)
Tightening up the makefile flags and vim modelines
Diffstat (limited to 'compiler.c')
-rw-r--r--compiler.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler.c b/compiler.c
index 88919cf..067101b 100644
--- a/compiler.c
+++ b/compiler.c
@@ -157,7 +157,7 @@ vm_op_t *bpeg_simplepattern(const char *str)
len = unescape_string(literal, literal, len);
op->op = VM_STRING;
- op->len = len;
+ op->len = (ssize_t)len;
op->args.s = literal;
check(matchchar(&str, endquote), "Missing closing quote");
@@ -372,8 +372,8 @@ vm_op_t *bpeg_simplepattern(const char *str)
const char *refname = str;
str = after_name(str);
op->op = VM_REF;
- op->len = (size_t)(str - refname);
- op->args.s = strndup(refname, op->len);
+ op->len = (ssize_t)(str - refname);
+ op->args.s = strndup(refname, (size_t)op->len);
break;
} else {
free(op);
@@ -410,7 +410,7 @@ vm_op_t *bpeg_stringpattern(const char *str)
size_t len = (size_t)(str - literal);
literal = strndup(literal, len);
len = unescape_string(literal, literal, len);
- strop->len = len;
+ strop->len = (ssize_t)len;
strop->args.s = literal;
strop->end = str;
@@ -459,3 +459,5 @@ vm_op_t *bpeg_pattern(const char *str)
if (op != NULL) op = expand_choices(op);
return op;
}
+
+// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1