mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
Remove some clang warning suppressions, fix warnings
Change-Id: Id1a9ec85ea14be74d8451af5975209aa80029056
This commit is contained in:
1 parent
6935b8c851
commit
ac54e2dfca
9 files changed
+53
-54
No files matched your search
@@ -76,9 +76,9 @@ if ("${UPPERCASE_BUILD_WARNING_LEVEL}" STREQUAL "CHECKIN")
|
||||
-Wno-shadow -Wno-switch-enum -Wno-documentation -Wno-exit-time-destructors \
|
||||
-Wno-global-constructors -Wno-weak-template-vtables -Wno-undefined-reinterpret-cast \
|
||||
-Wno-implicit-fallthrough -Wno-old-style-cast -Wno-unreachable-code-return \
|
||||
-Wno-float-equal -Wno-missing-prototypes -Wno-non-virtual-dtor \
|
||||
-Wno-unused-macros -Wno-covered-switch-default -Wno-unreachable-code-break \
|
||||
-Wno-extra-semi -Wno-cast-align -Wno-vla-extension -Wno-shift-sign-overflow \
|
||||
-Wno-float-equal -Wno-missing-prototypes \
|
||||
-Wno-covered-switch-default \
|
||||
-Wno-cast-align -Wno-vla-extension -Wno-shift-sign-overflow \
|
||||
-Wno-used-but-marked-unused -Wno-missing-variable-declarations \
|
||||
-Wno-gnu-zero-variadic-macro-arguments -Wconversion -Wno-sign-conversion \
|
||||
-Wno-disabled-macro-expansion -Wc++11-narrowing -Wnarrowing -Wno-shorten-64-to-32")
|
||||
|
||||
@@ -283,7 +283,7 @@ class TestPrimitiveBuilder : public TestBuilder {
|
||||
|
||||
#define PINT_DECL(CapType, c_type, LOWER, UPPER) \
|
||||
struct P##CapType { \
|
||||
PTYPE_DECL(CapType, c_type); \
|
||||
PTYPE_DECL(CapType, c_type) \
|
||||
static void draw(int64_t N, vector<T>* draws) { \
|
||||
test::randint<T>(N, LOWER, UPPER, draws); \
|
||||
} \
|
||||
@@ -291,7 +291,7 @@ class TestPrimitiveBuilder : public TestBuilder {
|
||||
|
||||
#define PFLOAT_DECL(CapType, c_type, LOWER, UPPER) \
|
||||
struct P##CapType { \
|
||||
PTYPE_DECL(CapType, c_type); \
|
||||
PTYPE_DECL(CapType, c_type) \
|
||||
static void draw(int64_t N, vector<T>* draws) { \
|
||||
test::random_real<T>(N, 0, LOWER, UPPER, draws); \
|
||||
} \
|
||||
@@ -311,7 +311,7 @@ PFLOAT_DECL(Float, float, -1000, 1000);
|
||||
PFLOAT_DECL(Double, double, -1000, 1000);
|
||||
|
||||
struct PBoolean {
|
||||
PTYPE_DECL(Boolean, uint8_t);
|
||||
PTYPE_DECL(Boolean, uint8_t)
|
||||
};
|
||||
|
||||
template <>
|
||||
@@ -378,8 +378,6 @@ TYPED_TEST_CASE(TestPrimitiveBuilder, Primitives);
|
||||
|
||||
#define DECL_TYPE() typedef typename TestFixture::Type Type;
|
||||
|
||||
#define DECL_ARRAYTYPE() typedef typename TestFixture::ArrayType ArrayType;
|
||||
|
||||
TYPED_TEST(TestPrimitiveBuilder, TestInit) {
|
||||
DECL_TYPE();
|
||||
|
||||
|
||||
@@ -239,9 +239,6 @@ std::shared_ptr<Array> ListArray::values() const { return values_; }
|
||||
// ----------------------------------------------------------------------
|
||||
// String and binary
|
||||
|
||||
static std::shared_ptr<DataType> kBinary = std::make_shared<BinaryType>();
|
||||
static std::shared_ptr<DataType> kString = std::make_shared<StringType>();
|
||||
|
||||
BinaryArray::BinaryArray(const std::shared_ptr<ArrayData>& data) {
|
||||
DCHECK_EQ(data->type->id(), Type::BINARY);
|
||||
SetData(data);
|
||||
@@ -261,8 +258,8 @@ BinaryArray::BinaryArray(int64_t length, const std::shared_ptr<Buffer>& value_of
|
||||
const std::shared_ptr<Buffer>& data,
|
||||
const std::shared_ptr<Buffer>& null_bitmap, int64_t null_count,
|
||||
int64_t offset)
|
||||
: BinaryArray(kBinary, length, value_offsets, data, null_bitmap, null_count, offset) {
|
||||
}
|
||||
: BinaryArray(binary(), length, value_offsets, data, null_bitmap, null_count,
|
||||
offset) {}
|
||||
|
||||
BinaryArray::BinaryArray(const std::shared_ptr<DataType>& type, int64_t length,
|
||||
const std::shared_ptr<Buffer>& value_offsets,
|
||||
@@ -283,8 +280,7 @@ StringArray::StringArray(int64_t length, const std::shared_ptr<Buffer>& value_of
|
||||
const std::shared_ptr<Buffer>& data,
|
||||
const std::shared_ptr<Buffer>& null_bitmap, int64_t null_count,
|
||||
int64_t offset)
|
||||
: BinaryArray(kString, length, value_offsets, data, null_bitmap, null_count, offset) {
|
||||
}
|
||||
: BinaryArray(utf8(), length, value_offsets, data, null_bitmap, null_count, offset) {}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Fixed width binary
|
||||
|
||||
@@ -86,11 +86,14 @@ class ARROW_EXPORT FileInterface {
|
||||
|
||||
class ARROW_EXPORT Seekable {
|
||||
public:
|
||||
virtual ~Seekable() = default;
|
||||
virtual Status Seek(int64_t position) = 0;
|
||||
};
|
||||
|
||||
class ARROW_EXPORT Writeable {
|
||||
public:
|
||||
virtual ~Writeable() = default;
|
||||
|
||||
virtual Status Write(const uint8_t* data, int64_t nbytes) = 0;
|
||||
|
||||
/// \brief Flush buffered bytes, if any
|
||||
@@ -101,6 +104,8 @@ class ARROW_EXPORT Writeable {
|
||||
|
||||
class ARROW_EXPORT Readable {
|
||||
public:
|
||||
virtual ~Readable() = default;
|
||||
|
||||
virtual Status Read(int64_t nbytes, int64_t* bytes_read, uint8_t* out) = 0;
|
||||
|
||||
// Does not copy if not necessary
|
||||
|
||||
@@ -477,7 +477,6 @@ fbs::Type ToFlatbufferType(Type::type type) {
|
||||
return fbs::Type_INT64;
|
||||
default:
|
||||
DCHECK(false) << "Cannot reach this code";
|
||||
break;
|
||||
}
|
||||
// prevent compiler warning
|
||||
return fbs::Type_MIN;
|
||||
@@ -632,19 +631,19 @@ class TableWriter::TableWriterImpl : public ArrayVisitor {
|
||||
#define VISIT_PRIMITIVE(TYPE) \
|
||||
Status Visit(const TYPE& values) override { return WritePrimitiveValues(values); }
|
||||
|
||||
VISIT_PRIMITIVE(BooleanArray);
|
||||
VISIT_PRIMITIVE(Int8Array);
|
||||
VISIT_PRIMITIVE(Int16Array);
|
||||
VISIT_PRIMITIVE(Int32Array);
|
||||
VISIT_PRIMITIVE(Int64Array);
|
||||
VISIT_PRIMITIVE(UInt8Array);
|
||||
VISIT_PRIMITIVE(UInt16Array);
|
||||
VISIT_PRIMITIVE(UInt32Array);
|
||||
VISIT_PRIMITIVE(UInt64Array);
|
||||
VISIT_PRIMITIVE(FloatArray);
|
||||
VISIT_PRIMITIVE(DoubleArray);
|
||||
VISIT_PRIMITIVE(BinaryArray);
|
||||
VISIT_PRIMITIVE(StringArray);
|
||||
VISIT_PRIMITIVE(BooleanArray)
|
||||
VISIT_PRIMITIVE(Int8Array)
|
||||
VISIT_PRIMITIVE(Int16Array)
|
||||
VISIT_PRIMITIVE(Int32Array)
|
||||
VISIT_PRIMITIVE(Int64Array)
|
||||
VISIT_PRIMITIVE(UInt8Array)
|
||||
VISIT_PRIMITIVE(UInt16Array)
|
||||
VISIT_PRIMITIVE(UInt32Array)
|
||||
VISIT_PRIMITIVE(UInt64Array)
|
||||
VISIT_PRIMITIVE(FloatArray)
|
||||
VISIT_PRIMITIVE(DoubleArray)
|
||||
VISIT_PRIMITIVE(BinaryArray)
|
||||
VISIT_PRIMITIVE(StringArray)
|
||||
|
||||
#undef VISIT_PRIMITIVE
|
||||
|
||||
|
||||
+18
-18
@@ -324,24 +324,24 @@ class RecordBatchSerializer : public ArrayVisitor {
|
||||
#define VISIT_FIXED_WIDTH(TYPE) \
|
||||
Status Visit(const TYPE& array) override { return VisitFixedWidth<TYPE>(array); }
|
||||
|
||||
VISIT_FIXED_WIDTH(Int8Array);
|
||||
VISIT_FIXED_WIDTH(Int16Array);
|
||||
VISIT_FIXED_WIDTH(Int32Array);
|
||||
VISIT_FIXED_WIDTH(Int64Array);
|
||||
VISIT_FIXED_WIDTH(UInt8Array);
|
||||
VISIT_FIXED_WIDTH(UInt16Array);
|
||||
VISIT_FIXED_WIDTH(UInt32Array);
|
||||
VISIT_FIXED_WIDTH(UInt64Array);
|
||||
VISIT_FIXED_WIDTH(HalfFloatArray);
|
||||
VISIT_FIXED_WIDTH(FloatArray);
|
||||
VISIT_FIXED_WIDTH(DoubleArray);
|
||||
VISIT_FIXED_WIDTH(Date32Array);
|
||||
VISIT_FIXED_WIDTH(Date64Array);
|
||||
VISIT_FIXED_WIDTH(TimestampArray);
|
||||
VISIT_FIXED_WIDTH(Time32Array);
|
||||
VISIT_FIXED_WIDTH(Time64Array);
|
||||
VISIT_FIXED_WIDTH(FixedSizeBinaryArray);
|
||||
VISIT_FIXED_WIDTH(DecimalArray);
|
||||
VISIT_FIXED_WIDTH(Int8Array)
|
||||
VISIT_FIXED_WIDTH(Int16Array)
|
||||
VISIT_FIXED_WIDTH(Int32Array)
|
||||
VISIT_FIXED_WIDTH(Int64Array)
|
||||
VISIT_FIXED_WIDTH(UInt8Array)
|
||||
VISIT_FIXED_WIDTH(UInt16Array)
|
||||
VISIT_FIXED_WIDTH(UInt32Array)
|
||||
VISIT_FIXED_WIDTH(UInt64Array)
|
||||
VISIT_FIXED_WIDTH(HalfFloatArray)
|
||||
VISIT_FIXED_WIDTH(FloatArray)
|
||||
VISIT_FIXED_WIDTH(DoubleArray)
|
||||
VISIT_FIXED_WIDTH(Date32Array)
|
||||
VISIT_FIXED_WIDTH(Date64Array)
|
||||
VISIT_FIXED_WIDTH(TimestampArray)
|
||||
VISIT_FIXED_WIDTH(Time32Array)
|
||||
VISIT_FIXED_WIDTH(Time64Array)
|
||||
VISIT_FIXED_WIDTH(FixedSizeBinaryArray)
|
||||
VISIT_FIXED_WIDTH(DecimalArray)
|
||||
|
||||
#undef VISIT_FIXED_WIDTH
|
||||
|
||||
|
||||
@@ -94,7 +94,14 @@ if ("${COMPILER_FAMILY}" STREQUAL "clang")
|
||||
set_property(SOURCE malloc.cc
|
||||
APPEND_STRING
|
||||
PROPERTY COMPILE_FLAGS
|
||||
" -Wno-parentheses-equality -Wno-shorten-64-to-32")
|
||||
" -Wno-parentheses-equality \
|
||||
-Wno-shorten-64-to-32 \
|
||||
-Wno-unused-macros")
|
||||
|
||||
set_property(SOURCE thirdparty/xxhash.cc
|
||||
APPEND_STRING
|
||||
PROPERTY COMPILE_FLAGS
|
||||
"-Wno-unused-macros")
|
||||
endif()
|
||||
|
||||
if ("${COMPILER_FAMILY}" STREQUAL "gcc")
|
||||
|
||||
@@ -548,8 +548,6 @@ Status PlasmaClient::Disconnect() {
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
#define h_addr h_addr_list[0]
|
||||
|
||||
Status PlasmaClient::Transfer(const char* address, int port, const ObjectID& object_id) {
|
||||
return SendDataRequest(manager_conn_, object_id, address, port);
|
||||
}
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
|
||||
using arrow::Status;
|
||||
|
||||
/* Number of times we try binding to a socket. */
|
||||
#define NUM_BIND_ATTEMPTS 5
|
||||
#define BIND_TIMEOUT_MS 100
|
||||
|
||||
/* Number of times we try connecting to a socket. */
|
||||
#define NUM_CONNECT_ATTEMPTS 50
|
||||
#define CONNECT_TIMEOUT_MS 100
|
||||
|
||||
Reference in new issue
Block a user