Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.99k stars 557 forks source link

[PATCH] Fix ext/XS-APItest/t/multicall.t warning #10751

Closed p5pRT closed 14 years ago

p5pRT commented 14 years ago

Migrated from rt.perl.org#78504 (status was 'resolved')

Searchable as RT78504$

p5pRT commented 14 years ago

From @jdhedden

Created by @jdhedden

'make test' produces the following warning​:

ext/XS-APItest/t/multicall.....................................Useless use of private variable in void context at t/multicall.t line 37. ok

The attached patch fixes this by adding a "no warnings 'void';" statement to the test file.

Perl Info ``` Flags: category=core severity=low Site configuration information for perl 5.13.6: Configured by Jerry at Thu Oct 21 08:55:28 EDT 2010. Summary of my perl5 (revision 5 version 13 subversion 6 patch 43246) configuration: Snapshot of: 5bc1001b08a9ab20cf55683d2a0b5f53d4ad2c2b Platform: osname=cygwin, osvers=1.5.25(0.15642), archname=cygwin-thread-multi-64int uname='cygwin_nt-5.1 pn100-02-2-364p 1.5.25(0.15642) 2008-06-12 19:34 i686 cygwin ' config_args='-de -Dusedevel -Dversiononly=no -Dinstallusrbinperl -Uusemallocwrap -Duse64bitint -Dusethreads -Dinc_version_list=none -Dnoextensions=IPC/SysV Sys/Syslog Devel/DProf Devel/Peek re GDBM_File NDBM_File ODBM_File Text/Soundex Math/BigInt/FastCalc Time/Piece -A append:ccflags= -DNO_MATHOMS -A define:optimize=-Os -pipe -funit-at-a-time -march=pentium4 -mfpmath=sse -mieee-fp -mmmx -msse -msse2' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=y, bincompat5005=undef Compiler: cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -DNO_MATHOMS -fno-strict-aliasing -pipe', optimize='-Os -pipe -funit-at-a-time -march=pentium4 -mfpmath=sse -mieee-fp -mmmx -msse -msse2', cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -DNO_MATHOMS -fno-strict-aliasing -pipe' ccversion='', gccversion='3.4.4 (cygming special, gdc 0.12, using dmd 0.125)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -s -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /lib libs=-lgdbm -ldl -lcrypt -lgdbm_compat perllibs=-ldl -lcrypt libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=cygperl5_13_6.dll gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s' cccdlflags=' ', lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -s -L/usr/local/lib' Locally applied patches: @INC for perl 5.13.6: /usr/lib/perl5/site_perl/5.13.6/cygwin /usr/lib/perl5/site_perl/5.13.6 /usr/lib/perl5/5.13.6/cygwin /usr/lib/perl5/5.13.6 . Environment for perl 5.13.6: CYGWIN=ntsec HOME=/home/jhedden LANG=C LANGUAGE=C LC_ALL=C LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/jhedden/bin:/usr/local/src/perl/bin:/link/work/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/c/Program Files/WiX:/c/djgpp/bin:/c/bb/tools/apache-ant-1.6.5/bin:/c/Program Files/nant-0.85/bin:/c/bb/tools/jse5/bin:/c/dev-cpp/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/system32/WBEM:/c/blp/API/dde:/c/blp/API:/c/oracle/ora92/bin:/c/Program Files/Oracle/jre/1.3.1/bin:/c/Program Files/Oracle/jre/1.1.8/bin:/c/Program Files/Hummingbird/Connectivity/7.10/Accessories:/usr/bin:/c/Program Files/Windows Imaging/:/c/Program Files/Citrix/ICAService/:/c/Program Files/Citrix/System32/:. PERLIO=perlio PERL_BADLANG (unset) SHELL (unset) ```
p5pRT commented 14 years ago

From @jdhedden

no_void.patch ```diff --- perl-current/ext/XS-APItest/t/multicall.t +++ perl-current/ext/XS-APItest/t/multicall.t @@ -34,6 +34,7 @@ my $closure_var; { my $f = sub { + no warnings 'void'; $closure_var; my $sub = shift; if (defined $sub) { ```
p5pRT commented 14 years ago

From @cpansprout

On Thu Oct 21 10​:04​:17 2010\, jdhedden@​cpan.org wrote​:

This is a bug report for perl from jdhedden@​cpan.org\, generated with the help of perlbug 1.39 running under perl 5.13.6.

----------------------------------------------------------------- [Please describe your issue here]

'make test' produces the following warning​:

ext/XS-APItest/t/multicall.....................................Useless use of private variable in void context at t/multicall.t line 37. ok

The attached patch fixes this by adding a "no warnings 'void';" statement to the test file.

Thank you. Applied as 76a2b88f6f42d780c1d7625b9d510847a6aff624.

p5pRT commented 14 years ago

The RT System itself - Status changed from 'new' to 'open'

p5pRT commented 14 years ago

@cpansprout - Status changed from 'open' to 'resolved'