The warnings are an artefact of ExtUtils::xsubpp; I am looking for a way to get rid of them.Magick.c: In function 'XS_Image__Magick_Animate':
Magick.c:2483:16: warning: unused variable 'ref'
Magick.c:2477:5: warning: unused variable 'ix'
The sample code of perlxstut does not produce any warnings; inserting an unused variable into the implementation or a bogus parameter into the definition does produce a warning in function XS_Mytest_hello.
The minimal example of such a warning is:
Code: Select all
void
hello(x)
ALIAS:
do_hello = 1
CODE:
printf("Hello, world!\n");
and the cure for that is to use PERL_UNUSED_VAR(ix), and to drop the declaration of ref.Mytest.c: In function ‘XS_Mytest_hello’:
Mytest.c:79:5: warning: unused variable ‘ix’