]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Apply CCodeModifiers.PRINTF to "string_printf" (POSIX)
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 15 Nov 2020 15:58:15 +0000 (16:58 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 15 Nov 2020 16:08:42 +0000 (17:08 +0100)
Found by clang with "posix/string-printf" test

codegen/valaccodemethodcallmodule.vala

index 2d10ad046a845714975dded7cb734b18eafc876c..bf99ee0116ed5e0a11c81930efe5952bdb8dd943 100644 (file)
@@ -1003,7 +1003,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                var function = new CCodeFunction ("string_printf", "char*");
                function.add_parameter (new CCodeParameter ("format", "const char*"));
                function.add_parameter (new CCodeParameter.with_ellipsis ());
-               function.modifiers = CCodeModifiers.STATIC;
+               function.modifiers = CCodeModifiers.STATIC | CCodeModifiers.PRINTF;
 
                // definition
                push_context (new EmitContext ());