2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

Do not check files generated by protbuf-c with PVS-Studio

This commit is contained in:
Todd C. Miller 2022-06-29 10:17:35 -06:00
parent b6151781ce
commit a14bef6a41

View File

@ -216,17 +216,24 @@ sub mkdep {
if ($ext ne "o" || !exists($objs{"$base.lo"})) {
$imp = $implicit{"i"};
if (exists $implicit{"i"} && exists $implicit{"plog"}) {
$imp = $implicit{"i"};
$deps =~ s/\.l?o/.i/;
$new_makefile .= $deps;
$new_makefile .= "\t$imp\n";
if ($src =~ /\.pb-c.c$/) {
# Do not check protobuf-c generated files
$obj =~ /(.*)\.[a-z]+$/;
$new_makefile .= "${1}.plog: ${src}\n";
$new_makefile .= "\ttouch \$@\n";
} else {
$imp = $implicit{"i"};
$deps =~ s/\.l?o/.i/;
$new_makefile .= $deps;
$new_makefile .= "\t$imp\n";
$imp = $implicit{"plog"};
$imp =~ s/ifile=\$<; *//;
$imp =~ s/\$\$\{ifile\%i\}c/$src/;
$obj =~ /(.*)\.[a-z]+$/;
$new_makefile .= "${1}.plog: ${1}.i\n";
$new_makefile .= "\t$imp\n";
$imp = $implicit{"plog"};
$imp =~ s/ifile=\$<; *//;
$imp =~ s/\$\$\{ifile\%i\}c/$src/;
$obj =~ /(.*)\.[a-z]+$/;
$new_makefile .= "${1}.plog: ${1}.i\n";
$new_makefile .= "\t$imp\n";
}
}
}
}