panfrost: decode: Flag pandecode_log_typed() as PRINTFLIKE
authorBoris Brezillon <boris.brezillon@collabora.com>
Tue, 29 Sep 2020 08:25:56 +0000 (10:25 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 2 Oct 2020 16:29:26 +0000 (16:29 +0000)
This way we can catch mismatch between the format string and the
arguments.

Suggested-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6886>

src/panfrost/lib/decode.c

index ef0d151..51e0a3f 100644 (file)
@@ -115,7 +115,7 @@ pandecode_make_indent(void)
                 fprintf(pandecode_dump_stream, "  ");
 }
 
-static void
+static void PRINTFLIKE(2, 3)
 pandecode_log_typed(enum pandecode_log_type type, const char *format, ...)
 {
         va_list ap;