how to disable specific warning when -Wall is enabled

后端 未结 3 951
猫巷女王i
猫巷女王i 2021-01-13 07:42

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

 warning: \'_wrap_delete_DMXTSFILTER\' defin         


        
相关标签:
3条回答
  • 2021-01-13 07:46

    Assuming it's unused variable:

    -Wno-unused-variable
    
    0 讨论(0)
  • 2021-01-13 07:47

    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.

    0 讨论(0)
  • 2021-01-13 07:50

    This way

    0 讨论(0)
提交回复
热议问题