src.dualinventive.com/fw/libdi_fw-tests/common/cmake/scripts/checkpatch.pl.patch

18 lines
611 B
Diff

diff --git a/cmake/scripts/checkpatch.pl b/cmake/scripts/checkpatch.pl
index 4de3cc4..653b89f 100755
--- a/cmake/scripts/checkpatch.pl
+++ b/cmake/scripts/checkpatch.pl
@@ -720,7 +720,11 @@ sub seed_camelcase_includes {
$camelcase_cache = ".checkpatch-camelcase.git.$git_last_include_commit";
} else {
my $last_mod_date = 0;
- $files = `find $root/include -name "*.h"`;
+ if (!defined $root) {
+ $root = ".";
+ }
+
+ $files = `find $root/include -name "*.h" 2>/dev/null`;
@include_files = split('\n', $files);
foreach my $file (@include_files) {
my $date = POSIX::strftime("%Y%m%d%H%M",