On Thu Feb 23 14:16:23 2012, zefram@fysh.org wrote:
Show quoted text> Attached patch fixes a couple of compiler warnings from TryCatch.xs.
>
> -zefram
I suspect this patch has not yet been applied, as I got warnings during 'make' like this:
#####
[TryCatch-1.003002] 12 $ perl Makefile.PL
*** Module::AutoInstall version 1.06
*** Checking for Perl dependencies...
[Core Features]
- Test::More ...loaded. (1.001003 >= 0.88)
- Test::Exception ...loaded. (0.32)
- B::Hooks::OP::Check ...loaded. (0.19 >= 0.18)
- B::Hooks::OP::PPAddr ...loaded. (0.03 >= 0.03)
- Parse::Method::Signatures ...loaded. (1.003016 >= 1.003012)
- B::Hooks::EndOfScope ...loaded. (0.13 >= 0.12)
- Devel::Declare ...loaded. (0.006016 >= 0.005007)
- Moose ...loaded. (2.1207)
- MooseX::Types ...loaded. (0.44)
- Scope::Upper ...loaded. (0.24 >= 0.06)
- Variable::Magic ...loaded. (0.53 >= 0.28)
- Sub::Exporter ...loaded. (0.987 >= 0.979)
- XSLoader ...loaded. (0.17)
- namespace::clean ...loaded. (0.25 >= 0.20)
*** Module::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for TryCatch
Writing MYMETA.yml and MYMETA.json
[TryCatch-1.003002] 13 $ make
cp lib/TryCatch.pm blib/lib/TryCatch.pm
Running Mkbootstrap for TryCatch ()
chmod 644 "TryCatch.bs"
"/home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/bin/perl" "-Iinc" "/home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/ExtUtils/xsubpp" -typemap "/home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/ExtUtils/typemap" TryCatch.xs > TryCatch.xsc && mv TryCatch.xsc TryCatch.c
cc -c -I/home/jkeenan/Downloads/TryCatch-1.003002/inc/EUDeps/B/Hooks/OP/Check/Install -I/home/jkeenan/Downloads/TryCatch-1.003002/inc/EUDeps/B/Hooks/OP/PPAddr/Install -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.003002\" -DXS_VERSION=\"1.003002\" -fPIC "-I/home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_64-linux/CORE" TryCatch.c
TryCatch.xs: In function ‘try_return’:
TryCatch.xs:72:7: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘IV’ [-Wformat=]
printf("have a $CTX of %d\n", SvIV(ctx));
^
In file included from /home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_64-linux/CORE/perl.h:5089:0,
from TryCatch.xs:2:
TryCatch.c: In function ‘XS_TryCatch__XS_uninstall_op_checks’:
/home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_64-linux/CORE/embed.h:58:35: warning: ignoring return value of ‘Perl_av_shift’, declared with attribute warn_unused_result [-Wunused-result]
#define av_shift(a) Perl_av_shift(aTHX_ a)
^
TryCatch.xs:263:5: note: in expansion of macro ‘av_shift’
av_shift(av);
^
rm -f blib/arch/auto/TryCatch/TryCatch.so
cc -shared -O2 -L/usr/local/lib -fstack-protector TryCatch.o -o blib/arch/auto/TryCatch/TryCatch.so \
\
chmod 755 blib/arch/auto/TryCatch/TryCatch.so
"/home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- TryCatch.bs blib/arch/auto/TryCatch/TryCatch.bs 644
Manifying 1 pod document
#####
The warnings didn't appear to prevent the build from succeeding nor the tests from passing.
#####
[TryCatch-1.003002] 14 $ make test
Running Mkbootstrap for TryCatch ()
chmod 644 "TryCatch.bs"
PERL_DL_NONLAZY=1 "/home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/catch_01.t t/context.t t/destroy.t t/handwritten.t t/invalid.t t/method.t t/mx_types_structured.t t/nested.t t/simple.t t/types.t t/xml_sax_expat.t
t/catch_01.t ............. ok
t/context.t .............. ok
t/destroy.t .............. ok
t/handwritten.t .......... ok
t/invalid.t .............. ok
t/method.t ............... ok
t/mx_types_structured.t .. ok
t/nested.t ............... ok
t/simple.t ............... ok
t/types.t ................ ok
t/xml_sax_expat.t ........ ok
All tests successful.
Files=11, Tests=63, 4 wallclock secs ( 0.05 usr 0.00 sys + 3.22 cusr 0.15 csys = 3.42 CPU)
Result: PASS
#####