Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable specific warning when -Wall is enabled

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?

like image 587
pierrotlefou Avatar asked Apr 09 '10 06:04

pierrotlefou


3 Answers

This way

like image 103
RarrRarrRarr Avatar answered Nov 15 '22 08:11

RarrRarrRarr


Assuming it's unused variable:

-Wno-unused-variable
like image 42
stefanB Avatar answered Nov 15 '22 08:11

stefanB


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.

like image 30
pierrotlefou Avatar answered Nov 15 '22 07:11

pierrotlefou