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

Issue 766345 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Oct 2017
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

clean -Werror,-Wtautological-unsigned-zero-compare error

Project Member Reported by yunlian@chromium.org, Sep 18 2017

Issue description

New llvm-next failed to build some packages because of the warning
-Werror,-Wtautological-unsigned-zero-compare
We need to clean that.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/system/connectivity/shill/+/bc79e745a9adfd0555609879987a6ec2b55320c9

commit bc79e745a9adfd0555609879987a6ec2b55320c9
Author: Yunlian Jiang <yunlian@google.com>
Date: Tue Sep 19 07:36:50 2017

shill: fix -Wtautological-unsigned-zero-compare warning.

This fixes the warning
../../../../../../../tmp/portage/chromeos-base/shill-0.0.3-r892/work/shill-0.0.3/aosp/system/connectivity/shill/pending_activation_store.cc:156:13: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-unsigned-zero-compare]
shill-0.0.3-r892:   if (state < 0 || state >= kStateMax) {
shill-0.0.3-r892:       ~~~~~ ^ ~
shill-0.0.3-r892: 1 error generated.

BUG= chromium:766345 
TEST=The warning is gone.

Change-Id: I2feeb99122e1e97d65087afb5e3e80ce8c914756
Reviewed-on: https://chromium-review.googlesource.com/671770
Commit-Ready: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/bc79e745a9adfd0555609879987a6ec2b55320c9/pending_activation_store.h

Project Member

Comment 2 by bugdroid1@chromium.org, Sep 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/074d01a7329b138fa04b408bdd821509fd56eb2a

commit 074d01a7329b138fa04b408bdd821509fd56eb2a
Author: Yunlian Jiang <yunlian@google.com>
Date: Wed Sep 20 23:37:59 2017

crash: fix -Wtautological-unsigned-zero-compare warning.

This fixes the warning
crash-reporter/user_collector_base.cc:189:36: error:
  comparison of unsigned enum expression < 0 is always false
  [-Werror,-Wtautological-unsigned-zero-compare]
if (ids.size() != kIdMax || kind < 0 || kind >= kIdMax) {
                             ~~~~ ^ ~

BUG= chromium:766345 
TEST=The warning is gone.

Change-Id: Id911d47dad14287b47c91aec28f8f8487465778a
Reviewed-on: https://chromium-review.googlesource.com/671853
Commit-Ready: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/074d01a7329b138fa04b408bdd821509fd56eb2a/crash-reporter/user_collector_base.h

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/d7cdc7fa217522a543d184cee019139275ad68a9

commit d7cdc7fa217522a543d184cee019139275ad68a9
Author: Yunlian Jiang <yunlian@google.com>
Date: Sat Sep 23 05:25:35 2017

glmark2: diasble tautological-unsigned-zero-compare warning.

This silences some -Wtautological-unsigned-zero-compare warning triggered
in new llvm-next.
../src/libmatrix/shader-source.cc:424:18: error: comparison of unsigned enum expression >= 0 is always true [-Werror,-Wtautological-unsigned-zero-compare]
     else if (val >= 0 && val < ShaderSource::PrecisionValueDefault) {
             ~~~ ^  ~
../src/libmatrix/shader-source.cc:515:14: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-unsigned-zero-compare]
     if (type < 0 || type > ShaderSource::ShaderTypeUnknown)
         ~~~~ ^ ~
../src/libmatrix/shader-source.cc:540:14: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-unsigned-zero-compare]
     if (type < 0 || type > ShaderSource::ShaderTypeUnknown)
         ~~~~ ^ ~
3 errors generated.

BUG= chromium:766345 
TEST=The warnnig is gone.

Change-Id: I87239c805101836ba56d7fd3e541e41c8f30e93b
Reviewed-on: https://chromium-review.googlesource.com/671473
Commit-Ready: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>

[rename] https://crrev.com/d7cdc7fa217522a543d184cee019139275ad68a9/app-benchmarks/glmark2/glmark2-285-r12.ebuild
[modify] https://crrev.com/d7cdc7fa217522a543d184cee019139275ad68a9/app-benchmarks/glmark2/glmark2-285.ebuild

Project Member

Comment 4 by bugdroid1@chromium.org, Sep 28 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/vendor/dlm/+/919621f8ac24b522079a8d67f4d1e8bc0a92d6b7

commit 919621f8ac24b522079a8d67f4d1e8bc0a92d6b7
Author: Yunlian Jiang <yunlian@google.com>
Date: Thu Sep 28 04:13:00 2017

Status: Verified (was: Untriaged)

Sign in to add a comment