diff options
Diffstat (limited to 'test/tree-buf.c')
-rw-r--r-- | test/tree-buf.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/tree-buf.c b/test/tree-buf.c index 2c623e1..658e8e8 100644 --- a/test/tree-buf.c +++ b/test/tree-buf.c @@ -282,6 +282,8 @@ int create_comment(void *ctx, const hubbub_string *data, void **result) { node_t *node = calloc(1, sizeof *node); + UNUSED(ctx); + node->type = COMMENT; node->data.content = strndup((const char *) data->ptr, data->len); node->refcnt = 1; @@ -296,6 +298,8 @@ int create_doctype(void *ctx, const hubbub_doctype *doctype, void **result) { node_t *node = calloc(1, sizeof *node); + UNUSED(ctx); + node->type = DOCTYPE; node->data.doctype.name = strndup( (const char *) doctype->name.ptr, @@ -323,6 +327,8 @@ int create_element(void *ctx, const hubbub_tag *tag, void **result) { node_t *node = calloc(1, sizeof *node); + UNUSED(ctx); + assert(tag->ns < NUM_NAMESPACES); node->type = ELEMENT; @@ -361,6 +367,8 @@ int create_text(void *ctx, const hubbub_string *data, void **result) { node_t *node = calloc(1, sizeof *node); + UNUSED(ctx); + node->type = CHARACTER; node->data.content = strndup((const char *) data->ptr, data->len); node->refcnt = 1; @@ -375,6 +383,8 @@ int ref_node(void *ctx, void *node) { node_t *n = node; + UNUSED(ctx); + if (node != (void *) 1) n->refcnt++; @@ -385,6 +395,8 @@ int unref_node(void *ctx, void *node) { node_t *n = node; + UNUSED(ctx); + if (n != (void *) 1) { assert(n->refcnt > 0); @@ -622,6 +634,8 @@ int reparent_children(void *ctx, void *node, void *new_parent) node_t *insert; node_t *kids; + UNUSED(ctx); + kids = old_parent->child; if (!kids) return 0; @@ -649,6 +663,8 @@ int reparent_children(void *ctx, void *node, void *new_parent) int get_parent(void *ctx, void *node, bool element_only, void **result) { + UNUSED(element_only); + *result = ((node_t *)node)->parent; if (*result != NULL) @@ -659,6 +675,8 @@ int get_parent(void *ctx, void *node, bool element_only, void **result) int has_children(void *ctx, void *node, bool *result) { + UNUSED(ctx); + *result = ((node_t *)node)->child ? true : false; return 0; @@ -666,6 +684,10 @@ int has_children(void *ctx, void *node, bool *result) int form_associate(void *ctx, void *form, void *node) { + UNUSED(ctx); + UNUSED(form); + UNUSED(node); + return 0; } @@ -675,6 +697,8 @@ int add_attributes(void *ctx, void *vnode, node_t *node = vnode; size_t old_elems = node->data.element.n_attrs; + UNUSED(ctx); + node->data.element.n_attrs += n_attributes; node->data.element.attrs = realloc(node->data.element.attrs, @@ -703,6 +727,9 @@ int add_attributes(void *ctx, void *vnode, int set_quirks_mode(void *ctx, hubbub_quirks_mode mode) { + UNUSED(ctx); + UNUSED(mode); + return 0; } |