Skip to content

Commit

Permalink
dev: quash gumbo compiler warnings 202412 (#3387)
Browse files Browse the repository at this point in the history
**What problem is this PR intended to solve?**

I'm seeing some compiler warnings, so just doing some cleanup.

cc @stevecheckoway
  • Loading branch information
flavorjones authored Dec 20, 2024
2 parents 22fe69e + 8c6b0b4 commit c725720
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Nokogiri follows [Semantic Versioning](https://semver.org/), please see the [REA

---

## 1.18.0.rc1 / 2024-12-16
## v1.18.0.rc1 / 2024-12-16

### Notable Changes

Expand Down
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 c725720

Please sign in to comment.