aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-03-31 17:49:38 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-03-31 17:49:41 +0200
commit7b20950aaf31f1247789e96e4db0f362bd4d5d7d (patch)
tree94fd0b57cc83dea3ee9fa29959b9c6a3fd663e52 /src/bin/eolian
parentrelease: Update NEWS and bump version for 1.19.0-beta4 release (diff)
downloadefl-7b20950aaf31f1247789e96e4db0f362bd4d5d7d.tar.gz
eolian: fix incorrect function prototypes in legacy headers
C functions that take no arguments need to have void in the arg list. Otherwise, it would mean taking any number of arguments.
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/headers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index 853b8672e8..2b88f6cd63 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -158,6 +158,10 @@ _gen_func(const Eolian_Function *fid, Eolian_Function_Type ftype,
if (flagbuf)
eina_strbuf_append_char(flagbuf, ')');
+ /* zero-arg funcs in C need void for arguments */
+ if (eina_strbuf_string_get(buf)[eina_strbuf_length_get(buf) - 1] == '(')
+ eina_strbuf_append(buf, "void");
+
eina_strbuf_append(buf, ")");
if (eolian_function_return_is_warn_unused(fid, ftype))
{