2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +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,6 +216,12 @@ sub mkdep {
if ($ext ne "o" || !exists($objs{"$base.lo"})) { if ($ext ne "o" || !exists($objs{"$base.lo"})) {
$imp = $implicit{"i"}; $imp = $implicit{"i"};
if (exists $implicit{"i"} && exists $implicit{"plog"}) { if (exists $implicit{"i"} && exists $implicit{"plog"}) {
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"}; $imp = $implicit{"i"};
$deps =~ s/\.l?o/.i/; $deps =~ s/\.l?o/.i/;
$new_makefile .= $deps; $new_makefile .= $deps;
@ -231,6 +237,7 @@ sub mkdep {
} }
} }
} }
}
my $newfile = $file . ".new"; my $newfile = $file . ".new";
if (!open(MF, ">$newfile")) { if (!open(MF, ">$newfile")) {