pierrotlefou
pierrotlefou

Reputation: 40761

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?

Upvotes: 6

Views: 5345

Answers (3)

pierrotlefou
pierrotlefou

Reputation: 40761

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.

Upvotes: 1

stefanB
stefanB

Reputation: 79850

Assuming it's unused variable:

-Wno-unused-variable

Upvotes: 2

RarrRarrRarr
RarrRarrRarr

Reputation: 3910

This way

Upvotes: 7

Related Questions