Skip Menu |

This queue is for tickets about the Font-TTF CPAN distribution.

Report information
The Basics
Id: 80672
Status: resolved
Priority: 0/
Queue: Font-TTF

People
Owner: Nobody in particular
Requestors: Xavier (no email address)
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 1.02
Fixed in: 1.03



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);
On Tue Nov 06 15:22:24 2012, GUIMARD wrote: Show quoted text
> Hi, > in Debian we're using this patch to avoid warnings. Could-you include it > in a next release ? > Thanks, > Xavier
It appears to me that the proposed patch generates incorrect cmap tables. I understand the desire to avoid the use of uninitialized values in pack, but you can't just skip over the undefs... you've got to put in zeros for them (in format 2 and 6 cmap tables).
On Sat Jan 04 11:54:39 2014, BHALLISSY wrote: Show quoted text
> On Tue Nov 06 15:22:24 2012, GUIMARD wrote:
> > Hi, > > in Debian we're using this patch to avoid warnings. Could-you include > > it > > in a next release ? > > Thanks, > > Xavier
> > It appears to me that the proposed patch generates incorrect cmap > tables. > > I understand the desire to avoid the use of uninitialized values in > pack, but you can't just skip over the undefs... you've got to put in > zeros for them (in format 2 and 6 cmap tables).