开发者

Qt 4.6 + MinGW: suppress warnings for generated code

We are using Axis2 (WSDL2C) to generate *.c/*.h files from WSDLs in order to be able to call w开发者_如何学Goebservices with Qt 4.6. But the generated code creates a massive amount of warnings (3 services -> >1k warnings), mostly about uninitialized or unused variables. How can we suppress these warnings properly?

I know I can wrap headers in #pragma to suppress warnings from 3rd party libs, but how to deal with generated code where the warnings come from the implementation?


Add this line to your Qt .pro or .pri file:

QMAKE_CFLAGS += -Wno-unused

It turns off unused warning.


The code generator is Apache, i.e. Open Source. Have you had a peek at the source? Perhaps you can patch that?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜