[hackers] [scc] [cc2-qbe] Fix void functions || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 20 Jan 2017 19:09:43 +0100 (CET)

commit fde6f21d71a9c3786fa5f89275cbc017b87b0aa9
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Jan 20 19:04:51 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Jan 20 19:04:51 2017 +0100

    [cc2-qbe] Fix void functions
    
    In void functions we only have to convert them to int functions.
    The allocated value was useless and it generated a memory leak.

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c
index da574ff..f493ca0 100644
--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
_AT_@ -241,7 +241,6 @@ call(Node *np, Node *fun, Node *ret)
         tp = &np->type;
         switch (tp->size) {
         case 0:
- np->left = tmpnode(NULL, tp);
                 op = ASCALLW;
                 break;
         case 1:
Received on Fri Jan 20 2017 - 19:09:43 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 20 2017 - 19:12:21 CET