Skip to content

Commit

Permalink
Fix GCC12 return-type warning (facebookincubator#9902)
Browse files Browse the repository at this point in the history
Summary:
Fix warnings of type `control reaches end of non-void function [-Wreturn-type]`

Pull Request resolved: facebookincubator#9902

Reviewed By: amitkdutta, tanjialiang

Differential Revision: D57847046

Pulled By: xiaoxmeng

fbshipit-source-id: 2ed27af9027da729bb7a156ed05107fcfbfd3145
  • Loading branch information
majetideepak authored and facebook-github-bot committed May 28, 2024
1 parent ba98319 commit cbf9b55
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions velox/functions/lib/aggregates/BitwiseAggregateBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ exec::AggregateRegistrationResult registerBitwise(
case TypeKind::BIGINT:
return std::make_unique<T<int64_t>>(resultType);
default:
VELOX_CHECK(
false,
VELOX_UNREACHABLE(
"Unknown input type for {} aggregation {}",
name,
inputType->kindName());
Expand Down
8 changes: 3 additions & 5 deletions velox/functions/prestosql/aggregates/MinMaxAggregates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,10 +971,9 @@ exec::AggregateRegistrationResult registerMinMax(
if (inputType->isLongDecimal()) {
return std::make_unique<TNumericN<int128_t>>(resultType);
}
VELOX_UNREACHABLE();
[[fallthrough]];
default:
VELOX_CHECK(
false,
VELOX_UNREACHABLE(
"Unknown input type for {} aggregation {}",
name,
inputType->kindName());
Expand Down Expand Up @@ -1012,8 +1011,7 @@ exec::AggregateRegistrationResult registerMinMax(
return std::make_unique<TNonNumeric>(
inputType, throwOnNestedNulls);
default:
VELOX_CHECK(
false,
VELOX_UNREACHABLE(
"Unknown input type for {} aggregation {}",
name,
inputType->kindName());
Expand Down
3 changes: 1 addition & 2 deletions velox/functions/prestosql/aggregates/SumAggregate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ exec::AggregateRegistrationResult registerSum(
return std::make_unique<DecimalSumAggregate<int128_t>>(resultType);

default:
VELOX_CHECK(
false,
VELOX_UNREACHABLE(
"Unknown input type for {} aggregation {}",
name,
inputType->kindName());
Expand Down
3 changes: 1 addition & 2 deletions velox/functions/sparksql/aggregates/SumAggregate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ exec::AggregateRegistrationResult registerSum(
}
[[fallthrough]];
default:
VELOX_CHECK(
false,
VELOX_UNREACHABLE(
"Unknown input type for {} aggregation {}",
name,
inputType->kindName());
Expand Down

0 comments on commit cbf9b55

Please sign in to comment.