compiler/libec: Fixed a leak and missing 'return'
authorJerome St-Louis <jerome@ecere.com>
Thu, 18 Apr 2013 20:40:10 +0000 (16:40 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 18 Apr 2013 20:40:10 +0000 (16:40 -0400)
compiler/bootstrap/libec/bootstrap/ast.c
compiler/libec/locale/ec.pot
compiler/libec/src/ast.ec

index 292a014..764bc1d 100644 (file)
@@ -2109,7 +2109,6 @@ break;
 if(!spec)
 {
 ListAdd(qualifiers, MkSpecifierName(decl->identifier->string));
-decl->identifier->string = (((void *)0));
 FreeDeclarator(decl);
 parentDecl->declarator = (((void *)0));
 }
@@ -2703,7 +2702,7 @@ struct FunctionDefinition * _MkFunction(struct __ecereNameSpace__ecere__sys__Old
 
 struct FunctionDefinition * MkFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * declarationList)
 {
-_MkFunction(specifiers, declarator, declarationList, 0x1);
+return _MkFunction(specifiers, declarator, declarationList, 0x1);
 }
 
 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
index 65474d8..3426b87 100644 (file)
@@ -48,7 +48,7 @@ msgstr "Couldn't find member %s to override\n"
 msgid "Couldn't open %s\n"
 msgstr "Couldn't open %s\n"
 
-#: ./src/ast.ec:1649
+#: ./src/ast.ec:1648
 msgid "Expecting class specifier\n"
 msgstr "Expecting class specifier\n"
 
@@ -130,7 +130,7 @@ msgstr "Recursion in defined expression %s\n"
 msgid "Redefinition of %s (defining as %s, already defined as %s)\n"
 msgstr "Redefinition of %s (defining as %s, already defined as %s)\n"
 
-#: ./src/ast.ec:794
+#: ./src/ast.ec:793
 msgid "Redefinition of %s ignored\n"
 msgstr "Redefinition of %s ignored\n"
 
index 21ce91c..27e523a 100644 (file)
@@ -635,7 +635,6 @@ public TypeName MkTypeName(OldList qualifiers, Declarator declarator)
          {
             // This is actually a type
             ListAdd(qualifiers, MkSpecifierName(decl.identifier.string));
-            decl.identifier.string = null;
             FreeDeclarator(decl);
             parentDecl.declarator = null;
          }
@@ -1109,7 +1108,7 @@ Statement MkReturnStmt(OldList exp)
 
 FunctionDefinition MkFunction(OldList specifiers, Declarator declarator, OldList declarationList)
 {
-   _MkFunction(specifiers, declarator, declarationList, true);
+   return _MkFunction(specifiers, declarator, declarationList, true);
 }
 
 FunctionDefinition _MkFunction(OldList specifiers, Declarator declarator, OldList declarationList, bool errorOnOmit)