compiler/libec: Fixed warning on: for(i : LinkList { });
authorJerome St-Louis <jerome@ecere.com>
Thu, 3 Jul 2014 22:10:16 +0000 (18:10 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 3 Jul 2014 22:10:16 +0000 (18:10 -0400)
compiler/bootstrap/ecere/bootstrap/LinkList.c
compiler/bootstrap/ecere/bootstrap/List.c
compiler/bootstrap/libec/bootstrap/pass2.c
compiler/libec/src/pass2.ec

index d824ea5..d3592ec 100644 (file)
@@ -451,7 +451,7 @@ if(item)
 (*(struct __ecereNameSpace__ecere__com__LinkElement *)(((unsigned char *)((void *)((uintptr_t)(item)))) + ((struct __ecereNameSpace__ecere__com__Instance *)(char *)this)->_class->templateArgs[5].__anon1.__anon2.__anon1.member->offset + ((struct __ecereNameSpace__ecere__com__Instance *)(char *)this)->_class->templateArgs[5].__anon1.__anon2.__anon1.member->_class->offset)).prev = ((void * )((uintptr_t)(__ecerePointer___ecereNameSpace__ecere__com__LinkList->last)));
 if((*(struct __ecereNameSpace__ecere__com__LinkElement *)(((unsigned char *)((void *)((uintptr_t)(item)))) + ((struct __ecereNameSpace__ecere__com__Instance *)(char *)this)->_class->templateArgs[5].__anon1.__anon2.__anon1.member->offset + ((struct __ecereNameSpace__ecere__com__Instance *)(char *)this)->_class->templateArgs[5].__anon1.__anon2.__anon1.member->_class->offset)).prev)
 (*(struct __ecereNameSpace__ecere__com__LinkElement *)(((unsigned char *)((void * )((uintptr_t)((*(struct __ecereNameSpace__ecere__com__LinkElement *)(((unsigned char *)((void *)((uintptr_t)(item)))) + ((struct __ecereNameSpace__ecere__com__Instance *)(char *)this)->_class->templateArgs[5].__anon1.__anon2.__anon1.member->offset + ((struct __ecereNameSpace__ecere__com__Instance *)(char *)this)->_class->templateArgs[5].__anon1.__anon2.__anon1.member->_class->offset)).prev)))) + ((struct __ecereNameSpace__ecere__com__Instance *)(char *)this)->_class->templateArgs[5].__anon1.__anon2.__anon1.member->offset + ((struct __ecereNameSpace__ecere__com__Instance *)(char *)this)->_class->templateArgs[5].__anon1.__anon2.__anon1.member->_class->offset)).next = ((void * )((uintptr_t)(item)));
-if(!((void *)((uintptr_t)(__ecerePointer___ecereNameSpace__ecere__com__LinkList->first))))
+if(!((void * )((uintptr_t)(__ecerePointer___ecereNameSpace__ecere__com__LinkList->first))))
 __ecerePointer___ecereNameSpace__ecere__com__LinkList->first = ((void * )((uintptr_t)(item)));
 __ecerePointer___ecereNameSpace__ecere__com__LinkList->last = ((void * )((uintptr_t)(item)));
 (*(struct __ecereNameSpace__ecere__com__LinkElement *)(((unsigned char *)((void *)((uintptr_t)(item)))) + ((struct __ecereNameSpace__ecere__com__Instance *)(char *)this)->_class->templateArgs[5].__anon1.__anon2.__anon1.member->offset + ((struct __ecereNameSpace__ecere__com__Instance *)(char *)this)->_class->templateArgs[5].__anon1.__anon2.__anon1.member->_class->offset)).next = ((void * )((uintptr_t)((*(unsigned int *)&((struct __ecereNameSpace__ecere__com__Instance *)(char *)this)->_class->templateArgs[4]) ? ((void * )((uintptr_t)(__ecerePointer___ecereNameSpace__ecere__com__LinkList->first))) : (((void *)0)))));
index ede81cf..26e4c63 100644 (file)
@@ -475,14 +475,14 @@ uint64 data = ((uint64 (*)(struct __ecereNameSpace__ecere__com__Instance *, stru
 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
 
 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__List->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__com__Container_GetData])(this, ((void *)((uintptr_t)(item))));
+})[__ecereVMethodID___ecereNameSpace__ecere__com__Container_GetData])(this, ((void * )((uintptr_t)(item))));
 
 (((void (* )(void *  _class, void *  data))((struct __ecereNameSpace__ecere__com__Instance *)(char *)this)->_class->templateArgs[2].__anon1.__anon1.dataTypeClass->_vTbl[__ecereVMethodID_class_OnFree])(((struct __ecereNameSpace__ecere__com__Instance * )(char * )this)->_class->templateArgs[2].__anon1.__anon1.dataTypeClass, ((void * )((uintptr_t)(data)))), data = 0);
 ((void (*)(struct __ecereNameSpace__ecere__com__Instance *, struct __ecereNameSpace__ecere__com__IteratorPointer * it))__extension__ ({
 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
 
 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__List->_vTbl;
-})[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Remove])(this, ((void *)((uintptr_t)(item))));
+})[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Remove])(this, ((void * )((uintptr_t)(item))));
 }
 }
 
index 0f0c610..d72bbd4 100644 (file)
@@ -3974,7 +3974,12 @@ nbExp->needTemplateCast = 2;
 if(((unsigned int)((exp->usage & 0x80) >> 7)))
 strcpy(typeString, "void *");
 else
+{
+if(exp->expType->kind == 20 && exp->expType->__anon1.templateParameter && exp->expType->__anon1.templateParameter->dataTypeString)
+strcpy(typeString, exp->expType->__anon1.templateParameter->dataTypeString);
+else
 PrintType(exp->expType, typeString, 0, 0);
+}
 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
 if(specs && (*specs).first && ((struct Specifier *)(*specs).first)->type == 8 && exp->destType && !exp->destType->passAsTemplate && exp->destType->kind == 20 && exp->destType->__anon1.templateParameter && (exp->destType->__anon1.templateParameter->dataTypeString || exp->destType->__anon1.templateParameter->__anon1.dataType) && !((unsigned int)((exp->usage & 0x4) >> 2)))
 {
index 89cfd27..1a2b55e 100644 (file)
@@ -3166,7 +3166,12 @@ static void ProcessExpression(Expression exp)
          if(exp.usage.usageDelete)
             strcpy(typeString, "void *");
          else
-            PrintType(exp.expType, typeString, false, false);
+         {
+            if(exp.expType.kind == templateType && exp.expType.templateParameter && exp.expType.templateParameter.dataTypeString)
+               strcpy(typeString, exp.expType.templateParameter.dataTypeString);
+            else
+               PrintType(exp.expType, typeString, false, false);
+         }
 
          decl = SpecDeclFromString(typeString, specs, null);