[Pkg-chromium-commit] [pkg-chromium] 01/01: release 65.0.3325.146-2
Michael Gilbert
mgilbert at moszumanska.debian.org
Sat Mar 10 19:18:10 UTC 2018
This is an automated email from the git hooks/post-receive script.
mgilbert pushed a commit to branch master
in repository pkg-chromium.
commit f5a42ca4311643c97886b074fbf3e2a6f70ede4e
Author: Michael Gilbert <mgilbert at debian.org>
Date: Sat Mar 10 19:18:34 2018 +0000
release 65.0.3325.146-2
---
debian/changelog | 8 +
debian/patches/fixes/optional.patch | 504 ++-------------------------
debian/patches/series | 5 +
debian/patches/system/vpx.patch | 48 ---
debian/patches/warnings/attribute.patch | 104 ++++++
debian/patches/warnings/enum-compare.patch | 16 +
debian/patches/warnings/initialization.patch | 3 +
debian/patches/warnings/printf.patch | 5 +-
debian/patches/warnings/return-type.patch | 14 +
debian/patches/warnings/sequence-point.patch | 27 ++
debian/rules | 2 +-
11 files changed, 218 insertions(+), 518 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index d0d7354..03a1535 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+chromium-browser (65.0.3325.146-2) unstable; urgency=medium
+
+ * Fix a few gcc build warnings.
+ * Apply upstream's fix for a bug in gcc7's handling of non-copyable types
+ (closes: #890954).
+
+ -- Michael Gilbert <mgilbert at debian.org> Sat, 10 Mar 2018 00:36:33 +0000
+
chromium-browser (65.0.3325.146-1) unstable; urgency=medium
* New upstream stable release release.
diff --git a/debian/patches/fixes/optional.patch b/debian/patches/fixes/optional.patch
index 0627402..6bc5021 100644
--- a/debian/patches/fixes/optional.patch
+++ b/debian/patches/fixes/optional.patch
@@ -1,477 +1,45 @@
-description: some classes don't yet support optional.h from chromium 65, so use optional.h from chromium 64
-author: chromium 64 authors
+description: Optional<std::vector<T>> with T non-copyable is not handled by gcc 7
+author: chromium 66 authors
+bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80654
--- a/base/optional.h
+++ b/base/optional.h
-@@ -6,7 +6,6 @@
- #define BASE_OPTIONAL_H_
+@@ -7,11 +7,29 @@
#include <type_traits>
--#include <utility>
+ #include <utility>
++#include <vector>
#include "base/logging.h"
-@@ -33,29 +32,28 @@ constexpr nullopt_t nullopt(0);
- namespace internal {
-
- template <typename T, bool = std::is_trivially_destructible<T>::value>
--struct OptionalStorageBase {
-+struct OptionalStorage {
- // Initializing |empty_| here instead of using default member initializing
- // to avoid errors in g++ 4.8.
-- constexpr OptionalStorageBase() : empty_('\0') {}
-+ constexpr OptionalStorage() : empty_('\0') {}
-+
-+ constexpr explicit OptionalStorage(const T& value)
-+ : is_null_(false), value_(value) {}
-+
-+ constexpr explicit OptionalStorage(T&& value)
-+ : is_null_(false), value_(std::move(value)) {}
-
- template <class... Args>
-- constexpr explicit OptionalStorageBase(in_place_t, Args&&... args)
-+ constexpr explicit OptionalStorage(base::in_place_t, Args&&... args)
- : is_null_(false), value_(std::forward<Args>(args)...) {}
-
- // When T is not trivially destructible we must call its
- // destructor before deallocating its memory.
-- ~OptionalStorageBase() {
-+ ~OptionalStorage() {
- if (!is_null_)
- value_.~T();
- }
-
-- template <class... Args>
-- void Init(Args&&... args) {
-- DCHECK(is_null_);
-- ::new (&value_) T(std::forward<Args>(args)...);
-- is_null_ = false;
-- }
--
- bool is_null_ = true;
- union {
- // |empty_| exists so that the union will always be initialized, even when
-@@ -67,26 +65,25 @@ struct OptionalStorageBase {
- };
-
- template <typename T>
--struct OptionalStorageBase<T, true /* trivially destructible */> {
-+struct OptionalStorage<T, true> {
- // Initializing |empty_| here instead of using default member initializing
- // to avoid errors in g++ 4.8.
-- constexpr OptionalStorageBase() : empty_('\0') {}
-+ constexpr OptionalStorage() : empty_('\0') {}
-+
-+ constexpr explicit OptionalStorage(const T& value)
-+ : is_null_(false), value_(value) {}
-+
-+ constexpr explicit OptionalStorage(T&& value)
-+ : is_null_(false), value_(std::move(value)) {}
-
- template <class... Args>
-- constexpr explicit OptionalStorageBase(in_place_t, Args&&... args)
-+ constexpr explicit OptionalStorage(base::in_place_t, Args&&... args)
- : is_null_(false), value_(std::forward<Args>(args)...) {}
-
- // When T is trivially destructible (i.e. its destructor does nothing) there
- // is no need to call it. Explicitly defaulting the destructor means it's not
- // user-provided. Those two together make this destructor trivial.
-- ~OptionalStorageBase() = default;
--
-- template <class... Args>
-- void Init(Args&&... args) {
-- DCHECK(is_null_);
-- ::new (&value_) T(std::forward<Args>(args)...);
-- is_null_ = false;
-- }
-+ ~OptionalStorage() = default;
-
- bool is_null_ = true;
- union {
-@@ -98,155 +95,6 @@ struct OptionalStorageBase<T, true /* tr
- };
- };
-
--// Implement conditional constexpr copy and move constructors. These are
--// constexpr if is_trivially_{copy,move}_constructible<T>::value is true
--// respectively. If each is true, the corresponding constructor is defined as
--// "= default;", which generates a constexpr constructor (In this case,
--// the condition of constexpr-ness is satisfied because the base class also has
--// compiler generated constexpr {copy,move} constructors). Note that
--// placement-new is prohibited in constexpr.
--template <typename T,
+ namespace base {
+
++#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 7
++// Workaround for g++7 and earlier family.
++// Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80654, without this
++// Optional<std::vector<T>> where T is non-copyable causes a compile error.
++// As we know it is not trivially copy constructible, explicitly declare so.
++template <typename T>
++struct is_trivially_copy_constructible
++ : std::is_trivially_copy_constructible<T> {};
++
++template <typename... T>
++struct is_trivially_copy_constructible<std::vector<T...>> : std::false_type {};
++#else
++// Otherwise use std::is_trivially_copy_constructible as is.
++template <typename T>
++using is_trivially_copy_constructible = std::is_trivially_copy_constructible<T>;
++#endif
++
+ // Specification:
+ // http://en.cppreference.com/w/cpp/utility/optional/in_place_t
+ struct in_place_t {};
+@@ -106,7 +124,7 @@ struct OptionalStorageBase<T, true /* tr
+ // compiler generated constexpr {copy,move} constructors). Note that
+ // placement-new is prohibited in constexpr.
+ template <typename T,
- bool = std::is_trivially_copy_constructible<T>::value,
-- bool = std::is_trivially_move_constructible<T>::value>
--struct OptionalStorage : OptionalStorageBase<T> {
-- // This is no trivially {copy,move} constructible case. Other cases are
-- // defined below as specializations.
--
-- // Accessing the members of template base class requires explicit
-- // declaration.
-- using OptionalStorageBase<T>::is_null_;
-- using OptionalStorageBase<T>::value_;
-- using OptionalStorageBase<T>::Init;
--
-- // Inherit constructors (specifically, the in_place constructor).
-- using OptionalStorageBase<T>::OptionalStorageBase;
--
-- // User defined constructor deletes the default constructor.
-- // Define it explicitly.
-- OptionalStorage() = default;
--
-- OptionalStorage(const OptionalStorage& other) {
-- if (!other.is_null_)
-- Init(other.value_);
-- }
--
-- OptionalStorage(OptionalStorage&& other) {
-- if (!other.is_null_)
-- Init(std::move(other.value_));
-- }
--};
--
--template <typename T>
--struct OptionalStorage<T,
-- true /* trivially copy constructible */,
-- false /* trivially move constructible */>
-- : OptionalStorageBase<T> {
-- using OptionalStorageBase<T>::is_null_;
-- using OptionalStorageBase<T>::value_;
-- using OptionalStorageBase<T>::Init;
-- using OptionalStorageBase<T>::OptionalStorageBase;
--
-- OptionalStorage() = default;
-- OptionalStorage(const OptionalStorage& other) = default;
--
-- OptionalStorage(OptionalStorage&& other) {
-- if (!other.is_null_)
-- Init(std::move(other.value_));
-- }
--};
--
--template <typename T>
--struct OptionalStorage<T,
-- false /* trivially copy constructible */,
-- true /* trivially move constructible */>
-- : OptionalStorageBase<T> {
-- using OptionalStorageBase<T>::is_null_;
-- using OptionalStorageBase<T>::value_;
-- using OptionalStorageBase<T>::Init;
-- using OptionalStorageBase<T>::OptionalStorageBase;
--
-- OptionalStorage() = default;
-- OptionalStorage(OptionalStorage&& other) = default;
--
-- OptionalStorage(const OptionalStorage& other) {
-- if (!other.is_null_)
-- Init(other.value_);
-- }
--};
--
--template <typename T>
--struct OptionalStorage<T,
-- true /* trivially copy constructible */,
-- true /* trivially move constructible */>
-- : OptionalStorageBase<T> {
-- // If both trivially {copy,move} constructible are true, it is not necessary
-- // to use user-defined constructors. So, just inheriting constructors
-- // from the base class works.
-- using OptionalStorageBase<T>::OptionalStorageBase;
--};
--
--// Base class to support conditionally usable copy-/move- constructors
--// and assign operators.
--template <typename T>
--class OptionalBase {
-- // This class provides implementation rather than public API, so everything
-- // should be hidden. Often we use composition, but we cannot in this case
-- // because of C++ language restriction.
-- protected:
-- constexpr OptionalBase() = default;
-- constexpr OptionalBase(const OptionalBase& other) = default;
-- constexpr OptionalBase(OptionalBase&& other) = default;
--
-- template <class... Args>
-- constexpr explicit OptionalBase(in_place_t, Args&&... args)
-- : storage_(in_place, std::forward<Args>(args)...) {}
--
-- ~OptionalBase() = default;
--
-- OptionalBase& operator=(const OptionalBase& other) {
-- if (other.storage_.is_null_) {
-- FreeIfNeeded();
-- return *this;
-- }
--
-- InitOrAssign(other.storage_.value_);
-- return *this;
-- }
--
-- OptionalBase& operator=(OptionalBase&& other) {
-- if (other.storage_.is_null_) {
-- FreeIfNeeded();
-- return *this;
-- }
--
-- InitOrAssign(std::move(other.storage_.value_));
-- return *this;
-- }
--
-- void InitOrAssign(const T& value) {
-- if (storage_.is_null_)
-- storage_.Init(value);
-- else
-- storage_.value_ = value;
-- }
--
-- void InitOrAssign(T&& value) {
-- if (storage_.is_null_)
-- storage_.Init(std::move(value));
-- else
-- storage_.value_ = std::move(value);
-- }
--
-- void FreeIfNeeded() {
-- if (storage_.is_null_)
-- return;
-- storage_.value_.~T();
-- storage_.is_null_ = true;
-- }
--
-- OptionalStorage<T> storage_;
--};
--
- } // namespace internal
-
- // base::Optional is a Chromium version of the C++17 optional class:
-@@ -256,56 +104,67 @@ class OptionalBase {
- // https://chromium.googlesource.com/chromium/src/+/master/docs/optional.md
- //
- // These are the differences between the specification and the implementation:
-+// - The constructor and emplace method using initializer_list are not
-+// implemented because 'initializer_list' is banned from Chromium.
- // - Constructors do not use 'constexpr' as it is a C++14 extension.
- // - 'constexpr' might be missing in some places for reasons specified locally.
- // - No exceptions are thrown, because they are banned from Chromium.
- // - All the non-members are in the 'base' namespace instead of 'std'.
- template <typename T>
--class Optional : public internal::OptionalBase<T> {
-+class Optional {
- public:
- using value_type = T;
-
-- // Defer default/copy/move constructor implementation to OptionalBase.
-- // TODO(hidehiko): Implement conditional enabling.
-- constexpr Optional() = default;
-- constexpr Optional(const Optional& other) = default;
-- constexpr Optional(Optional&& other) = default;
-+ constexpr Optional() {}
-
-- constexpr Optional(nullopt_t) {}
-+ constexpr Optional(base::nullopt_t) {}
-
-- constexpr Optional(const T& value)
-- : internal::OptionalBase<T>(in_place, value) {}
-+ // TODO(dcheng): Make these constexpr iff T is trivially constructible.
-+ Optional(const Optional& other) {
-+ if (!other.storage_.is_null_)
-+ Init(other.value());
-+ }
-
-- constexpr Optional(T&& value)
-- : internal::OptionalBase<T>(in_place, std::move(value)) {}
-+ Optional(Optional&& other) {
-+ if (!other.storage_.is_null_)
-+ Init(std::move(other.value()));
-+ }
-
-- template <class... Args>
-- constexpr explicit Optional(in_place_t, Args&&... args)
-- : internal::OptionalBase<T>(in_place, std::forward<Args>(args)...) {}
-+ constexpr Optional(const T& value) : storage_(value) {}
-
-- template <
-- class U,
-- class... Args,
-- class = std::enable_if_t<std::is_constructible<value_type,
-- std::initializer_list<U>&,
-- Args...>::value>>
-- constexpr explicit Optional(in_place_t,
-- std::initializer_list<U> il,
-- Args&&... args)
-- : internal::OptionalBase<T>(in_place, il, std::forward<Args>(args)...) {}
-+ constexpr Optional(T&& value) : storage_(std::move(value)) {}
-
-- ~Optional() = default;
-+ template <class... Args>
-+ constexpr explicit Optional(base::in_place_t, Args&&... args)
-+ : storage_(base::in_place, std::forward<Args>(args)...) {}
-
-- // Defer copy-/move- assign operator implementation to OptionalBase.
-- // TOOD(hidehiko): Implement conditional enabling.
-- Optional& operator=(const Optional& other) = default;
-- Optional& operator=(Optional&& other) = default;
-+ ~Optional() = default;
-
-- Optional& operator=(nullopt_t) {
-+ Optional& operator=(base::nullopt_t) {
- FreeIfNeeded();
- return *this;
- }
-
-+ Optional& operator=(const Optional& other) {
-+ if (other.storage_.is_null_) {
-+ FreeIfNeeded();
-+ return *this;
-+ }
-+
-+ InitOrAssign(other.value());
-+ return *this;
-+ }
-+
-+ Optional& operator=(Optional&& other) {
-+ if (other.storage_.is_null_) {
-+ FreeIfNeeded();
-+ return *this;
-+ }
-+
-+ InitOrAssign(std::move(other.value()));
-+ return *this;
-+ }
-+
- template <class U>
- typename std::enable_if<std::is_same<std::decay_t<U>, T>::value,
- Optional&>::type
-@@ -384,10 +243,10 @@ class Optional : public internal::Option
-
- if (storage_.is_null_ != other.storage_.is_null_) {
- if (storage_.is_null_) {
-- storage_.Init(std::move(other.storage_.value_));
-+ Init(std::move(other.storage_.value_));
- other.FreeIfNeeded();
- } else {
-- other.storage_.Init(std::move(storage_.value_));
-+ other.Init(std::move(storage_.value_));
- FreeIfNeeded();
- }
- return;
-@@ -405,27 +264,51 @@ class Optional : public internal::Option
- template <class... Args>
- void emplace(Args&&... args) {
- FreeIfNeeded();
-- storage_.Init(std::forward<Args>(args)...);
-+ Init(std::forward<Args>(args)...);
- }
-
-- template <
-- class U,
-- class... Args,
-- class = std::enable_if_t<std::is_constructible<value_type,
-- std::initializer_list<U>&,
-- Args...>::value>>
-- T& emplace(std::initializer_list<U> il, Args&&... args) {
-- FreeIfNeeded();
-- storage_.Init(il, std::forward<Args>(args)...);
-- return storage_.value_;
-+ private:
-+ void Init(const T& value) {
-+ DCHECK(storage_.is_null_);
-+ new (&storage_.value_) T(value);
-+ storage_.is_null_ = false;
- }
-
-- private:
-- // Accessing template base class's protected member needs explicit
-- // declaration to do so.
-- using internal::OptionalBase<T>::FreeIfNeeded;
-- using internal::OptionalBase<T>::InitOrAssign;
-- using internal::OptionalBase<T>::storage_;
-+ void Init(T&& value) {
-+ DCHECK(storage_.is_null_);
-+ new (&storage_.value_) T(std::move(value));
-+ storage_.is_null_ = false;
-+ }
-+
-+ template <class... Args>
-+ void Init(Args&&... args) {
-+ DCHECK(storage_.is_null_);
-+ new (&storage_.value_) T(std::forward<Args>(args)...);
-+ storage_.is_null_ = false;
-+ }
-+
-+ void InitOrAssign(const T& value) {
-+ if (storage_.is_null_)
-+ Init(value);
-+ else
-+ storage_.value_ = value;
-+ }
-+
-+ void InitOrAssign(T&& value) {
-+ if (storage_.is_null_)
-+ Init(std::move(value));
-+ else
-+ storage_.value_ = std::move(value);
-+ }
-+
-+ void FreeIfNeeded() {
-+ if (storage_.is_null_)
-+ return;
-+ storage_.value_.~T();
-+ storage_.is_null_ = true;
-+ }
-+
-+ internal::OptionalStorage<T> storage_;
- };
-
- // Here after defines comparation operators. The definition follows
---- a/services/network/public/cpp/cors/cors.cc
-+++ b/services/network/public/cpp/cors/cors.cc
-@@ -42,10 +42,10 @@ base::Optional<mojom::CORSError> CheckAc
-
- // Check Suborigins, unless the Access-Control-Allow-Origin is '*', which
- // implies that all Suborigins are okay as well.
-- bool allow_all_origins = allow_origin_header == kAsterisk;
-+ bool allow_all_origins = allow_origin_header.value() == kAsterisk;
- if (!origin.suborigin().empty() && !allow_all_origins) {
-- if (allow_suborigin_header != kAsterisk &&
-- allow_suborigin_header != origin.suborigin()) {
-+ if (allow_suborigin_header.value() != kAsterisk &&
-+ allow_suborigin_header.value() != origin.suborigin()) {
- return mojom::CORSError::kSubOriginMismatch;
- }
- }
-@@ -103,7 +103,7 @@ base::Optional<mojom::CORSError> CheckAc
- // https://fetch.spec.whatwg.org/#http-access-control-allow-credentials.
- // This check should be case sensitive.
- // See also https://fetch.spec.whatwg.org/#http-new-header-syntax.
-- if (allow_credentials_header != kLowerCaseTrue)
-+ if (allow_credentials_header.value() != kLowerCaseTrue)
- return mojom::CORSError::kDisallowCredentialsNotSetToTrue;
- }
- return base::nullopt;
---- a/third_party/WebKit/Source/core/input/ContextMenuAllowedScope.h
-+++ b/third_party/WebKit/Source/core/input/ContextMenuAllowedScope.h
-@@ -12,10 +12,10 @@
- namespace blink {
-
- class CORE_EXPORT ContextMenuAllowedScope {
-+ public:
- STACK_ALLOCATED();
- DISALLOW_COPY_AND_ASSIGN(ContextMenuAllowedScope);
-
-- public:
- ContextMenuAllowedScope();
- ~ContextMenuAllowedScope();
-
---- a/third_party/WebKit/Source/platform/wtf/Allocator.h
-+++ b/third_party/WebKit/Source/platform/wtf/Allocator.h
-@@ -78,7 +78,8 @@ class __thisIsHereToForceASemicolonAfter
- void* operator new(size_t, void*) = delete
-
- #else
--#define STACK_ALLOCATED() DISALLOW_NEW()
-+#define STACK_ALLOCATED()
-+//DISALLOW_NEW()
- #endif
-
- // Provides customizable overrides of fastMalloc/fastFree and operator
++ bool = is_trivially_copy_constructible<T>::value,
+ bool = std::is_trivially_move_constructible<T>::value>
+ struct OptionalStorage : OptionalStorageBase<T> {
+ // This is no trivially {copy,move} constructible case. Other cases are
diff --git a/debian/patches/series b/debian/patches/series
index 98e2f92..1302168 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -28,7 +28,12 @@ fixes/skia_buildfix.patch
warnings/printf.patch
warnings/comment.patch
+warnings/attribute.patch
+warnings/return-type.patch
warnings/enum-boolean.patch
+warnings/enum-compare.patch
+warnings/sequence-point.patch
+warnings/initialization.patch
warnings/unused-typedefs.patch
warnings/unused-variable.patch
warnings/null-destination.patch
diff --git a/debian/patches/system/vpx.patch b/debian/patches/system/vpx.patch
deleted file mode 100644
index fa5e8fd..0000000
--- a/debian/patches/system/vpx.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-description: maintain compatibility with system vpx
-author: Michael Gilbert <mgilbert at debian.org>
-
---- a/third_party/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
-+++ b/third_party/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
-@@ -1161,9 +1161,6 @@ int VP8DecoderImpl::Decode(const Encoded
-
- img = vpx_codec_get_frame(decoder_, &iter);
- int qp;
-- vpx_codec_err_t vpx_ret =
-- vpx_codec_control(decoder_, VPXD_GET_LAST_QUANTIZER, &qp);
-- RTC_DCHECK_EQ(vpx_ret, VPX_CODEC_OK);
- ret = ReturnFrame(img, input_image._timeStamp, input_image.ntp_time_ms_, qp);
- if (ret != 0) {
- // Reset to avoid requesting key frames too often.
-@@ -1217,7 +1214,9 @@ int VP8DecoderImpl::ReturnFrame(const vp
-
- VideoFrame decoded_image(buffer, timestamp, 0, kVideoRotation_0);
- decoded_image.set_ntp_time_ms(ntp_time_ms);
-- decode_complete_callback_->Decoded(decoded_image, rtc::nullopt, qp);
-+ int ret = decode_complete_callback_->Decoded(decoded_image);
-+ if (ret != 0)
-+ return ret;
-
- return WEBRTC_VIDEO_CODEC_OK;
- }
---- a/media/base/decode_capabilities.cc
-+++ b/media/base/decode_capabilities.cc
-@@ -16,8 +16,8 @@
- // backwards compatibility for legacy applications using the library.
- #define VPX_CODEC_DISABLE_COMPAT 1
- extern "C" {
--#include "third_party/libvpx/source/libvpx/vpx/vp8dx.h" // nogncheck
--#include "third_party/libvpx/source/libvpx/vpx/vpx_codec.h" // nogncheck
-+#include <vpx/vp8dx.h>
-+#include <vpx/vpx_codec.h>
- }
- #endif
-
-@@ -106,7 +106,7 @@ bool IsColorSpaceSupported(const media::
- }
-
- bool IsVp9ProfileSupported(VideoCodecProfile profile) {
--#if BUILDFLAG(ENABLE_LIBVPX)
-+#if 0
- // High bit depth capabilities may be toggled via LibVPX config flags.
- static bool vpx_supports_high_bit_depth =
- (vpx_codec_get_caps(vpx_codec_vp9_dx()) & VPX_CODEC_CAP_HIGHBITDEPTH) !=
diff --git a/debian/patches/warnings/attribute.patch b/debian/patches/warnings/attribute.patch
new file mode 100644
index 0000000..73c6a70
--- /dev/null
+++ b/debian/patches/warnings/attribute.patch
@@ -0,0 +1,104 @@
+description: fix gcc optimization follows but attribute doesn't match warnings
+author: Michael Gilbert <mgilbert at debian.org>
+
+--- a/third_party/s2cellid/src/s2/util/math/vector.h
++++ b/third_party/s2cellid/src/s2/util/math/vector.h
+@@ -185,8 +185,7 @@ class BasicVector {
+
+ // Euclidean norm. For integer T, correct only if Norm2 does not overflow.
+ FloatType Norm() const {
+- using std::sqrt;
+- return sqrt(Norm2());
++ return std::sqrt(Norm2());
+ }
+
+ // Normalized vector if the norm is nonzero. Not for integer types.
+@@ -203,8 +202,7 @@ class BasicVector {
+ D Sqrt() const {
+ return Generate(
+ [](const T& x) {
+- using std::sqrt;
+- return sqrt(x);
++ return std::sqrt(x);
+ },
+ AsD());
+ }
+@@ -369,9 +367,8 @@ class Vector2 : public util::math::inter
+ T y() const { return c_[1]; }
+
+ bool aequal(const Vector2& vb, FloatType margin) const {
+- using std::fabs;
+- return (fabs(c_[0] - vb.c_[0]) < margin) &&
+- (fabs(c_[1] - vb.c_[1]) < margin);
++ return (std::fabs(c_[0] - vb.c_[0]) < margin) &&
++ (std::fabs(c_[1] - vb.c_[1]) < margin);
+ }
+
+ void Set(T x, T y) { *this = Vector2(x, y); }
+@@ -384,8 +381,7 @@ class Vector2 : public util::math::inter
+
+ // return the angle between "this" and v in radians
+ FloatType Angle(const Vector2& v) const {
+- using std::atan2;
+- return atan2(CrossProd(v), this->DotProd(v));
++ return std::atan2(CrossProd(v), this->DotProd(v));
+ }
+
+ // return a vector orthogonal to the current one
+@@ -394,8 +390,7 @@ class Vector2 : public util::math::inter
+
+ // TODO(user): unify Fabs/Abs between all Vector classes.
+ Vector2 Fabs() const {
+- using std::fabs;
+- return Vector2(fabs(c_[0]), fabs(c_[1]));
++ return Vector2(std::fabs(c_[0]), std::fabs(c_[1]));
+ }
+ Vector2 Abs() const {
+ static_assert(std::is_integral<VType>::value, "use Fabs for float_types");
+@@ -466,8 +461,7 @@ class Vector3 : public util::math::inter
+
+ // return the angle between two vectors in radians
+ FloatType Angle(const Vector3& va) const {
+- using std::atan2;
+- return atan2(CrossProd(va).Norm(), this->DotProd(va));
++ return std::atan2(CrossProd(va).Norm(), this->DotProd(va));
+ }
+
+ Vector3 Fabs() const { return Abs(); }
+@@ -532,11 +526,10 @@ class Vector4 : public util::math::inter
+ const T* Data() const { return c_; }
+
+ bool aequal(const Vector4& vb, FloatType margin) const {
+- using std::fabs;
+- return (fabs(c_[0] - vb.c_[0]) < margin) &&
+- (fabs(c_[1] - vb.c_[1]) < margin) &&
+- (fabs(c_[2] - vb.c_[2]) < margin) &&
+- (fabs(c_[3] - vb.c_[3]) < margin);
++ return (std::fabs(c_[0] - vb.c_[0]) < margin) &&
++ (std::fabs(c_[1] - vb.c_[1]) < margin) &&
++ (std::fabs(c_[2] - vb.c_[2]) < margin) &&
++ (std::fabs(c_[3] - vb.c_[3]) < margin);
+ }
+
+ void x(const T& v) { c_[0] = v; }
+@@ -551,8 +544,7 @@ class Vector4 : public util::math::inter
+ void Set(T x, T y, T z, T w) { *this = Vector4(x, y, z, w); }
+
+ Vector4 Fabs() const {
+- using std::fabs;
+- return Vector4(fabs(c_[0]), fabs(c_[1]), fabs(c_[2]), fabs(c_[3]));
++ return Vector4(std::fabs(c_[0]), std::fabs(c_[1]), std::fabs(c_[2]), std::fabs(c_[3]));
+ }
+
+ Vector4 Abs() const {
+--- a/third_party/s2cellid/src/s2/s1angle.h
++++ b/third_party/s2cellid/src/s2/s1angle.h
+@@ -23,7 +23,7 @@
+ #ifndef S2_S1ANGLE_H_
+ #define S2_S1ANGLE_H_
+
+-#include <math.h>
++#include <cmath>
+ #include <limits>
+ #include <ostream>
+ #include <type_traits>
diff --git a/debian/patches/warnings/enum-compare.patch b/debian/patches/warnings/enum-compare.patch
new file mode 100644
index 0000000..5f303e8
--- /dev/null
+++ b/debian/patches/warnings/enum-compare.patch
@@ -0,0 +1,16 @@
+description: fix gcc warning about comparison of different enumerated types
+author: Michael Gilbert <mgilbert at debian.org>
+
+--- a/third_party/skia/include/core/SkShader.h
++++ b/third_party/skia/include/core/SkShader.h
+@@ -60,9 +60,7 @@ public:
+ #endif
+ };
+
+- enum {
+- kTileModeCount = kMirror_TileMode + 1
+- };
++ static const int kTileModeCount = kMirror_TileMode + 1;
+
+ /**
+ * Returns the local matrix.
diff --git a/debian/patches/warnings/initialization.patch b/debian/patches/warnings/initialization.patch
index 8072a5e..9879a97 100644
--- a/debian/patches/warnings/initialization.patch
+++ b/debian/patches/warnings/initialization.patch
@@ -1,3 +1,6 @@
+description: source_ could be uninitialized
+author: Michael Gilbert <mgilbert at debian.org>
+
--- a/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
+++ b/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
@@ -174,7 +174,7 @@ class ErrorInfo {
diff --git a/debian/patches/warnings/printf.patch b/debian/patches/warnings/printf.patch
index 68fe0ba..7ae9ba1 100644
--- a/debian/patches/warnings/printf.patch
+++ b/debian/patches/warnings/printf.patch
@@ -1,3 +1,6 @@
+description: cast enums to int for use as printf arguments
+author: Michael Gilbert <mgilbert at debian.org>
+
--- a/ui/gfx/ipc/buffer_types/gfx_param_traits.cc
+++ b/ui/gfx/ipc/buffer_types/gfx_param_traits.cc
@@ -30,7 +30,7 @@ bool ParamTraits<gfx::BufferUsageAndForm
@@ -5,7 +8,7 @@
const gfx::BufferUsageAndFormat& p,
std::string* l) {
- l->append(base::StringPrintf("(%d, %d)", p.usage, p.format));
-+ l->append(base::StringPrintf("(%p, %d)", p.usage, p.format));
++ l->append(base::StringPrintf("(%d, %d)", (int)p.usage, (int)p.format));
}
} // namespace IPC
diff --git a/debian/patches/warnings/return-type.patch b/debian/patches/warnings/return-type.patch
new file mode 100644
index 0000000..b6394c6
--- /dev/null
+++ b/debian/patches/warnings/return-type.patch
@@ -0,0 +1,14 @@
+description: return type was missing when the desktop environment was not known
+author: Michael Gilbert <mgilbert at debian.org>
+
+--- a/chrome/browser/ui/libgtkui/app_indicator_icon.cc
++++ b/chrome/browser/ui/libgtkui/app_indicator_icon.cc
+@@ -99,6 +99,8 @@ bool ShouldUseLibAppIndicator() {
+ case base::nix::DESKTOP_ENVIRONMENT_XFCE:
+ return false;
+ }
++ // Return false for an unknown environment.
++ return false;
+ }
+
+ void EnsureMethodsLoaded() {
diff --git a/debian/patches/warnings/sequence-point.patch b/debian/patches/warnings/sequence-point.patch
new file mode 100644
index 0000000..f049aee
--- /dev/null
+++ b/debian/patches/warnings/sequence-point.patch
@@ -0,0 +1,27 @@
+description: fix undefined behavior, variables assigned twice in the same statement
+author: Michael Gilbert <mgilbert at debian.org>
+
+--- a/cc/layers/surface_layer_impl.cc
++++ b/cc/layers/surface_layer_impl.cc
+@@ -112,7 +112,7 @@ viz::SurfaceDrawQuad* SurfaceLayerImpl::
+ // allocate a new SharedQuadState. Assign the new SharedQuadState to
+ // *|common_shared_quad_state| so that it may be reused by another emitted
+ // viz::SurfaceDrawQuad.
+- viz::SharedQuadState* shared_quad_state =
++ viz::SharedQuadState*
+ shared_quad_state = render_pass->CreateAndAppendSharedQuadState();
+
+ PopulateScaledSharedQuadState(shared_quad_state, device_scale_factor,
+--- a/chrome/browser/ui/libgtkui/settings_provider_gsettings.cc
++++ b/chrome/browser/ui/libgtkui/settings_provider_gsettings.cc
+@@ -43,8 +43,8 @@ SettingsProviderGSettings::SettingsProvi
+ const gchar* settings_schema =
+ base::nix::GetDesktopEnvironment(env.get()) ==
+ base::nix::DESKTOP_ENVIRONMENT_CINNAMON
+- ? settings_schema = kCinnamonPreferencesSchema
+- : settings_schema = kGnomePreferencesSchema;
++ ? kCinnamonPreferencesSchema
++ : kGnomePreferencesSchema;
+
+ if (!g_settings_schema_source_lookup(g_settings_schema_source_get_default(),
+ settings_schema, FALSE) ||
diff --git a/debian/rules b/debian/rules
index deca351..5818187 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,7 +13,7 @@ defines=is_clang=false clang_use_chrome_plugins=false
defines+=target_extra_ldflags=\"-Wl,--stats\"
# extra flags to reduce warnings that aren't very useful
-defines+=target_extra_cxxflags=\"-Wno-deprecated-declarations -Wno-dangling-else\"
+defines+=target_extra_cxxflags=\"-Wno-deprecated-declarations -Wno-dangling-else -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable\"
# set the appropriate cpu architecture
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-chromium/pkg-chromium.git
More information about the Pkg-chromium-commit
mailing list