[PATCH 1/2] winapi_test: Fix 'if (!defined $type_size)' use in _refresh().
Serge Gautherie
winehq-git_serge_180711 at gautherie.fr
Sun Apr 12 13:43:20 CDT 2020
Signed-off-by: Serge Gautherie <winehq-git_serge_180711 at gautherie.fr>
---
'Use of uninitialized value $type_size in multiplication (*) at tools/winapi/c_type.pm line 244.'
---
tools/winapi/c_type.pm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/winapi/c_type.pm b/tools/winapi/c_type.pm
index b00cf81..c6aeb6a 100644
--- a/tools/winapi/c_type.pm
+++ b/tools/winapi/c_type.pm
@@ -239,8 +239,14 @@ sub _refresh($)
}
else
{
- print STDERR "$type_name -> type_size=undef, count=$count\n" if (!defined $type_size);
- $type_size *= int($count);
+ if (!defined $type_size)
+ {
+ print STDERR "$type_name -> type_size=undef, count=$count\n";
+ }
+ else
+ {
+ $type_size *= int($count);
+ }
}
}
if ($bitfield_size != 0)
--
2.10.0.windows.1
More information about the wine-devel
mailing list