On Fri, Aug 21, 2015 at 06:31:22AM +0200, Luca Barbato wrote: > On 20/08/15 22:37, Henrik Gramner wrote: > >> + report("%s", "qpel"); > >> + report("%s", "epel"); > >> + report("%s", "unweighted_pred"); > >> + report("%s", "weighted_pred"); > > > > The "%s" is redundant with string literals. > > It is good practice do always do that and recent compilers do warn you > if you pass string literals directly to printf-like functions. >
printf(s) will obviously warn for security reasons, but printf("foo") won't obviously... > Incidentally printf("%s", "string") is faster than printf("string") > since the parser needs to go through 2 chars for those that are versed > to speed optimization ^^. except when printf("foo") is actually replaced by puts("foo") by your compiler (which might be harder to do with a "%s","foo" form) -- Clément B.
pgpDDhinQPjLb.pgp
Description: PGP signature
_______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel