Open
Bug 1394433
Opened 6 years ago
Updated 5 months ago
[meta] Address warnings exposed by MinGW Build (gcc for windows)
Categories
(Core :: General, enhancement, P3)
Tracking
()
NEW
People
(Reporter: tjr, Unassigned)
References
Details
(Keywords: meta)
The GCC MinGW build for Windows exposed a bunch of warnings that we should review and decide to silence, fix right now, or fix eventually.
Reporter | ||
Comment 1•6 years ago
|
||
Add all the warning bugs I had wrongly filed as children of Bug 1330608
Reporter | ||
Comment 2•6 years ago
|
||
> egrep "\[-W(.+)\]" all-warnings.log | grep -v /home/worker/workspace/build/src | egrep "\[-W(.+)\]" -o | sort | uniq -c | sort -n -r
>
> 204 [-Wsign-compare]
> 113 [-Wswitch]
> 71 [-Wunused-variable]
> 65 [-Wunknown-pragmas]
> 35 [-Wunused-value]
> 33 [-Wunused-but-set-variable]
> 32 [-Wempty-body]
> 31 [-Wattributes]
> 30 [-Wreorder]
> 27 [-Woverloaded-virtual]
> 24 [-Wunused-function]
> 21 [-Wincompatible-pointer-types]
> 14 [-Wwrite-strings]
> 13 [-Wpointer-sign]
> 11 [-Wunused-result]
> 10 [-Wdeprecated-declarations]
> 9 [-Wtype-limits]
> 8 [-Wdiscarded-qualifiers]
> 7 [-Wnarrowing]
> 7 [-Wignored-qualifiers]
> 7 [-Wdelete-non-virtual-dtor]
> 7 [-Wconversion-null]
> 5 [-Wparentheses]
> 4 [-Wenum-compare]
> 4 [-Waddress]
> 3 [-Wimplicit-function-declaration]
> 2 [-Wunused-result]
> 2 [-Wunused-local-typedefs]
> 2 [-Wsequence-point]
> 2 [-Wmultichar]
> 2 [-Wmissing-braces]
> 1 [-Wint-conversion]
> 1 [-Wformat-security]
>
> egrep "\[-W(.+)\]" all-warnings.log | grep -v /home/worker/workspace/build/src | egrep "warning: ([^/]+)/([^/]+)" -o | sort | uniq -c | sort -n -r
> 178 warning: security/nss
> 108 warning: nsprpub/pr
> 90 warning: gfx/2d
> 62 warning: gfx/cairo
> 33 warning: gfx/skia
> 30 warning: modules/pdfium
> 28 warning: dom/plugins
> 23 warning: widget/windows
> 22 warning: media/libvpx
> 19 warning: ipc/chromium
> 18 warning: gfx/vr
> 17 warning: intl/icu
> 16 warning: toolkit/xre
> 14 warning: gfx/layers
> 12 warning: gfx/angle
> 11 warning: dom/gamepad
> 9 warning: media/libav
> 7 warning: obj-firefox/dist
> 7 warning: media/libsoundtouch
> 7 warning: media/ffvpx
> 7 warning: gfx/thebes
> 7 warning: dom/media
> 5 warning: xpcom/io
> 5 warning: toolkit/components
> 4 warning: tools/profiler
> 4 warning: toolkit/mozapps
> 4 warning: security/manager
> 4 warning: netwerk/protocol
> 4 warning: mozglue/build
> 3 warning: xpcom/threads
> 3 warning: xpcom/components
> 3 warning: media/libjpeg
> 3 warning: media/gmp-clearkey
> 3 warning: js/src
> 3 warning: gfx/webrender_bindings
> 2 warning: xpcom/build
> 2 warning: xpcom/base
> 2 warning: uriloader/exthandler
> 2 warning: third_party/aom
> 2 warning: nsprpub/lib
> 2 warning: netwerk/system
> 2 warning: media/libyuv
> 2 warning: gfx/graphite2
> 1 warning: xpcom/windbgdlg
> 1 warning: netwerk/socket
> 1 warning: netwerk/dns
> 1 warning: netwerk/cache2
> 1 warning: netwerk/base
> 1 warning: modules/woff2
> 1 warning: modules/libmar
> 1 warning: media/libstagefright
> 1 warning: media/libspeex_resampler
> 1 warning: media/libmkv
> 1 warning: js/xpconnect
> 1 warning: ipc/mscom
> 1 warning: ipc/glue
> 1 warning: intl/hyphenation
> 1 warning: gfx/gl
> 1 warning: dom/ipc
> 1 warning: dom/base
Reporter | ||
Comment 3•6 years ago
|
||
After filtering NSS, fixing a bunch, and silencing some others, I have: > 30 [-Wreorder] Low priority > 29 [-Wunused-value] > 26 [-Wunused-but-set-variable] > 21 [-Wunused-variable] Lowest priority (probably going to ignore) > 28 [-Wsign-compare] Medium Priority > 27 [-Woverloaded-virtual] > 7 [-Wdelete-non-virtual-dtor] High priority. Tracked in Bug 1394005 > 11 [-Wwrite-strings] Lowest priority (probably going to ignore) > 10 [-Wdeprecated-declarations] These are all in intl/icu and media/ffvpx so going to ignore > 10 [-Wunused-result] High priority. > 8 [-Wdiscarded-qualifiers] Low priority > 7 [-Wtype-limits] Medium priority > 7 [-Wnarrowing] Low priority > 7 [-Wconversion-null] Low priority > 6 [-Wignored-qualifiers] > 4 [-Wparentheses] Lowest priority (probably going to ignore) > 4 [-Wenum-compare] Spot check indicates these are intentional due to the coding style. So... going to ignore? > 4 [-Waddress] These all occur from gfx/skia/skia/src/core/SkTDPQueue.h:AccessResourceIndex So... going to ignore. > 3 [-Wimplicit-function-declaration] Occur in media/libstagefright and third_party/aom/ So... going to ignore. > 2 [-Wunused-local-typedefs] Occurs in generated protobuf code, so going to ignore > 2 [-Wmultichar] > 2 [-Wmissing-braces] pdfium, ignoring > 1 [-Wsequence-point] High priority > 1 [-Wincompatible-pointer-types] media/ffvpx ignoring > 1 [-Wformat-security] false positive in my greps: 'cc1plus: warning: -Wformat-security ignored without -Wformat [-Wformat-security]'
Updated•6 years ago
|
OS: Unspecified → Windows
Updated•6 years ago
|
Summary: Address warnings exposed by MinGW Build (gcc for windows) → [meta] Address warnings exposed by MinGW Build (gcc for windows)
Reporter | ||
Comment 5•6 years ago
|
||
I investigated [-Wtype-limits]. They are all in third party code, except one in NSS and one in NSPR. The one in NSS appears to be a gcc bug (it's comparing 'unsigned long < ULONG_MAX' which is a valid comparison and does not trigger on a newer gcc). The in NSPR is innocuous.
Reporter | ||
Comment 6•6 years ago
|
||
After upgrading to 6.4, updating the -central, filtering out nss, icu, pdfium, skia, angle, media/, cairo, and setting -Wno-switch, -Wno-write-strings, -Wno-unused-value, -Wno-unused-variable, -Wno-unused-but-set-variable, -Wno-ignored-qualifiers, and -Wno-parentheses I have the following: > 32 [-Wsign-compare] > 27 [-Wreorder] > 9 [-Wsubobject-linkage] > 8 [-Wunused-result] > 8 [-Wmisleading-indentation] > 7 [-Wdelete-non-virtual-dtor] > 4 [-Wenum-compare] > 4 [-Wconversion-null] > 3 [-Wnarrowing] > 2 [-Wunused-result] > 2 [-Wunused-local-typedefs] > 2 [-Wimplicit-function-declaration] > 2 [-Wcomment] > 2 [-Wsized-deallocation] > 1 [-Woverloaded-virtual] > 20 warning: dom/plugins > 19 warning: toolkit/components > 13 warning: widget/windows > 12 warning: obj-firefox/dist > 9 warning: gfx/layers > 9 warning: dom/gamepad > 8 warning: ipc/chromium > 5 warning: gfx/thebes > 3 warning: third_party/aom > 3 warning: gfx/webrender_bindings > 3 warning: gfx/graphite2 > 2 warning: gfx/2d > 2 warning: browser/components > 1 warning: toolkit/mozapps > 1 warning: security/manager > 1 warning: netwerk/socket > 1 warning: gfx/gl > 1 warning: dom/ipc
Updated•5 months ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•