New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 604294 link

Starred by 2 users

Issue metadata

Status: Verified
Owner: ----
Closed: Apr 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Analysis of suppressed warnings by '-Qunused-arguments'

Project Member Reported by laszio@chromium.org, Apr 18 2016

Issue description

This flag is dangerous at this stage. We can be missing warnings for functionality that is not implemented.

 

Comment 1 by laszio@chromium.org, Apr 18 2016

To see what '-Qunused-arguments' suppresses, I removed it from sysroot_wrapper.hardened and added '-Wno-error' to the end of command line instead. From the log of build_package with --showoutput, here are summaries. Besides the first which I don't know why, others should be safe.

* From autotest. They are passed when linking but I don't understand why they are unused.
warning: argument unused during compilation: '-shared'
warning: argument unused during compilation: '-L/build/falco/usr/lib64'

* From dbus-c++-0.0.0-r57. See https://llvm.org/bugs/show_bug.cgi?id=7798
warning: argument unused during compilation: '-pthread'

* This seems to be autotest's compilation test:
warning: argument unused during compilation: '-ansi'

* Added by sysroot_wrapper.hardened. It's not used because of '-c'.
warning: argument unused during compilation: '-pie'

* Passed when linking when building mesa and autotest:
warning: argument unused during compilation: '-ansi'
warning: argument unused during compilation: '-D _FORTIFY_SOURCE=2'
warning: argument unused during compilation: '-D __STDC_CONSTANT_MACROS'
warning: argument unused during compilation: '-D __STDC_FORMAT_MACROS'
warning: argument unused during compilation: '-D __STDC_LIMIT_MACROS'
warning: argument unused during compilation: '-fno-asynchronous-unwind-tables'
warning: argument unused during compilation: '-fno-builtin-memcmp'
warning: argument unused during compilation: '-fno-exceptions'
warning: argument unused during compilation: '-fno-math-errno'
warning: argument unused during compilation: '-fno-omit-frame-pointer'
warning: argument unused during compilation: '-fno-strict-aliasing'
warning: argument unused during compilation: '-fno-trapping-math'
warning: argument unused during compilation: '-fno-unwind-tables'
warning: argument unused during compilation: '-fPIE'
warning: argument unused during compilation: '-fstack-protector-strong'
warning: argument unused during compilation: '-fvisibility=hidden'
warning: argument unused during compilation: '-g'
warning: argument unused during compilation: '-I /build/falco/usr/include'
warning: argument unused during compilation: '-march=corei7'
warning: argument unused during compilation: '-O2'
warning: argument unused during compilation: '-pie'
warning: argument unused during compilation: '-std=c99' 
warning: argument unused during compilation: '-Wall'
warning: argument unused during compilation: '-Wa,--noexecstack'
warning: argument unused during compilation: '-Werror=implicit-function-declaration'
warning: argument unused during compilation: '-Werror=missing-prototypes'
warning: argument unused during compilation: '-Werror=pointer-arith'
warning: argument unused during compilation: '-Werror=vla'
warning: argument unused during compilation: '-Wno-deprecated-declarations'
warning: argument unused during compilation: '-Wno-error'

without-Qunused-arguments.log.bz2
1016 KB Download

Comment 2 by laszio@chromium.org, Apr 19 2016

Cc: yunlian@chromium.org shenhan@chromium.org cmt...@chromium.org llozano@chromium.org
It turns out that most of the options are unused because clang is used for syntax checking when the command line doesn't start with *-clang[++]. Removing them from previous classification results in:

* Linker options passed while compiling:
warning: argument unused during compilation: '-pie'

* Compilation options passed when linking:
warning: argument unused during compilation: '-ansi'
warning: argument unused during compilation: '-Wa,--noexecstack'

* From dbus-c++-0.0.0-r57. See https://llvm.org/bugs/show_bug.cgi?id=7798
warning: argument unused during compilation: '-pthread'

Only 4 unique options are unused and they all look fine.

Comment 3 by laszio@chromium.org, Apr 20 2016

Status: Fixed (was: Started)
Bulk verified
Status: Verified (was: Fixed)
bulk verified

Sign in to add a comment