如何使用clang使未使用的命令行参数错误静音而不禁用它? [英] How to silence unused command line argument error with clang without disabling it?

查看:97
本文介绍了如何使用clang使未使用的命令行参数错误静音而不禁用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

-Werror 与clang一起使用时,它将警告:编译期间未使用的参数消息转换为错误,这很有意义。有一个 -Qunused-arguments 标志将其完全静音。我的问题是,是否可以通过一些 -Wno-error = ... 标志使这些不是错误,而不是完全禁用它们?

When using -Werror with clang, it transforms "warning: argument unused during compilation" messages into errors, which makes sense. There's a -Qunused-arguments flag to silence them entirely. My question is, is there some -Wno-error=... flag I can pass to make these not be errors, without disabling them entirely?

推荐答案

结果正确的答案是 -Wno-error = unused-command-line-argument

这篇关于如何使用clang使未使用的命令行参数错误静音而不禁用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆