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

Use WelsSnprintf instead of direct snprintf in tests #3608

Merged
merged 1 commit into from
Dec 22, 2022

Conversation

mstorsjo
Copy link
Contributor

Versions of MSVC before 2015 lack snprintf; within the codec codebase itself, this is wrapped into WelsSnprintf. Within the testcases, there were no uses of snprintf previously, only sprintf.

We could of course decide to stop caring about older versions of MSVC, but so far, those versions have still worked just fine. However, that requires changes to the build files for Windows Phone ("make OS=msvc-wp"), which currently expect to be built with MSVC 2013.

Define NOMINMAX before including windows.h, to avoid windows.h breaking std::min in test code.

Versions of MSVC before 2015 lack snprintf; within the codec codebase
itself, this is wrapped into WelsSnprintf. Within the testcases, there
were no uses of snprintf previously, only sprintf.

We could of course decide to stop caring about older versions of
MSVC, but so far, those versions have still worked just fine.
However, that requires changes to the build files for Windows Phone
("make OS=msvc-wp"), which currently expect to be built with MSVC 2013.

Define NOMINMAX before including windows.h, to avoid windows.h
breaking std::min in test code.
@GuangweiWang
Copy link
Collaborator

LGTM

@GuangweiWang GuangweiWang merged commit 0b2ef5e into cisco:master Dec 22, 2022
@mstorsjo
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants