How could PC-lint ignore/suppress warnings from Google Protocol buffer headers?

155 views Asked by At

I'm using the PC-lint on my project which uses the Google protocol buffer.

The PC-lint generates too many warnings related to xxx.pb.h.

Is there any configuration to set something like "header whitelist" to prevent this?

I know for clang-tidy, it supports doing so by passing the -header-filter.

1

There are 1 answers

0
Andrew On

This already has an answer in How to exclude some particular files in Pc-lint

However, a word of caution in such a blanket exclusion... in amongst the noise, there may be warnings that are pertinent to your usage. Therefore, I suggest that you do (at least) one full assessment pass of the warnings/errors before you decide to ignore them all.

All warnings are there for a reason!

I appreciate you are not using , but MISRA Compliance has the concept of adopted code (such as the headers you refer) and gives guidance on what to do. I commend it to your consideration.

To repeat: any warnings/errors you get are there for a reason... understanding why you get the violation is important! And disabling specific notifications would be better than a blanket ignore all.