Skip to content

Commit

Permalink
add -Wextra to our checks
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Feb 27, 2025
1 parent 88f992e commit 727a997
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu_pedantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: cmake -D ADA_TESTING=ON -DBUILD_SHARED_LIBS=${{matrix.shared}} -G Ninja -B build
env:
CXX: g++-12
CXXFLAGS: -Werror
CXXFLAGS: -Werror -Wextra
- name: Build
run: cmake --build build -j=4
- name: Test
Expand Down
3 changes: 2 additions & 1 deletion include/ada/url_pattern_helpers-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ constructor_string_parser<regex_provider>::is_non_special_pattern_char(
// If token’s value is not value, then return false.
// TODO: Remove this once we make sure get_safe_token returns a non-empty
// string.
if (!token->value.empty() && token->value[0] != value) {
if (!token->value.empty() &&
static_cast<uint32_t>(token->value[0]) != value) {
return false;
}

Expand Down
6 changes: 3 additions & 3 deletions tests/wpt_urlpattern_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ std::variant<ada::url_pattern_init, ada::url_pattern_options> parse_init(
auto key = field.key().value();
std::string_view value;
if (field.value().get_string(value)) {
bool value_true;
EXPECT_FALSE(field.value().get_bool().get(value_true));
return ada::url_pattern_options{.ignore_case = value_true};
bool ignore_case = false;
EXPECT_FALSE(field.value().get_bool().get(ignore_case));
return ada::url_pattern_options{.ignore_case = ignore_case};
}
if (key == "protocol") {
init.protocol = std::string(value);
Expand Down

0 comments on commit 727a997

Please sign in to comment.