Visual Studio 2008,调试版本。的C++断言(真)警告签名/未签名不匹配
assert(true);
此行导致投诉
warning C4365: 'argument' : conversion from 'long' to 'unsigned int', signed/unsigned mismatch
与任何(有用)布尔表达式替换true
时,即使有1ul
警告仍然存在。
仅供参考,编译器的文件assert.h
是:
#define assert(_Expression) (void)((!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression), _CRT_WIDE(__FILE__), __LINE__), 0))
extern "C" _CRTIMP void __cdecl _wassert(_In_z_ const wchar_t * _Message, _In_z_ const wchar_t *_File, _In_ unsigned _Line);
怎么能这样的警告可以干净抑制,但不影响所有 C4365的?是__LINE__
的错?