]> git.puffer.fish Git - mirror/frr.git/commitdiff
tools/gcc-plugin: fix format precision/width type
authorDavid Lamparter <equinox@diac24.net>
Thu, 18 Feb 2021 23:04:51 +0000 (00:04 +0100)
committerDavid Lamparter <equinox@diac24.net>
Fri, 26 Mar 2021 16:51:55 +0000 (17:51 +0100)
`%*.*pEXT` applied the extension type to the precision and width (*.*)
too.  Oops.

Signed-off-by: David Lamparter <equinox@diac24.net>
tools/gcc-plugins/frr-format.c

index 6d91d2cdcd034c2d3f1e87028d17ba8a565368bf..efb2c6393c9019e9321b6add3f42af3ceb391342 100644 (file)
@@ -2343,7 +2343,7 @@ check_argument_type (const format_char_info *fci,
       /* note printf extension type checks are *additional* - %p must always
        * be pointer compatible, %d always int compatible.
        */
-      if (!kef)
+      if (first_wanted_type->kind != CF_KIND_FORMAT || !kef)
        return true;
 
       const struct kernel_ext_fmt *kef_now;