From 5a06432d675ba9d9d1b08ad5568317b5222d8fd9 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sun, 4 Nov 2018 20:22:22 +0100 Subject: [PATCH] codegen: Add prototype for *_register_type() function Found with -Werror=missing-prototypes --- codegen/valatyperegisterfunction.vala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/codegen/valatyperegisterfunction.vala b/codegen/valatyperegisterfunction.vala index c0ceecd9d..c4c860624 100644 --- a/codegen/valatyperegisterfunction.vala +++ b/codegen/valatyperegisterfunction.vala @@ -85,6 +85,10 @@ public abstract class Vala.TypeRegisterFunction { fun = new CCodeFunction ("%s_register_type".printf (get_ccode_lower_case_name (type_symbol)), "GType"); fun.add_parameter (new CCodeParameter ("module", "GTypeModule *")); + fun.is_declaration = true; + declaration_fragment.append (fun.copy ()); + fun.is_declaration = false; + var get_fun = new CCodeFunction ("%s_get_type".printf (get_ccode_lower_case_name (type_symbol)), "GType"); get_fun.modifiers = CCodeModifiers.CONST; -- 2.47.2