in reply to Customizing diagnostics?

Your snippet alone is not enough to give the warning.

printf ("%-10s : %d\n", $foo, $bar[$i]) && ...;
does, because it ambiguous whether you want
(printf ("%-10s : %d\n", $foo, $bar[$i])) && ...;

or

printf (("%-10s : %d\n", $foo, $bar[$i]) && ...);

Using any of the following will remove the warning:

printf("%-10s : %d\n", $foo, $bar[$i]) && ...; (printf "%-10s : %d\n", $foo, $bar[$i]) && ...; (printf ("%-10s : %d\n", $foo, $bar[$i])) && ...;

By the way, diagnostics has nothing to do your problem. diagnostics explains warnings which occur whether diagnostics is loaded or not. To disable warnings, have a look at warnings. It's even possible to selectively disable warnings.