Skip to content

Commit

Permalink
Fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
macdrevx committed Feb 1, 2024
1 parent 1055af6 commit 5483fb0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Sources/CGumboParser/gumbo.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ typedef struct {
* name. It also has efficiency benefits, by letting the parser work
* with enums instead of strings.
*/
typedef enum {
typedef enum : size_t {
GUMBO_TAG_HTML,
GUMBO_TAG_HEAD,
GUMBO_TAG_TITLE,
Expand Down
2 changes: 1 addition & 1 deletion Sources/CGumboParser/insertion_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// https://html.spec.whatwg.org/multipage/parsing.html#insertion-mode
// If new enum values are added, be sure to update the kTokenHandlers
// dispatch table in parser.c.
typedef enum {
typedef enum : size_t {
GUMBO_INSERTION_MODE_INITIAL,
GUMBO_INSERTION_MODE_BEFORE_HTML,
GUMBO_INSERTION_MODE_BEFORE_HEAD,
Expand Down
2 changes: 1 addition & 1 deletion Sources/CGumboParser/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -4495,7 +4495,7 @@ HOT GumboOutput* gumbo_parse_with_options (
break;
}
gumbo_debug (
"Handling %s token @%zu:%zu in state %u.\n",
"Handling %s token @%zu:%zu in state %zu.\n",
(char*) token_type,
token.position.line,
token.position.column,
Expand Down
2 changes: 1 addition & 1 deletion Sources/CGumboParser/svg_attrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ hash (register const char *str, register size_t len)
78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
78, 78, 78, 78, 78, 78, 78, 78
};
register unsigned int hval = len;
register unsigned int hval = (unsigned int)len;

switch (hval)
{
Expand Down
2 changes: 1 addition & 1 deletion Sources/CGumboParser/svg_tags.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ hash (register const char *str, register size_t len)
43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43
};
register unsigned int hval = len;
register unsigned int hval = (unsigned int)len;

switch (hval)
{
Expand Down
2 changes: 1 addition & 1 deletion Sources/CGumboParser/tag_lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ hash (register const char *str, register size_t len)
272, 272, 272, 272, 272, 272, 272, 272, 272, 272,
272, 272, 272, 272, 272, 272, 272, 272, 272
};
register unsigned int hval = len;
register unsigned int hval = (unsigned int)len;

switch (hval)
{
Expand Down

0 comments on commit 5483fb0

Please sign in to comment.