Skip to content
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

Don't hide format string from the compiler #2346

Merged

Conversation

AlexGuteniev
Copy link
Contributor

Apparently previously compiler's static analysis did not understand %a, so the string was hidden.

Now let's show it!

It fixes warning C4774: 'printf' : format string expected in argument 1 is not a string literal.
Currently the warning is disabled, as it is a warning disabled by default.

Salvages the useful part from #2142

@AlexGuteniev AlexGuteniev requested a review from a team as a code owner November 19, 2021 11:22
@CaseyCarter CaseyCarter added the test Related to test code label Nov 19, 2021
@StephanTLavavej
Copy link
Member

Thanks! Although we generally avoid spending time cleaning up the legacy tr1 test suite (as that would be a time sink with little benefit - the tests aren't actively evolving, and aren't used as precedent for writing new tests), this is a clear improvement that's obviously correct and small, so it's worth making an exception.

@StephanTLavavej StephanTLavavej self-assigned this Dec 8, 2021
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit beebe5b into microsoft:main Dec 9, 2021
@StephanTLavavej
Copy link
Member

Thanks for simplifying this test code! ✨ 🎉 😸

@AlexGuteniev AlexGuteniev deleted the dont_hide_format_string branch December 9, 2021 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Related to test code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants