windows驱动编译,禁止指定的警告

来源:互联网 发布:网络虚拟交易平台 编辑:程序博客网 时间:2024/05/18 04:00

  1. #pragma warning(push)
  2. #pragma warning(disable: 4201 4100)
  3. #pragma warning(pop)


  1. 使用了非标准扩展 : 结构/联合中的零大小数组


    结构或联合包含的数组大小为零。

    编译 C++ 文件时为警告等级 2,编译 C 文件时为警告等级 4。


  2. // C4201.cpp
  3. // compile with: /W4
  4. struct S
  5. {
  6.    float y;
  7.    struct
  8.    {
  9.       int a, b, c; // C4201
  10.    };
  11. } *p_s;

  12. int main()
  13. {
  14. }

  1. “identifier”: 未引用的形参
  2. 未在函数体中引用此形参。 已忽略未引用的形参。
  3. 当代码在基元类型的未引用参数上调用析构函数时,也可能发出 C4100 错误。这是 Visual C++ 编译器的一个限制。
  4. 下面的示例生成 C4100:
  5. // C4100.cpp
  6. // compile with: /W4
  7. void func(int i) { // C4100, delete the unreferenced parameter to
  8.                      //resolve the warning
  9.    // i; // or, add a reference like this
  10. }

  11. int main()
  12. {
  13.    func(1);
  14. }



<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(435) | 评论(0) | 转发(0) |
0

上一篇: WDK error U1087: cannot have : and:: dependents for same target

下一篇:Microsoft Visual C++ 2010 可再发行组件包(x86) 运行时 msvcr

相关热门文章
  • LNK1123: 转换到 COFF 期间失...
  • WIN7访问共享:0x80070035 找不...
  • Delphi 2010下载+完美破解...
  • vs2010调试C++程序时提示 无...
  • VISIO,不规则封闭图形填充方...
  • linux dhcp peizhi roc
  • 关于Unix文件的软链接
  • 求教这个命令什么意思,我是新...
  • sed -e "/grep/d" 是什么意思...
  • 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
原创粉丝点击