+++ This bug was initially created as a clone of Bug #953520 +++ Adding static void check_asprintf( char **strp, const char *fmt, ... ) __attribute__((format(printf, 2, 3))); reveals the following misuse of check_asprintf: scl.c: In function ‘list_packages_in_collection’: scl.c:207:2: warning: too many arguments for format [-Wformat-extra-args] check_asprintf(&cmd, "rpm -qa --qf=\"#%%{name}-%%{version}-%%{release}.%%{arch}\n%%{sourcerpm}\n[%%{provides}\n]\"", colname); ^ --- Additional comment from Jindrich Novy on 2013-04-23 15:37:08 CEST --- Hi Florian, sorry, I don't get it. Why would you add __attribute__((format(printf, 2, 3)) to the check_asprintf() line to trigger this? --- Additional comment from Florian Weimer on 2013-04-23 15:48:29 CEST --- The attribute allows GCC to perform additional type checking. The warning is quite correct because the format string does not contain "%s", so the colname is either superfluous, or something is missing from the format string.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1303.html