Skip to content

Commit 9a20ce7

Browse files
committed
Add explicit int to unsigned
1 parent 2c47c5e commit 9a20ce7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/grammar/parser-lalr-main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ int n_nodes;
7373
struct node *mk_node(char const *name, int n, ...) {
7474
va_list ap;
7575
int i = 0;
76-
unsigned sz = sizeof(struct node) + (n * sizeof(struct node *));
76+
unsigned int sz = sizeof(struct node) + (n * sizeof(struct node *));
7777
struct node *nn, *nd = (struct node *)malloc(sz);
7878

7979
print("# New %d-ary node: %s = %p\n", n, name, nd);
@@ -114,7 +114,7 @@ struct node *mk_none() {
114114
struct node *ext_node(struct node *nd, int n, ...) {
115115
va_list ap;
116116
int i = 0, c = nd->n_elems + n;
117-
unsigned sz = sizeof(struct node) + (c * sizeof(struct node *));
117+
unsigned int sz = sizeof(struct node) + (c * sizeof(struct node *));
118118
struct node *nn;
119119

120120
print("# Extending %d-ary node by %d nodes: %s = %p",

0 commit comments

Comments
 (0)