I'm using cppcheck 2.3.
Command line arguments are given below.
cppcheck --language=c --enable=warning --force memcontrol.c
Output is given below.
Checking mm/memcontrol.c ...
mm/memcontrol.c:3397:7: error: Uninitialized variable: ret [uninitvar]
if (!ret && enlarge)
^
mm/memcontrol.c:3400:9: error: Uninitialized variable: ret [uninitvar]
return ret;
^
Checking mm/memcontrol.c: CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH...
Checking mm/memcontrol.c: CONFIG_CGROUP_WRITEBACK...
Checking mm/memcontrol.c: CONFIG_CMA;CONFIG_COMPACTION...
Checking mm/memcontrol.c: CONFIG_DEBUG_FS;CONFIG_SLUB_DEBUG...
Checking mm/memcontrol.c: CONFIG_DEBUG_MEMORY_INIT...
Checking mm/memcontrol.c: CONFIG_DEBUG_SLAB...
Checking mm/memcontrol.c: CONFIG_DEBUG_VM...
Checking mm/memcontrol.c:
CONFIG_DEVICE_PRIVATE;CONFIG_SWAP;CONFIG_MMU...
Checking mm/memcontrol.c: CONFIG_LOCKDEP...
Checking mm/memcontrol.c: CONFIG_MEMCG_KMEM...
Checking mm/memcontrol.c:
CONFIG_MEMCG_KMEM;CONFIG_SLAB;CONFIG_SLUB_DEBUG...
Checking mm/memcontrol.c: CONFIG_MEMCG_SWAP...
Checking mm/memcontrol.c: CONFIG_MMU...
Checking mm/memcontrol.c: CONFIG_MMU;CONFIG_TRANSPARENT_HUGEPAGE...
Checking mm/memcontrol.c: CONFIG_NUMA...
Checking mm/memcontrol.c: CONFIG_PRINTK...
Checking mm/memcontrol.c: CONFIG_PROVE_LOCKING...
Checking mm/memcontrol.c: CONFIG_SLAB...
Checking mm/memcontrol.c: CONFIG_SLAB;CONFIG_SLUB_DEBUG...
Checking mm/memcontrol.c: CONFIG_SLAB_FREELIST_RANDOM...
Checking mm/memcontrol.c: CONFIG_SLOB...
Checking mm/memcontrol.c: CONFIG_SLUB...
Checking mm/memcontrol.c: CONFIG_SLUB;CONFIG_SLUB_DEBUG...
Checking mm/memcontrol.c: CONFIG_SLUB_DEBUG...
Checking mm/memcontrol.c: CONFIG_SLUB_DEBUG;CONFIG_SLUB_DEBUG_ON...
Checking mm/memcontrol.c: CONFIG_SMP...
Checking mm/memcontrol.c: CONFIG_SPARSEMEM...
Checking mm/memcontrol.c: CONFIG_SWAP...
Checking mm/memcontrol.c: CONFIG_TRANSPARENT_HUGEPAGE...
Checking mm/memcontrol.c: CONFIG_ZONE_DMA32...