commit | 438f675d104b2806c81fc0985ec5c22ac49c4298 | [log] [tgz] |
---|---|---|
author | Daniel Bratell <bratell@opera.com> | Thu Nov 08 18:08:40 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Nov 08 18:08:40 2018 |
tree | 9b4ead4586831a0e0cc9617114b596c5065cd3d3 | |
parent | 2416c217b3ef1c103fc9a078fa06e518c93a631d [diff] |
Avoid -Wshadow warnings related to content::UNINITIALIZED Due to a new clang, a couple of shadowing warnings appeared in existing code, related to enum values INVALID, UNINITIALIZED and RUNNING. This patch moves both clashing enums into enum classes. Full errors below: In file included from ./../../content/browser/renderer_host/input/synthetic_gesture.cc:10: ../../content/browser/renderer_host/input/synthetic_pointer_action.h:30:23: error: declaration shadows a variable in namespace 'content::(anonymous)' [-Werror,-Wshadow] enum GestureState { UNINITIALIZED, RUNNING, INVALID, DONE }; ^ ./../../content/browser/browser_thread_impl.cc:36:3: note: previous declaration is here UNINITIALIZED = 0, ^ In file included from gen/content/browser/browser_jumbo_1.cc:505: In file included from ./../../content/browser/renderer_host/input/synthetic_gesture.cc:10: ../../content/browser/renderer_host/input/synthetic_pointer_action.h:30:38: error: declaration shadows a variable in namespace 'content::(anonymous)' [-Werror,-Wshadow] enum GestureState { UNINITIALIZED, RUNNING, INVALID, DONE }; ^ ./../../content/browser/browser_thread_impl.cc:38:3: note: previous declaration is here RUNNING, ^ In file included from gen/content/browser/browser_jumbo_1.cc:505: In file included from ./../../content/browser/renderer_host/input/synthetic_gesture.cc:10: ../../content/browser/renderer_host/input/synthetic_pointer_action.h:30:47: error: declaration shadows a variable in namespace 'content::(anonymous)' [-Werror,-Wshadow] enum GestureState { UNINITIALIZED, RUNNING, INVALID, DONE }; ^ ./../../content/browser/frame_host/ancestor_throttle.cc:52:3: note: previous declaration is here INVALID = 6, ^ TBR=avi@chromium.org Change-Id: I2877006171e318dc43fe66ed4c2bcd558f6233a8 Reviewed-on: https://chromium-review.googlesource.com/c/1326498 Reviewed-by: Daniel Bratell <bratell@opera.com> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#606536}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .