Skip Menu |

This queue is for tickets about the DBI-Shell CPAN distribution.

Report information
The Basics
Id: 123216
Status: resolved
Priority: 0/
Queue: DBI-Shell

People
Owner: DLAMBLEY [...] cpan.org
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 11.96_01



Subject: [patch] silence warnings about sprintf redundant arguments
Given how it uses sprintf here, I don't think it matters if there are too many or too few arguments.


-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
Subject: 0004-Silence-warnings-about-reduntant-sprintf-args.patch
From 4128aa7b37950a6e3a3cff5288fa98d537205233 Mon Sep 17 00:00:00 2001 From: Kent Fredric <kentnl@gentoo.org> Date: Sun, 8 Oct 2017 13:30:36 +1300 Subject: Silence warnings about reduntant sprintf args --- lib/DBI/Format/SQLMinus.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/DBI/Format/SQLMinus.pm b/lib/DBI/Format/SQLMinus.pm index c3a9ba2..7b240c9 100755 --- a/lib/DBI/Format/SQLMinus.pm +++ b/lib/DBI/Format/SQLMinus.pm @@ -155,6 +155,7 @@ sub header { if ( exists $cf->{format} and defined $cf->{format} ) { $format_names = $cf->{format}; + no warnings 'redundant'; $width = length sprintf( $format_names, " " ); } -- 2.14.1
On Sat Oct 07 20:35:26 2017, KENTNL wrote: Show quoted text
> Given how it uses sprintf here, I don't think it matters if there are > too many > or too few arguments. > > > -- > - CPAN kentnl@cpan.org > - Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
Hi Kent, Thank you for the patch. I am not sure how to run the code that triggers the warning you're fixing. Is some configuration necessary? (Does it require Oracle?) Many thanks, Dave

Message body is not shown because it is too large.

On Thu Jul 09 01:17:53 2020, KENTNL wrote: Show quoted text
> On 2019-11-15 04:01:33, DLAMBLEY wrote:
> > On Sat Oct 07 20:35:26 2017, KENTNL wrote:
> > > Given how it uses sprintf here, I don't think it matters if there > > > are > > > too many > > > or too few arguments. > > > > > > > > > -- > > > - CPAN kentnl@cpan.org > > > - Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
> > > > Hi Kent, > > > > Thank you for the patch. I am not sure how to run the code that > > triggers the warning you're fixing. Is some configuration necessary? > > (Does it require Oracle?)
> > Nothing special is required, just run the tests on a new enough perl > and see > them spam with lots of warnings: > > > make -j3 --load-average=4 test TEST_VERBOSE=0 > PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "- > MTest::Harness" > "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', > 'blib/arch')" > t/*.t > t/batch.t ..... ok > ===( 2;0 1/9 0/13 0/? > )=======================================DBI::Shell 11.96 > using DBI 1.643 in batch mode > Connecting to 'dbi:ExampleP:' as ''... > Disconnecting from dbi:ExampleP:. > DBI::Shell 11.96 using DBI 1.643 in batch mode > Connecting to 'dbi:ExampleP:' as ''... > Disconnecting from dbi:ExampleP:. > Connecting to 'dbi:ExampleP:' as ''... > Disconnecting from dbi:ExampleP:. > t/core.t ...... ok > t/func.t ...... skipped: Function tests not completed > ===( 11;0 1/13 0/? > )============================================DBI::Shell > 11.96 using DBI 1.643 in batch mode > commandline history written to > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/homedir/.dbish_history > Connecting to 'dbi:ExampleP:' as ''... > Current statement buffer: > select > nlink,ino,blocks,ctime,rdev > from t > > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > Elapsed: 0 wallclock secs ( 0.00 usr + 0.01 sys = 0.01 CPU) @ 100.00/s > (n=1) > Disconnecting from dbi:ExampleP:. > t/csv.t ....... ok > ===( 24;0 1/51 0/? 0/? > )=======================================DBI::Shell 11.96 > using DBI 1.643 in batch mode > Connecting to 'dbi:ExampleP:' as ''... > Available drivers: > DBM > ExampleP > File > Gofer > MariaDB > Mem > Pg > Proxy > SQLite > Sponge > mysql > batch: 1 > chistory_size: 50 > command_prefix: [/;] > command_prefix_end: ; > command_prefix_line: / > debug: 0 > desc_format: partbox > desc_show_columns: > COLUMN_NAME,DATA_TYPE,TYPE_NAME,COLUMN_SIZE,PK,NULLABLE,COLUMN_DEF,IS_NULLABLE,REMARKS > desc_show_long: 1 > desc_show_remarks: 1 > editor: /usr/bin/vim > format: neat > home_dir: /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/homedir > init_autocommit: 1 > init_trace: 0 > prompt: dbi:ExampleP: > rhistory_head: 5 > rhistory_size: 50 > rhistory_tail: 5 > seperator: , > sqlpath: . > tmp_dir: undef > tmp_file: dbish66.sql > user_level: 1 > Current statement buffer: > select * from t > > Current statement buffer: > > Disconnecting from dbi:ExampleP:. > Connecting to 'dbi:ExampleP:' as ''... > Current statement buffer: > select * from t > > Disconnecting from dbi:ExampleP:. > t/shell.t ..... ok > ===( 75;0 1/14 0/109 0/? > )===================================DBI::Shell 11.96 > using DBI 1.643 in batch mode > commandline history written to > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/homedir/.dbish_history > Connecting to 'dbi:ExampleP:' as ''... > Current statement buffer: > select > nlink,ino,blocks,ctime,rdev > from t > > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > ===( 84;0 9/14 1/109 0/? )===================================Elapsed: > 0 > wallclock secs ( 0.00 usr + 0.01 sys = 0.01 CPU) @ 100.00/s (n=1) > Disconnecting from dbi:ExampleP:. > t/spool.t ..... ok > ===( 90;0 2/109 0/? > )==========================================DBI::Shell 11.96 > using DBI 1.643 in batch mode > commandline history written to > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/homedir/.dbish_history > Connecting to 'dbi:ExampleP:' as ''... > fred: no column format defined. > nlink: no column format defined. > format cleared > blocks > ctime > ino > nlink > Current statement buffer: > select > nlink,ino,blocks,ctime,rdev > from t > > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > blocks > ctime > ino > nlink > Current statement buffer: > select > nlink,ino,blocks,ctime,rdev > from t > > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > ===( 109;1 21/109 0/77 > )========================================Elapsed: 0 > wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > Current statement buffer: > select > nlink,ino,blocks,ctime,rdev > from t > > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.01 sys = 0.01 CPU) @ 100.00/s > (n=1) > format cleared > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > ===( 118;1 29/109 1/77 > )========================================DBI::Shell > 11.96 using DBI 1.643 in batch mode > commandline history written to > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/homedir/.dbish_history > Connecting to 'dbi:ExampleP:' as ''... > Current statement buffer: > select name from t where name = 'timing.t' > > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > format cleared > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > command: heading > command: underline > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > command: underline > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > command: underline > command: heading > ctime > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > /option timing_timing=1 > /option timing_style=auto > Elapsed: 0 0 0 0 0 1 bad > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > command: underline > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > column ctime format: > format cleared > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > command: underline > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > command: underline > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > command: underline > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > invalid justification o > invalid justification on > invalid justification yuck > invalid justification irhgt > ctime > format cleared > command: underline > command: heading > Elapsed: 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = > 0.00 CPU) > /option timing_format=5.2f > command: heading > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = > 0.00 CPU) > Elapsed: 0 wallclock secs (0.00000 usr 0.00000 sys + 0.00000 cusr > 0.00000 csys > = 0.00000 CPU) > Elapsed: 0 wallclock secs ( 0.00 usr + 0.01 sys = 0.01 CPU) @ 100.00/s > (n=1) > ctime > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > ctime > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0 usr 0 sys + 0 cusr 0 csys = 0 CPU) > Elapsed: 0 wallclock secs (0 usr 0 sys + 0 cusr 0 csys = 0 CPU) > /option timing_prefix=Elapsed: > /option timing_prefix='undef' > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > ctime > Redundant argument in sprintf at > /var/tmp/portage/dev-perl/DBI-Shell-11.960.0/work/DBI-Shell- > 11.96/blib/lib/DBI/Format/SQLMinus.pm > line 154. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > ctime > ctime > format cleared > command: null > command: null > Disconnecting from dbi:ExampleP:. > t/timing.t .... ok > t/sqlminus.t .. 97/109 command: null > command: null > command: null > command: pagesize > command: pagesize > command: pagesize > command: limit > command: limit > command: limit > command: limit > DBD::ExampleP::db prepare failed: Unknown field names: yuck_error. > Elapsed: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > Disconnecting from dbi:ExampleP:. > t/sqlminus.t .. ok > All tests successful.
I see what you mean, thank you! I have merged your patch. I've put out a development release, I'll make a proper release after cpantesters has had a go.