Fixes from clang
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 30 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 30 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/30] Fixes from clang
Quoted 37 lines · Zdenek Kabelac
Patchset combines code cleanups for compiler warnings and code fixes found by static analyzer scan-build.
Potentional NULL pointer dereferencies are mostly in very unusual code execution paths. I've tried to order them on their importance - the later ones are not event trigerable as surrounding code should not be to pass problematic values - but checks seems to be simple enough to keep static analysis happy.
Last patches in this set add some instrumentation to function calls that might allow better code optimization or better static analysis.
Zdenek Kabelac (30):
Fix clang warning forntohl(*((uint32_t *)buf))Usedm_pool_grow_objectembeded strlen for 0 delta Check (type) is not NULL before access
Fix NULL pointer dereferencevg_nameand do not to accessvg->nameEnsure we always have origin defined Ensure seg is nonnull
Ensure first is not NULL
Reuse result of previous strchr.
Fix potential NULL pointer dereference
Fix theoretical usage of NULL pointer dereference Check for NULL pointer
Eliminateuninitialized_var
Fix missing initilisation to 0
Functionpull_statecannot work with NULL buffer Fix void* pointer arithmetic
Use const pvid fordevice_from_pvid()
Use const pointer for return value ofdm_basenameFix constness warning
Fix constness warning
Fix constness warning
Fix constness warning
Quoted 8 lines
Using const config node
bufused is assigned 0 in preceding source line Proper C declaration
Use static
Instrument compiler about code unreachability Skip uninitialized macro for scan-build
Add some__attribute__instrumentation __attribute__((nonnull(1)))
Nice work!
Getting any project in good enough shape to pass clang's tests is tedious but well worth it.