Bug 5398 - Reduce the amount of gcc warnings while building ctc
Summary: Reduce the amount of gcc warnings while building ctc
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.3.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Peter Åstrand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-21 15:00 CET by Karl Mikaelsson
Modified: 2018-04-11 10:21 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Karl Mikaelsson cendio 2015-01-21 15:00:37 CET
We're getting a whole lot of warnings from the nightly builds that we never look at. While warnings could be indicative of undiscovered problems with the code, some of them are probably just duplicates (we build the same code multiple times) or false positives.

> $ egrep "\[-W" /home/cendio/intranet/thinlinc/nightly_builds/2015-01-21_03\:15\:02/trunk-ctc > ctc-gcc-warnings
> $ wc -l ctc-gcc-warnings
> 9000 ctc-gcc-warnings

> $ egrep "\[-W" /home/cendio/intranet/thinlinc/nightly_builds/2015-01-21_03\:15\:02/trunk-ctc | python src/hack/warningcounter.py 
>                      [-Wattributes]: 1
>                    [-Wimplicit-int]: 1
>     [-Wdeclaration-after-statement]: 1
>                 [-Wconversion-null]: 2
>                        [-Woverflow]: 3
>              [-Woverlength-strings]: 3
>             [-Wpointer-to-int-cast]: 4
>                 [-Wredundant-decls]: 4
>             [-Wint-to-pointer-cast]: 5
>               [-Wformat-nonliteral]: 6
>          [-Wmissing-parameter-type]: 10
>                         [-Wcomment]: 14
>                    [-Wenum-compare]: 14
>                [-Wunused-parameter]: 15
>                         [-Waddress]: 16
>                    [-Wunused-value]: 16
>            [-Wmissing-declarations]: 21
>                 [-Wstrict-aliasing]: 23
>                     [-Wreturn-type]: 25
>              [-Wignored-qualifiers]: 27
>                  [-Wmissing-braces]: 32
>                    [-Wunused-label]: 40
>                          [-Wswitch]: 42
>              [-Wmissing-prototypes]: 45
>                 [-Wunknown-pragmas]: 58
>                         [-Wnonnull]: 63
>               [-Wformat-extra-args]: 86
>                     [-Wparentheses]: 107
>   [-Wimplicit-function-declaration]: 123
>                    [-Warray-bounds]: 126
>                         [-Wreorder]: 177
>                           [-Wundef]: 189
>                 [-Wunused-function]: 230
>                      [-Wcast-align]: 249
>                          [-Wformat]: 312
>                   [-Wuninitialized]: 418
>                    [-Wsign-compare]: 466
>         [-Wunused-but-set-variable]: 603
>                       [-Wcast-qual]: 616
>                   [-Wwrite-strings]: 634
>                 [-Wunused-variable]: 1161
>                          [-Wshadow]: 1427
>                    [-Wpointer-sign]: 1585
Comment 1 Karl Mikaelsson cendio 2018-04-11 10:21:36 CEST
FWIW, updated numbers from today:

> $ egrep -c "\[-W" /home/cendio/intranet/thinlinc/nightly_builds/2018-04-11_03\:15\:01/trunk-ctc
> 5326
>
> $ egrep "\[-W" /home/cendio/intranet/thinlinc/nightly_builds/2018-04-11_03\:15\:01/trunk-ctc | python ~/src/hack/warningcounter.py 
>                     [-Wattributes]: 1
>                 [-Wmissing-braces]: 2
>                   [-Wunused-label]: 2
>                [-Wredundant-decls]: 2
>                    [-Wtype-limits]: 2
>        [-Wdeprecated-declarations]: 2
>     [-Wsuggest-attribute=noreturn]: 3
>                       [-Woverflow]: 4
>              [-Wformat-nonliteral]: 4
>                    [-Wreturn-type]: 8
>                   [-Wunused-value]: 8
>                   [-Wenum-compare]: 9
>                        [-Waddress]: 10
>                 [-Wint-conversion]: 10
>                            [-Wcpp]: 18
>             [-Wignored-qualifiers]: 18
>       [-Wsizeof-pointer-memaccess]: 20
>                        [-Wnonnull]: 24
>               [-Wunused-parameter]: 30
>                    [-Wparentheses]: 31
>             [-Wmissing-prototypes]: 36
>        [-Wlogical-not-parentheses]: 38
>                   [-Wimplicit-int]: 38
>                   [-Wendif-labels]: 46
>                         [-Wshadow]: 48
>     [-Wincompatible-pointer-types]: 53
>          [-Wunused-local-typedefs]: 54
>                [-Wstrict-aliasing]: 56
>                     [-Wcast-align]: 59
>           [-Wmissing-include-dirs]: 71
>                         [-Wswitch]: 88
>                   [-Warray-bounds]: 94
>                   [-Wsign-compare]: 117
>  [-Wimplicit-function-declaration]: 124
>                [-Wunused-function]: 152
>              [-Wformat-extra-args]: 154
>            [-Wint-to-pointer-cast]: 157
>                          [-Wundef]: 186
>        [-Wunused-but-set-variable]: 221
>           [-Wdiscarded-qualifiers]: 276
>            [-Wmaybe-uninitialized]: 279
>                        [-Wformat=]: 287
>                  [-Wwrite-strings]: 317
>                      [-Wcast-qual]: 390
>            [-Wpointer-to-int-cast]: 511
>                [-Wunused-variable]: 587
>                   [-Wpointer-sign]: 679

These numbers will likely go up if we upgrade to a more recent GCC.

Note You need to log in before you can comment on or make changes to this bug.