]> gitweb.michael.orlitzky.com - postfix-logwatch.git/log
postfix-logwatch.git
6 years agoFix redundant argument to sprintf warning.
Michael Orlitzky [Thu, 24 Aug 2017 11:34:36 +0000 (07:34 -0400)]
Fix redundant argument to sprintf warning.

Perl 5.22 now warns about redundant (i.e. extra) arguments to the
sprintf function. If your format string only has two place-holders but
you pass three place-fillers, you get warned:

  Redundant argument in sprintf at ./postfix-logwatch line 1382...

The issue there was that the format string passed to sprintf was
constructed dynamically; sometimes it would contain two place-holders,
and sometimes three. Three place-fillers were always passed, so when
only two place-holders were used, the warning would be thrown. This was
fixed by testing whether or not there are two or three place-holders,
and passing the appropriate number of place-fillers.

6 years agoFix unescaped left brace warning for "Config: {".
Michael Orlitzky [Thu, 24 Aug 2017 11:09:28 +0000 (07:09 -0400)]
Fix unescaped left brace warning for "Config: {".

New versions of Perl are starting to complain about unescaped braces
in regular expressions, and supposedly the warning will become a fatal
error in Perl 5.30. This particular warning is,

  Unescaped left brace in regex is deprecated, passed through in regex;
  marked by <-- HERE in m/^Config: { <-- HERE / at ./postfix-logwatch
  line 1850.

and it was fixed by going to line 1850 and putting a backslash before
the left brace.

Bug: https://sourceforge.net/p/logreporters/bugs/4/

6 years agoUpstream source.
Michael Orlitzky [Thu, 24 Aug 2017 11:01:21 +0000 (07:01 -0400)]
Upstream source.