From: Martin Mares Date: Sat, 5 Feb 2011 19:37:04 +0000 (+0100) Subject: Avoid warnings about uninitialized variables X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=513ee43ecd01acc4f065b6dfbebb6738e45f406f;p=pciids.git Avoid warnings about uninitialized variables --- diff --git a/PciIds/Html/Format.pm b/PciIds/Html/Format.pm index 41d121a..daf5007 100644 --- a/PciIds/Html/Format.pm +++ b/PciIds/Html/Format.pm @@ -43,7 +43,9 @@ sub htmlFormatTable( $$$$$$ ) { } else { $func = \&encode; } - my $data = &{$func}( $line->[ $i ] ); + my $item = $line->[ $i ]; + $item = "" unless( defined( $item ) ); + my $data = &{$func}( $item ); $data = "" unless( defined( $data ) ); print $header.$data; }