Subject: | Svgalib.xs New() cast |
Date: | Sat, 10 Sep 2011 07:48:19 +1000 |
To: | bug-Linux-Svgalib [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
With recent debian i386 perl 5.12.4 and gcc 4.6, compiling Svgalib.xs
gets an error
Svgalib.xs: In function 'av2char':
Svgalib.xs:50:4: error: lvalue required as left operand of assignment
I suppose the cast on the pointer in New() is no good. Perhaps gcc has
become stricter about the left of the assignment like that. gcc 2.95
was fine, but recent 4.3 or 4.6 not.
--- Svgalib.xs.orig 2001-04-11 18:26:59.000000000 +1000
+++ Svgalib.xs 2011-09-10 07:46:16.000000000 +1000
@@ -47,7 +47,7 @@
no_colors = av_len(av_colors);
- New(1,(void *)_colors,((int)no_colors + 1),char);
+ New(1,_colors,((int)no_colors + 1),char);
if (_colors)
{