compiler: fix remaining warnings
This commit is contained in:
parent
3f9141616b
commit
7ecadefbfd
2 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue