There was another thread where you had an issue, but we weren't able to solve the issue until you posted the code relevant to the issue. The same thing applies here :)
You should either link the tutorial w/ timestamp, or post the code here.
[I'm not promising that means we'll have a solution, but it's a start. I personally don't have VS 2019 so I can't directly reproduce the steps.]
It might be that the default warning levels for VS 2019 are more zealous than VS 2017. You might be able to use some #pragma warning disabling around the particular part of the code causing the issue, if it's part of a header file causing the issue.
In other words, if you're sure the warning is benign... you can do something like:
e.g.
https://stackoverflow.com/a/18461418/8690169
1 2 3 4
|
#pragma warning ( push )
#pragma warning ( disable: ThatWarning )
// one single line with ThatWarning
#pragma warning ( pop )
|
https://stackoverflow.com/questions/4193476/is-using-pragma-warning-push-pop-the-right-way-to-temporarily-alter-warning-lev
1. Also, is it an
error or a
warning?
2. Is the build still succeeding?
3. If you go into Project --> [Project Name] Properties --> C/C++ --> General --> Warning Level, what is it?
4. What is your setting for "Treat Warnings As Errors", located below Warning Level?
If this is an issue that will affect other VS 2019 users, it might be worth telling wxWidgets devs. There are other places in their code base where they manually disable some VS warnings.
The warning appears to original inside
https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/any.h
...in other words... one thing you could do is try editing wx/any.h, and add something along the lines of:
1 2 3 4 5 6 7 8 9 10
|
union wxAnyValueBuffer
{
// ...
void* m_ptr;
#pragma warning ( push )
#pragma warning ( disable: 26495)
wxByte m_buffer[WX_ANY_VALUE_BUFFER_SIZE];
#pragma warning ( pop )
};
|
(just a guess)