diff --git a/.clang-tidy b/.clang-tidy index 8c70a22e826afe6cd29c777ac18fbb54a6aa30c8..a3847a6ec11b4cea2c725ceec34eac983d66e434 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -137,13 +137,13 @@ bugprone-unused-raii, -clang-analyzer-security.insecureAPI.mktemp, -clang-analyzer-security.insecureAPI.rand, -clang-analyzer-security.insecureAPI.strcpy, --clang-analyzer-security.insecureAPI.vfork, +clang-analyzer-security.insecureAPI.vfork, -clang-analyzer-unix.API, -clang-analyzer-unix.DynamicMemoryModeling, -clang-analyzer-unix.Malloc, -clang-analyzer-unix.MallocSizeof, -clang-analyzer-unix.MismatchedDeallocator, --clang-analyzer-unix.Vfork, +clang-analyzer-unix.Vfork, -clang-analyzer-unix.cstring.BadSizeArg, -clang-analyzer-unix.cstring.CStringModeling, -clang-analyzer-unix.cstring.NullArg, diff --git a/paddle/fluid/framework/io/shell.cc b/paddle/fluid/framework/io/shell.cc index 46456df6e68f930029d42f6c760ce7c4a756931c..b710289b09175f354787360199970e660d652bcb 100644 --- a/paddle/fluid/framework/io/shell.cc +++ b/paddle/fluid/framework/io/shell.cc @@ -117,7 +117,7 @@ static int shell_popen_fork_internal(const char* real_cmd, int child_pid = -1; // Too frequent calls to fork() makes openmpi very slow. Use vfork() instead. // But vfork() is very dangerous. Be careful. - if ((child_pid = vfork()) < 0) { + if ((child_pid = vfork()) < 0) { // NOLINT return -1; } @@ -127,7 +127,7 @@ static int shell_popen_fork_internal(const char* real_cmd, return child_pid; } - int child_std_end = do_read ? 1 : 0; + int child_std_end = do_read ? 1 : 0; // NOLINT close(parent_end); if (child_end != child_std_end) {