add -unref option to mkerr.pl
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
0f6a2a97a5
commit
02a60ae28f
@ -3,6 +3,7 @@
|
|||||||
my $config = "crypto/err/openssl.ec";
|
my $config = "crypto/err/openssl.ec";
|
||||||
my $hprefix = "openssl/";
|
my $hprefix = "openssl/";
|
||||||
my $debug = 0;
|
my $debug = 0;
|
||||||
|
my $unref = 0;
|
||||||
my $rebuild = 0;
|
my $rebuild = 0;
|
||||||
my $static = 1;
|
my $static = 1;
|
||||||
my $recurse = 0;
|
my $recurse = 0;
|
||||||
@ -26,6 +27,7 @@ while (@ARGV) {
|
|||||||
$hprefix = shift @ARGV;
|
$hprefix = shift @ARGV;
|
||||||
} elsif($arg eq "-debug") {
|
} elsif($arg eq "-debug") {
|
||||||
$debug = 1;
|
$debug = 1;
|
||||||
|
$unref = 1;
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
} elsif($arg eq "-rebuild") {
|
} elsif($arg eq "-rebuild") {
|
||||||
$rebuild = 1;
|
$rebuild = 1;
|
||||||
@ -42,6 +44,9 @@ while (@ARGV) {
|
|||||||
} elsif($arg eq "-staticloader") {
|
} elsif($arg eq "-staticloader") {
|
||||||
$staticloader = "static ";
|
$staticloader = "static ";
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
|
} elsif($arg eq "-unref") {
|
||||||
|
$unref = 1;
|
||||||
|
shift @ARGV;
|
||||||
} elsif($arg eq "-write") {
|
} elsif($arg eq "-write") {
|
||||||
$dowrite = 1;
|
$dowrite = 1;
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
@ -98,6 +103,8 @@ Options:
|
|||||||
-staticloader Prefix generated functions with the 'static' scope modifier.
|
-staticloader Prefix generated functions with the 'static' scope modifier.
|
||||||
Default: don't write any scope modifier prefix.
|
Default: don't write any scope modifier prefix.
|
||||||
|
|
||||||
|
-unref Print out unreferenced function and reason codes.
|
||||||
|
|
||||||
-write Actually (over)write the generated code to the header and C
|
-write Actually (over)write the generated code to the header and C
|
||||||
source files as assigned to each library through the config
|
source files as assigned to each library through the config
|
||||||
file.
|
file.
|
||||||
@ -808,7 +815,7 @@ foreach (keys %rcodes) {
|
|||||||
push (@runref, $_) unless exists $urcodes{$_};
|
push (@runref, $_) unless exists $urcodes{$_};
|
||||||
}
|
}
|
||||||
|
|
||||||
if($debug && @funref) {
|
if($unref && @funref) {
|
||||||
print STDERR "The following function codes were not referenced:\n";
|
print STDERR "The following function codes were not referenced:\n";
|
||||||
foreach(sort @funref)
|
foreach(sort @funref)
|
||||||
{
|
{
|
||||||
@ -816,7 +823,7 @@ if($debug && @funref) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($debug && @runref) {
|
if($unref && @runref) {
|
||||||
print STDERR "The following reason codes were not referenced:\n";
|
print STDERR "The following reason codes were not referenced:\n";
|
||||||
foreach(sort @runref)
|
foreach(sort @runref)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user