Skip to content

Commit 4086019

Browse files
committed
add -Wextra to our checks
1 parent 88f992e commit 4086019

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/workflows/ubuntu_pedantic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: cmake -D ADA_TESTING=ON -DBUILD_SHARED_LIBS=${{matrix.shared}} -G Ninja -B build
3535
env:
3636
CXX: g++-12
37-
CXXFLAGS: -Werror
37+
CXXFLAGS: -Werror -Wextra
3838
- name: Build
3939
run: cmake --build build -j=4
4040
- name: Test

include/ada/url_pattern_helpers-inl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ constructor_string_parser<regex_provider>::is_non_special_pattern_char(
102102
// If token’s value is not value, then return false.
103103
// TODO: Remove this once we make sure get_safe_token returns a non-empty
104104
// string.
105-
if (!token->value.empty() && token->value[0] != value) {
105+
if (!token->value.empty() &&
106+
static_cast<uint32_t>(token->value[0]) != value) {
106107
return false;
107108
}
108109

tests/wpt_urlpattern_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ std::variant<ada::url_pattern_init, ada::url_pattern_options> parse_init(
146146
auto key = field.key().value();
147147
std::string_view value;
148148
if (field.value().get_string(value)) {
149-
bool value_true;
150-
EXPECT_FALSE(field.value().get_bool().get(value_true));
151-
return ada::url_pattern_options{.ignore_case = value_true};
149+
bool ignore_case = false;
150+
EXPECT_FALSE(field.value().get_bool().get(ignore_case));
151+
return ada::url_pattern_options{.ignore_case = ignore_case};
152152
}
153153
if (key == "protocol") {
154154
init.protocol = std::string(value);

0 commit comments

Comments
 (0)