summaryrefslogtreecommitdiff
path: root/Userland/Applets
diff options
context:
space:
mode:
authorNicholas-Baron <nicholas.baron.ten@gmail.com>2021-04-16 15:37:24 -0700
committerAndreas Kling <kling@serenityos.org>2021-04-17 01:07:36 +0200
commit4454735bf8ebddfad7fc6bc0c65b7ad52aa8fd92 (patch)
tree5f62c18d5f6907935ba7922eb16af5bfd280e454 /Userland/Applets
parent586f10b6e17a36b045377988205230b29892be0f (diff)
downloadserenity-4454735bf8ebddfad7fc6bc0c65b7ad52aa8fd92.zip
Kernel: Add `-Wnull-dereference` flag
`-Wnull-dereference` has found a lot of "possible null dereferences" in userland. However, in the kernel, no warnings occurred. To keep it that way, preemptivly add the flag here and remove it once it is enabled system wide. This flag makes the compiler check statically for a null deref. It does not take into account any human-imposed invariants and as such, may need a `VERIFY(ptr);`, `if(ptr)`, or `if(!ptr)` before using a pointer. However, as long as a pointer is not reassigned, the verify will be valid, meaning that adding `VERIFY` can be done sparingly.
Diffstat (limited to 'Userland/Applets')
0 files changed, 0 insertions, 0 deletions