History

gcov: disable -Wmaybe-uninitialized warning

When gcov profiling is enabled, we see a lot of spurious warnings about possibly uninitialized variables being used: arch/arm/mm/dma-mapping.c: In function 'arm_coherent_iommu_map_page': arch/arm/mm/dma-mapping.c:1085:16: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/clk/st/clk-flexgen.c: In function 'st_of_flexgen_setup': drivers/clk/st/clk-flexgen.c:323:9: warning: 'num_parents' may be used uninitialized in this function [-Wmaybe-uninitialized] kernel/cgroup.c: In function 'cgroup_mount': kernel/cgroup.c:2119:11: warning: 'root' may be used uninitialized in this function [-Wmaybe-uninitialized] All of these are false positives, so it seems better to just disable the warnings whenever GCOV is enabled. Most users don't enable GCOV, and based on a prior patch, it is now also disabled for 'allmodconfig' builds, so there should be no downsides of doing this.

Arnd Bergmann committed 10 years ago

Commit e72e2df1 parent c87bf431 file · +1 −1Browse files

Unified · Split

Makefile+1−1
@@ -368,7 +368,7 @@ AFLAGS_MODULE = · 367 unmodified lines
368LDFLAGS_MODULE =368LDFLAGS_MODULE =
369CFLAGS_KERNEL =369CFLAGS_KERNEL =
370AFLAGS_KERNEL =370AFLAGS_KERNEL =
371CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im371CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im -Wno-maybe-uninitialized
372CFLAGS_KCOV = -fsanitize-coverage=trace-pc372CFLAGS_KCOV = -fsanitize-coverage=trace-pc
373 373
374 374

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t