how to disable specific warning when -Wall is enab

2019-02-17 12:52发布

I have used -Wall -Werror in my Makefile but I want to disable following specific type of warning :

 warning: '_wrap_delete_DMXTSFILTER' defined but not used

How shoud I do that?

3条回答
太酷不给撩
2楼-- · 2019-02-17 13:38

Assuming it's unused variable:

-Wno-unused-variable
查看更多
唯我独甜
3楼-- · 2019-02-17 13:38

Finnaly, I used this trick __attribute__((unused)). The advantage is I could apply it to individual functions / variables instead of the whole source file which the -Wno-unsed-xxxxx will apply on.

查看更多
Melony?
4楼-- · 2019-02-17 13:56
登录 后发表回答