Subject: | Avoid some warnings |
Hi,
in Debian we're using this patch to avoid warnings. Could-you include it
in a next release ?
Thanks,
Xavier
Subject: | warnings-uninitialized.patch |
Description: fix warnings about initialized values
Origin: vendor
Bug-Debian: http://bugs.debian.org/658653
Forwarded: unknown
Author: Jeffrey Ratcliffe <Jeffrey.Ratcliffe@gmail.com>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2012-11-06
--- a/lib/Font/TTF/Cmap.pm
+++ b/lib/Font/TTF/Cmap.pm
@@ -327,11 +327,15 @@
if ($s->{'Format'} == 0)
{
- $fh->print(pack("C256", @{$s->{'val'}}{0 .. 255}));
+ for (0 .. 255) {
+ $fh->print(pack("C1", $s->{'val'}{$_})) if (defined $s->{'val'}{$_});
+ }
} elsif ($s->{'Format'} == 6)
{
- $fh->print(pack("n2", $keys[0], $keys[-1] - $keys[0] + 1));
- $fh->print(pack("n*", @{$s->{'val'}}{$keys[0] .. $keys[-1]}));
+ $fh->print(pack("n2", $keys[0], scalar(@keys)));
+ for (@keys) {
+ $fh->print(pack("n1", $s->{'val'}{$_}));
+ }
} elsif ($s->{'Format'} == 2) # Contributed by Huw Rogers
{
my ($g, $k, $h, $l, $m, $n);