summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2015-12-09 16:01:24 +0800
committerTing-Wei Lan <lantw44@gmail.com>2015-12-09 16:01:24 +0800
commit90645217ca3335821f5067d5c18a4f5db010a596 (patch)
treeb44dc32b0bacaa86a3f588017d0e860c4ecab8b4
parentce67c908a1d0819d2b3898d5c30c0b1b325bc0d3 (diff)
downloadcompiler2015-90645217ca3335821f5067d5c18a4f5db010a596.tar
compiler2015-90645217ca3335821f5067d5c18a4f5db010a596.tar.gz
compiler2015-90645217ca3335821f5067d5c18a4f5db010a596.tar.bz2
compiler2015-90645217ca3335821f5067d5c18a4f5db010a596.tar.lz
compiler2015-90645217ca3335821f5067d5c18a4f5db010a596.tar.xz
compiler2015-90645217ca3335821f5067d5c18a4f5db010a596.tar.zst
compiler2015-90645217ca3335821f5067d5c18a4f5db010a596.zip
Show (void) for functions without arguments
-rw-r--r--src/draw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/draw.c b/src/draw.c
index a5a7f4e..8c563f3 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -217,6 +217,8 @@ static void print_symbol_type(FILE *fp, CcmmcSymbolType type)
if (ccmmc_symbol_type_is_function(type)) {
fputs(" (*)(", fp);
+ if (type.param_count == 0)
+ fputs("void)", fp);
for (size_t i = 0; i < type.param_count; i++) {
print_symbol_type(fp, type.param_list[i]);
if (i == type.param_count - 1)