forked from apache/incubator-heron
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch to fix cppcheck with newer glibc (apache#3471)
- Loading branch information
Showing
2 changed files
with
17 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff -Naur cppcheck/cppcheck-1.90/cli/filelister.cpp cppcheck-fixed/cppcheck-1.90/cli/filelister.cpp | ||
--- cppcheck/cppcheck-1.90/cli/filelister.cpp 2020-02-20 22:42:28.000000000 -0500 | ||
+++ cppcheck-fixed/cppcheck-1.90/cli/filelister.cpp 2020-02-20 22:44:48.000000000 -0500 | ||
@@ -194,7 +194,7 @@ | ||
std::string new_path; | ||
new_path.reserve(path.length() + 100);// prealloc some memory to avoid constant new/deletes in loop | ||
|
||
- while ((readdir_r(dir, &entry, &dir_result) == 0) && (dir_result != nullptr)) { | ||
+ while ((dir_result = readdir(dir)) != NULL) { | ||
|
||
if ((std::strcmp(dir_result->d_name, ".") == 0) || | ||
(std::strcmp(dir_result->d_name, "..") == 0)) |