diff --git a/src/common/container.h b/src/common/container.h index 8122fca..098a1c2 100644 --- a/src/common/container.h +++ b/src/common/container.h @@ -74,7 +74,8 @@ class FixedArray { private: void CopyFrom(const FixedArray &other) { - if (data_ != other.data_) memcpy(data_, other.data_, sizeof(data_)); + // Unary + to decay array to pointer and avoid array-comparison warning. + if (+data_ != +other.data_) memcpy(data_, other.data_, sizeof(data_)); } T data_[N];