-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning removals in test code #2399
Conversation
Mostly 0 to nullptr and adding override to virtual function implementations.
I hadn't tried to compile the module test, I'll see if I can fix that warning up without using FMT_MAYBE_UNUSED. |
@@ -129,6 +129,7 @@ class suppress_assert { | |||
~suppress_assert() { | |||
_set_invalid_parameter_handler(original_handler_); | |||
_CrtSetReportMode(_CRT_ASSERT, original_report_mode_); | |||
(void)original_report_mode_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. LGTM but please address the inline nits.
@@ -129,6 +129,7 @@ class suppress_assert { | |||
~suppress_assert() { | |||
_set_invalid_parameter_handler(original_handler_); | |||
_CrtSetReportMode(_CRT_ASSERT, original_report_mode_); | |||
(void)original_report_mode_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please.
fmt::basic_string_view<Char> str = fmt::basic_string_view<Char>(0, 1)) { | ||
void check_utf_conversion_error(const char* message, | ||
fmt::basic_string_view<Char> str = | ||
fmt::basic_string_view<Char>(nullptr, 1)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be = {nullptr, 1}
?
Hi, sorry. I've just been busy. Both those seem fine. One question, though: it seems unintentional that ignore_unused is in the fmt namespace instead of fmt::detail? But then so it can be used in this test, presumably actually in fmt::detail_exported? |
Good catch, could you move it to detail while at it?
This is probably an overkill, let's keep cast to |
I think it's good as is, merged. |
Thank you for merging it and taking care of the namespace fix, too. |
* Warning removals in test code. Mostly 0 to nullptr and adding override to virtual function implementations. * Fix module-test.
Mostly 0 to nullptr and adding override to virtual function implementations.