Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们正在使用 Axis2 (WSDL2C) 从 WSDL 生成*.c/*.h文件,以便能够使用 Qt 4.6 调用 Web 服务。但是生成的代码会产生大量警告(3 个服务 -> >1k 警告),主要是关于未初始化或未使用的变量。我们如何才能正确地抑制这些警告?
*.c/*.h
我知道我可以将标头包装起来#pragma以抑制来自 3rd 方库的警告,但是如何处理来自实现的警告的生成代码?
#pragma
将此行添加到您的 Qt .pro 或 .pri 文件中:
QMAKE_CFLAGS += -Wno-unused
它关闭未使用的警告。
代码生成器是Apache,即开源。你看过源头吗?也许你可以修补它?