diff --git a/compiler/capnpc-c.c b/compiler/capnpc-c.c index 3ec7f2c..46c2ca9 100644 --- a/compiler/capnpc-c.c +++ b/compiler/capnpc-c.c @@ -48,7 +48,7 @@ static int g_val0used, g_nullused; static struct capn_tree *g_node_tree; -struct node *find_node(uint64_t id) { +static struct node *find_node(uint64_t id) { /* * TODO: an Annotation is technically a node (since it can show up in diff --git a/compiler/str.h b/compiler/str.h index 540993e..37a95a8 100644 --- a/compiler/str.h +++ b/compiler/str.h @@ -20,27 +20,27 @@ extern char str_static[]; void str_reserve(struct str *v, int sz); -static void str_init(struct str *v, int sz) { +static inline void str_init(struct str *v, int sz) { v->str = str_static; v->len = v->cap = 0; if (sz) str_reserve(v, sz); } -static void str_release(struct str *v) { +static inline void str_release(struct str *v) { if (v->cap) { free(v->str); } } -static void str_reset(struct str *v) { +static inline void str_reset(struct str *v) { if (v->len) { v->len = 0; v->str[0] = '\0'; } } -static void str_setlen(struct str *v, int sz) { +static inline void str_setlen(struct str *v, int sz) { str_reserve(v, sz); v->str[sz] = '\0'; v->len = sz;