Skip to content

Commit

Permalink
[clang-tidy] NO.42-44 enable noexcept-move-constructor,unused-but-se…
Browse files Browse the repository at this point in the history
…t-variable,security.FloatLoopCounter (#61555)
  • Loading branch information
enkilee authored Feb 20, 2024
1 parent 3a1aa08 commit 54af517
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ clang-analyzer-optin.portability.UnixAPI,
-clang-analyzer-osx.coreFoundation.CFRetainRelease,
-clang-analyzer-osx.coreFoundation.containers.OutOfBounds,
-clang-analyzer-osx.coreFoundation.containers.PointerSizedValues,
-clang-analyzer-security.FloatLoopCounter,
clang-analyzer-security.FloatLoopCounter,
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
-clang-analyzer-security.insecureAPI.SecuritySyntaxChecker,
-clang-analyzer-security.insecureAPI.UncheckedReturn,
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/inference/utils/table_printer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void TablePrinter::CalcLayout() {
void TablePrinter::AddRowDivider(std::stringstream& ss) {
ss << "+";
for (float share : shares_) {
for (float j = 0; j < share + 2; ++j) ss << "-";
for (int j = 0; j < static_cast<int>(share) + 2; ++j) ss << "-";
ss << "+";
}
ss << "\n";
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/platform/profiler/event_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ HostTraceEventNode* NodeTrees::BuildTreeRelationship(

// build relationship between host event node and op supplement node
for (auto it = post_order_nodes.begin(); it < post_order_nodes.end(); ++it) {
int op_supplement_count = 0;
int op_supplement_count = 0; // NOLINT
bool hasenter = false;
std::vector<OperatorSupplementEventNode*>::iterator firstposition;
std::vector<OperatorSupplementEventNode*>::iterator lastposition =
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/fluid/reader/reader_blocking_queue_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ struct MyClass {
MyClass() : val_(0) {}
explicit MyClass(int val) : val_(val) {}
MyClass(const MyClass& b) { val_ = b.val_; }
MyClass(MyClass&& b) { val_ = b.val_; }
MyClass(MyClass&& b) noexcept { val_ = b.val_; }
MyClass& operator=(const MyClass& b) {
if (this != &b) {
val_ = b.val_;
Expand Down

0 comments on commit 54af517

Please sign in to comment.