Skip to content

Commit b881d9d

Browse files
committed
[clang-tidy] No. 59,60 bugprone-unused-return-value, bugprone-suspicious-missing-comma
1 parent e9bb312 commit b881d9d

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.clang-tidy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ bugprone-integer-division,
3232
-bugprone-string-literal-with-embedded-nul,
3333
-bugprone-suspicious-enum-usage,
3434
-bugprone-suspicious-memset-usage,
35-
-bugprone-suspicious-missing-comma,
35+
bugprone-suspicious-missing-comma,
3636
-bugprone-suspicious-semicolon,
3737
-bugprone-suspicious-string-compare,
3838
-bugprone-terminating-continue,
@@ -42,7 +42,7 @@ bugprone-integer-division,
4242
-bugprone-undelegated-constructor,
4343
-bugprone-unhandled-self-assignment,
4444
bugprone-unused-raii,
45-
-bugprone-unused-return-value,
45+
bugprone-unused-return-value,
4646
-bugprone-use-after-move,
4747
-bugprone-virtual-near-miss,
4848
-clang-analyzer-apiModeling.StdCLibraryFunctions,

paddle/fluid/distributed/fleet_executor/fleet_executor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ void FleetExecutor::Init(
190190
framework::GetUnusedVars(program_desc.Block(0), ops, {});
191191

192192
for (auto& unique_op : ops) {
193-
unique_op.release();
193+
[[maybe_unused]] auto released_op = unique_op.release();
194194
}
195195

196196
// NOTE: For inference, the vars in inference_root_scope_vars

paddle/fluid/framework/ir/mkldnn/compute_propagate_scales_mkldnn_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ void ComputePropagateScalesMkldnnPass::ApplyImpl(ir::Graph* graph) const {
492492
FusePassBase::Init(pattern_name, graph);
493493

494494
const std::unordered_set<std::string> scale_immutable_ops = {
495-
"fused_transpose"
495+
"fused_transpose",
496496
"transpose2",
497497
"reshape2",
498498
"pool2d",

paddle/fluid/framework/operator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2022,7 +2022,7 @@ void OperatorWithKernel::RunImpl(const Scope& scope,
20222022
ExecutionContext(*this, exec_scope, *dev_ctx, *runtime_ctx));
20232023
}
20242024
if (fallback_to_cpu) {
2025-
phi_kernel_.release();
2025+
[[maybe_unused]] auto released_kernel = phi_kernel_.release();
20262026
}
20272027
}
20282028

paddle/fluid/pybind/eager_legacy_op_function_generator.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,11 +488,11 @@ int main(int argc, char* argv[]) {
488488
paddle::operators::RegisterCustomDeviceCommonKernel("fake_device");
489489
#endif
490490

491+
const std::string str = "\"paddle/fluid/eager/api/generated/fluid_generated/";
491492
std::vector<std::string> headers{
492493
"<Python.h>",
493494
"\"paddle/fluid/platform/enforce.h\"",
494-
"\"paddle/fluid/eager/api/generated/fluid_generated/"
495-
"dygraph_forward_api.h\"",
495+
str + "dygraph_forward_api.h\"",
496496
"\"paddle/fluid/pybind/eager_utils.h\"",
497497
"\"paddle/fluid/platform/profiler/event_tracing.h\"",
498498
"\"paddle/fluid/pybind/exception.h\"",

0 commit comments

Comments
 (0)