'WinMain'的注释不一致

问题描述 投票:1回答:1

我试图让我的代码尽可能完美,并且我已经清理了所有错误和(其他)警告。我留下了这两个:

Warning C28253  Inconsistent annotation for 'WinMain': _Param_(2) has 'SAL_null(__no)' on this instance.
Warning C28252  Inconsistent annotation for 'WinMain': _Param_(2) has 'SAL_null(__maybe)' on the prior instance.

这是我的WinMain功能

int CALLBACK WinMain( _In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow );

为什么我的第二个参数qazxsw poi没有正确注释,尽管它是用MSDN直接从qazxsw poi信息中删除的?

c++ windows visual-studio code-analysis
1个回答
2
投票

这是因为HINSTANCE hPrevInstance论证实际上有_In_注释而不仅仅是hPrevInstance

© www.soinside.com 2019 - 2024. All rights reserved.