Skip to content

Commit a499cb0

Browse files
committed
Revert "param parsing: cleaned generated file includes, flagged things as unused"
This reverts commit 420fd33.
1 parent b0a22f1 commit a499cb0

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

‎util/perl/OpenSSL/paramnames.pm‎

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ our @EXPORT_OK = qw(generate_public_macros
1717
produce_param_decoder
1818
produce_param_decoder_with_count);
1919

20-
our $headers_included = 0;
2120
my $case_sensitive = 1;
2221
my $need_break = 0;
2322
my $invalid_param = "invalid param";
@@ -865,21 +864,16 @@ sub output_param_decoder {
865864
my %concat_num = ();
866865
my %ifdefs = ();
867866

868-
if (!$headers_included) {
869-
$headers_included = 1;
870-
print "/* Machine generated by util/perl/OpenSSL/paramnames.pm */\n";
871-
# IWYU
872-
print "#include <string.h>\n";
873-
print "#include <openssl/params.h>\n";
874-
print "#include <openssl/e_os2.h>\n";
875-
print "#include \"internal/common.h\"\n";
876-
print "#include \"prov/proverr.h\"\n";
877-
print "\n";
878-
}
879-
print "/* Machine generated */\n";
867+
print "/* Machine generated by util/perl/OpenSSL/paramnames.pm */\n";
868+
# IWYU
869+
print "#include <string.h>\n";
870+
print "#include <openssl/params.h>\n";
871+
print "#include \"internal/common.h\"\n";
872+
print "#include \"prov/proverr.h\"\n";
873+
print "\n";
880874
# Output gettable param array
881875
printf "#ifndef %s_list\n", $decoder_name_base;
882-
printf "static ossl_unused const OSSL_PARAM %s_list[] = {\n", $decoder_name_base;
876+
printf "static const OSSL_PARAM %s_list[] = {\n", $decoder_name_base;
883877
for (my $i = 0; $i <= $#params; $i++) {
884878
my $pname = $params[$i][0];
885879
my $pident = $params[$i][1];
@@ -950,7 +944,7 @@ sub output_param_decoder {
950944
locate_long_endings(\%t);
951945

952946
printf "#ifndef %s_decoder\n", $decoder_name_base;
953-
printf "static ossl_unused int %s_decoder\n", $decoder_name_base;
947+
printf "static int %s_decoder\n", $decoder_name_base;
954948
printf " (const OSSL_PARAM *p, struct %s_st *r", $decoder_name_base;
955949
printf "%s)\n", ($with_count ? ", int *count" : "");
956950
print "{\n";

0 commit comments

Comments
 (0)