From: Michael Orlitzky Date: Thu, 24 Aug 2017 12:20:59 +0000 (-0400) Subject: Fix redundant argument to sprintf warning. X-Git-Tag: 1.51.04~19 X-Git-Url: http://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=02cf771776d2f1ad9d7872f3959e41a548adfab9;hp=02cf771776d2f1ad9d7872f3959e41a548adfab9;p=amavis-logwatch.git 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 ./amavis-logwatch line 1338... 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. ---