symbols.pl: enable warnings, fix them

This commit is contained in:
Viktor Szakats 2025-07-11 15:16:36 +02:00
parent 35eaab5ced
commit f5bd582e79
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -44,12 +44,15 @@
# #endif
#
#
use strict;
use warnings;
open F, "<symbols-in-versions";
sub str2num {
my ($str)=@_;
if($str =~ /([0-9]*)\.([0-9]*)\.*([0-9]*)/) {
return sprintf("0x%06x", $1<<16 | $2 << 8 | $3);
if($str && $str =~ /([0-9]*)\.([0-9]*)\.*([0-9]*)/) {
return sprintf("0x%06x", $1 <<16 | $2 << 8 | ($3 || '0'));
}
}