[vala/staging: 2/2] codegen: Apply CCodeModifiers.PRINTF to "string_printf" (POSIX)




commit 211e277675373319fbc540189bfc14abf4ae8baf
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Nov 15 16:58:15 2020 +0100

    codegen: Apply CCodeModifiers.PRINTF to "string_printf" (POSIX)
    
    Found by clang with "posix/string-printf" test

 codegen/valaccodemethodcallmodule.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala
index 2d10ad046..bf99ee011 100644
--- a/codegen/valaccodemethodcallmodule.vala
+++ b/codegen/valaccodemethodcallmodule.vala
@@ -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 ());


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]