Hi,

attached is patch to fix a perl 5.22 (?) warning about parameters to
sprintf in the amavis script.

The full bug report can be found at

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819572

WM


-------- Weitergeleitete Nachricht --------
Betreff: Bug#819572: logwatch: redundant argument in sprintf at
.../amavis line 1338, <> line 321 message
Weitersenden-Datum: Wed, 30 Mar 2016 16:27:01 +0000
Weitersenden-Von: Nayr <debian-b...@nayr.us>
Weitersenden-An: debian-bugs-dist@lists.debian.org
Weitersenden-CC: Willi Mann <wi...@debian.org>
Datum: Wed, 30 Mar 2016 11:34:48 -0400
Von: Nayr <debian-b...@nayr.us>
Antwort an: Nayr <debian-b...@nayr.us>, 819...@bugs.debian.org
An: Debian Bug Tracking System <sub...@bugs.debian.org>

Package: logwatch
Version: 7.4.2-1
Severity: normal

Dear Maintainer,

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored:
LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages logwatch depends on:
ii  nullmailer [mail-transport-agent]  1:1.13-1+b1
ii  perl                               5.22.1-9

Versions of packages logwatch recommends:
ii  libdate-manip-perl   6.52-1
ii  libsys-cpu-perl      0.61-1+b2
ii  libsys-meminfo-perl  0.98-1+b1

Versions of packages logwatch suggests:
ii  fortune-mod  1:1.99.1-7

-- no debconf information

--- /usr/share/logwatch/scripts/services/amavis	2016-03-30 23:32:34.000000000 +0200
+++ amavis	2016-07-27 20:53:23.913506745 +0200
@@ -1334,8 +1334,11 @@
                      $$divisor == $Totals{$keyname} ? 100.00 : $Totals{$keyname} * 100 / $$divisor;
             }
             else {
-               push @{$lines[$cur_level]}, 
-                  sprintf "$fmt  %-23s $extra\n", $total, $desc, commify ($Totals{$keyname});
+	       my $out = sprintf "$fmt  %-23s", $total, $desc;
+	       if ($extra) {
+	          $out .= sprintf " $extra", commify ($Totals{$keyname});
+	       }
+               push @{$lines[$cur_level]}, $out;
             }
          }
       }

Reply via email to