Skip to content

Commit

Permalink
Use [[noreturn]]
Browse files Browse the repository at this point in the history
  • Loading branch information
acvictor committed Apr 9, 2024
1 parent 361d398 commit 4ecfe01
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions velox/connectors/hive/HivePartitionFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,13 @@ int32_t hashTimestamp(const Timestamp& ts) {
return hashInt64((ts.getSeconds() << 30) | ts.getNanos());
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreturn-type"
template <TypeKind kind>
inline uint32_t hashOne(
[[noreturn]] inline uint32_t hashOne(
const typename TypeTraits<kind>::NativeType& /* value */) {
VELOX_UNSUPPORTED(
"Hive partitioning function doesn't support {} type",
TypeTraits<kind>::name);
}
#pragma GCC diagnostic pop

template <>
inline uint32_t hashOne<TypeKind::BOOLEAN>(const bool& value) {
Expand Down

0 comments on commit 4ecfe01

Please sign in to comment.