Re: gcc warn when pointers not checked non-null before de-referencing.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



在 2021-06-18 04:44, Jonny Grant 写道:

Hello
Thank you for the suggestion, yes, I had used that before. I did just check, it's runtime checks. I had hoped for something at compile time. warning for every function that didn't check pointer for NULL before de-referencing.


You might want to have a look at <http://cppcheck.sourceforge.net/demo/>. There are some 'NULL pointers' examples which answers your exact question.

If you use Debian or Ubuntu, you can install cppcheck with `sudo aptitude install cppcheck`.



--
Best regards,
Liu Hao

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux