diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c84456ef011..a9612b017391 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -336,8 +336,7 @@ if("${ENABLE_ALL_WARNINGS}") -Wno-strict-aliasing \ -Wno-type-limits \ -Wno-stringop-overflow \ - -Wno-stringop-overread \ - -Wno-return-type") + -Wno-stringop-overread") endif() set(KNOWN_WARNINGS diff --git a/velox/connectors/hive/HivePartitionFunction.cpp b/velox/connectors/hive/HivePartitionFunction.cpp index 9b8887c3f60f..ad787455abc6 100644 --- a/velox/connectors/hive/HivePartitionFunction.cpp +++ b/velox/connectors/hive/HivePartitionFunction.cpp @@ -51,6 +51,7 @@ inline uint32_t hashOne( VELOX_UNSUPPORTED( "Hive partitioning function doesn't support {} type", TypeTraits::name); + return 0; // Make compiler happy. } template <> diff --git a/velox/connectors/hive/storage_adapters/abfs/AbfsWriteFile.cpp b/velox/connectors/hive/storage_adapters/abfs/AbfsWriteFile.cpp index c231954258f5..1e390ea729e4 100644 --- a/velox/connectors/hive/storage_adapters/abfs/AbfsWriteFile.cpp +++ b/velox/connectors/hive/storage_adapters/abfs/AbfsWriteFile.cpp @@ -118,11 +118,10 @@ class AbfsWriteFile::Impl { blobStorageFileClient_->getProperties(); return true; } catch (Azure::Storage::StorageException& e) { - if (e.StatusCode == Azure::Core::Http::HttpStatusCode::NotFound) { - return false; - } else { + if (e.StatusCode != Azure::Core::Http::HttpStatusCode::NotFound) { throwStorageExceptionWithOperationDetails("GetProperties", path_, e); } + return false; } } diff --git a/velox/exec/tests/TableWriteTest.cpp b/velox/exec/tests/TableWriteTest.cpp index ee114a1ec01b..23fc416e08ab 100644 --- a/velox/exec/tests/TableWriteTest.cpp +++ b/velox/exec/tests/TableWriteTest.cpp @@ -64,6 +64,7 @@ std::string testModeString(TestMode mode) { case TestMode::kBucketed: return "BUCKETED"; } + VELOX_UNREACHABLE(); } static std::shared_ptr generateAggregationNode( diff --git a/velox/functions/prestosql/types/JsonType.cpp b/velox/functions/prestosql/types/JsonType.cpp index 7b11b8f9eaa1..4f90f5200866 100644 --- a/velox/functions/prestosql/types/JsonType.cpp +++ b/velox/functions/prestosql/types/JsonType.cpp @@ -643,6 +643,7 @@ struct CastFromJsonTypedImpl { static simdjson::error_code apply(Input, exec::GenericWriter&) { VELOX_NYI( "Casting from JSON to {} is not supported.", TypeTraits::name); + return simdjson::error_code::UNEXPECTED_ERROR; // Make compiler happy. } }; diff --git a/velox/functions/remote/if/GetSerde.cpp b/velox/functions/remote/if/GetSerde.cpp index 84e5108ad8cf..78f52d614796 100644 --- a/velox/functions/remote/if/GetSerde.cpp +++ b/velox/functions/remote/if/GetSerde.cpp @@ -28,6 +28,6 @@ std::unique_ptr getSerde(const remote::PageFormat& format) { case remote::PageFormat::SPARK_UNSAFE_ROW: return std::make_unique(); } + VELOX_UNREACHABLE(); } - } // namespace facebook::velox::functions