How to suppress warning (converted from error) in IAR EWARM 5.4

匆匆过客 提交于 2019-12-07 20:11:06

问题


I had a macro for logging that accepts a variable number of arguments. This macro will be processed by GCC in a non-embedded context, and expands to valid C code. Despite this, IAR EWARM gives the error "[Pe054]: too few arguments in macro invocation" wherever I call the macro (thousands of locations)

EWARM does provide diagnostics configuration to convert these errors to warnings (and hilariously enough, the code compiles when you do this (i.e. the "error" isn't a compilation error, the compiler is just dumb))

The problem is that when I try to first convert Pe054 to a warning, then try to suppress it, I can't do the latter.


回答1:


The solution is to take control of the order in which the operations are applied, like so:

First convert to warning, then suppress.



来源:https://stackoverflow.com/questions/26303415/how-to-suppress-warning-converted-from-error-in-iar-ewarm-5-4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!