On Dec 2, 2004, at 1:11 PM, Billy Patton wrote:

Because of the perl version wars (mine is better) here at work,
and the incompatability of versions between platform,
(incompatability meaning Linux->perl->5.8.1 SunOS->perl->5.00500
/usr/local/bin/perl)

dontcha just love that?


These are only warnings, but I prefer to not have any warnings.

don't compile with -W, then. :-/
(many of the "unused variable" warnings are fixed in more recent versions of xsubpp.)



THere are 6 of these.

I get this message:
make[2]: Entering directory `/data/cdmg/dev/cdmg_toolbox/LaffPerl'
/apps/gcc/3.4.1/bin/gcc -c -D_REENTRANT -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g3 -O2 -DVERSION=\"2.00\" -DXS_VERSION=\"2.00\" -fPIC "-I/apps/perl/5.8.2/lib/perl5/5.8.2/sun4-solaris-thread-multi/CORE" Laff.c
Laff.c: In function `XS_Laff_Write':
Laff.c:20554: warning: initialization from incompatible pointer type
XS(XS_Laff_Write)
{
dXSARGS;
if (items < 2 || items > 3)
croak("Usage: Laff::Write(db,fp,pp=1)");
{
Laff db;
FILE* fp = IoIFP(sv_2io(ST(1))); <<<<<<< 20554
int pp;
int RETVAL;

i may be completely misremembering this, but i seem to recall a difference in how the IO layer stuff was handled between major versions of perl which would result in warnings like that with different compile options. something about the PerlIO and FILE not being compatible, but the code miraculously worked anyway.



Here is the XS code :
int
LaffWrite(db,fp,pp=1)
Laff db
FILE* fp
int pp

Would the following fix this
int
LaffWrite(Laff db,FILE* fp,int pp=1)

unless i'm missing something, all you did was move the parameters around without changing them; the only way that would fix it is if there was a bug in xsubpp that you're working around.



-- "the ternary operator makes it a bit less ugly." -- kaffee



Reply via email to