Skip to content

Commit

Permalink
#pragma GCC diagnostic push
Browse files Browse the repository at this point in the history
#pragma GCC diagnostic ignored "-Wdeprecated"
  • Loading branch information
jchen351 committed Jul 22, 2024
1 parent f356538 commit 6177120
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions onnxruntime/core/session/inference_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2745,15 +2745,12 @@ common::Status InferenceSession::RunAsync(const RunOptions* run_options,
if (!tp || concurrency::ThreadPool::DegreeOfParallelism(tp) < 2) {
return ORT_MAKE_STATUS(ONNXRUNTIME, INVALID_ARGUMENT, "intra op thread pool must have at least one thread for RunAsync");
}
#if __cplusplus >= 202002L
std::function<void()> run_fn = [=, this]() {
#else
#ifdef __GNUC__

Check warning on line 2748 in onnxruntime/core/session/inference_session.cc

View workflow job for this annotation

GitHub Actions / Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/core/session/inference_session.cc:2748: Lines should be <= 120 characters long [whitespace/line_length] [2]
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated"
std::function<void()> run_fn = [=]() {
std::function<void()> run_fn = [=]() {
#pragma GCC diagnostic pop
#endif
#else
std::function<void()> run_fn = [=]() {
#endif
Status status = Status::OK();
Expand Down

0 comments on commit 6177120

Please sign in to comment.