Skip to content

Commit

Permalink
style: address compiler warnings in the gumbo source
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Dec 20, 2024
1 parent f769a04 commit 8c6b0b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gumbo-parser/src/ascii.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ const unsigned char _gumbo_ascii_table[0x80] = {
};

// Table generation code.
// clang -DGUMBO_GEN_TABLE=1 ascii.c && ./a.out && rm a.out
#if GUMBO_GEN_TABLE
// clang -DGUMBO_GEN_TABLE ascii.c && ./a.out && rm a.out
#ifdef GUMBO_GEN_TABLE
#include <stdio.h>

int main() {
Expand Down
4 changes: 2 additions & 2 deletions gumbo-parser/src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static GumboNode* create_node(GumboNodeType type) {
return node;
}

static GumboNode* new_document_node() {
static GumboNode* new_document_node(void) {
GumboNode* document_node = create_node(GUMBO_NODE_DOCUMENT);
document_node->parse_flags = GUMBO_INSERTION_BY_PARSER;
gumbo_vector_init(1, &document_node->v.document.children);
Expand Down Expand Up @@ -1997,7 +1997,7 @@ static void adjust_svg_tag(GumboToken* token) {
assert(token->type == GUMBO_TOKEN_START_TAG);
if (token->v.start_tag.tag == GUMBO_TAG_FOREIGNOBJECT) {
assert(token->v.start_tag.name == NULL);
token->v.start_tag.name = "foreignObject";
token->v.start_tag.name = (char *)"foreignObject";
} else if (token->v.start_tag.tag == GUMBO_TAG_UNKNOWN) {
assert(token->v.start_tag.name);
const StringReplacement *replacement = gumbo_get_svg_tag_replacement(
Expand Down

0 comments on commit 8c6b0b4

Please sign in to comment.