【发布时间】:2016-02-20 20:35:16
【问题描述】:
今天我尝试使用 -WALL 选项编译我的项目,但我收到了很多警告,例如 600,但似乎都来自标准库文件,例如
项目属性 -> C/C++ -> 常规 -> 警告级别 -> 墙
Warning 14 warning C4820: '_wfinddata64_t' : '4' bytes padding added after data member '_wfinddata64_t::attrib' c:\program files\microsoft visual studio 11.0\vc\include\wchar.h 118
Warning 15 warning C4820: '_stat32' : '2' bytes padding added after data member '_stat32::st_gid' c:\program files\microsoft visual studio 11.0\vc\include\wchar.h 507
Warning 16 warning C4820: 'stat' : '2' bytes padding added after data member 'stat::st_gid' c:\program files\microsoft visual studio 11.0\vc\include\wchar.h 523
Warning 17 warning C4820: '_stat32i64' : '2' bytes padding added after data member '_stat32i64::st_gid' c:\program files\microsoft visual studio 11.0\vc\include\wchar.h 539
Warning 18 warning C4820: '_stat32i64' : '4' bytes padding added after data member '_stat32i64::st_rdev' c:\program files\microsoft visual studio 11.0\vc\include\wchar.h 540
这正常吗?为什么我会收到来自其他文件的警告?
【问题讨论】:
-
您的问题应该包括您正在使用哪个编译器(以及该编译器的哪个版本),最好还包含最少的代码示例
-
@M.M Visual Studio 2012。这是我使用的类:zedwood.com/article/cpp-sha256-function。和一个非常基本的 hello world 使用这个类,例如哈希计算
-
@M.M 我记得上次我也发生过类似的事情,但项目不同
-
this one的可能重复
标签: c++