mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 23:20:40 +03:00
Fixes 2 kinds of warnings.
1) The last parameter of getGetElementPtr() has type bool. In some instances, a 2 is used as parameter. This is converted to true. 2) Several loops use int instead of unsigned. This causes warning about signed/unsigned mismatch. Curiously, only Visual C++ complains about this. Nevertheless I think that the warnings should be fixed.
This commit is contained in:
parent
7753acf176
commit
a5b3dd29b5
13 changed files with 44 additions and 44 deletions
|
@ -1134,7 +1134,7 @@ DValue* DtoDeclarationExp(Dsymbol* declaration)
|
|||
// choose the right set in case this is a conditional declaration
|
||||
Array *d = a->include(NULL, NULL);
|
||||
if (d)
|
||||
for (int i=0; i < d->dim; ++i)
|
||||
for (unsigned i=0; i < d->dim; ++i)
|
||||
{
|
||||
DtoDeclarationExp((Dsymbol*)d->data[i]);
|
||||
}
|
||||
|
@ -1143,7 +1143,7 @@ DValue* DtoDeclarationExp(Dsymbol* declaration)
|
|||
else if (TemplateMixin* m = declaration->isTemplateMixin())
|
||||
{
|
||||
Logger::println("TemplateMixin");
|
||||
for (int i=0; i < m->members->dim; ++i)
|
||||
for (unsigned i=0; i < m->members->dim; ++i)
|
||||
{
|
||||
Dsymbol* mdsym = (Dsymbol*)m->members->data[i];
|
||||
DtoDeclarationExp(mdsym);
|
||||
|
@ -1159,7 +1159,7 @@ DValue* DtoDeclarationExp(Dsymbol* declaration)
|
|||
}
|
||||
|
||||
assert(tupled->objects);
|
||||
for (int i=0; i < tupled->objects->dim; ++i)
|
||||
for (unsigned i=0; i < tupled->objects->dim; ++i)
|
||||
{
|
||||
DsymbolExp* exp = (DsymbolExp*)tupled->objects->data[i];
|
||||
DtoDeclarationExp(exp->s);
|
||||
|
@ -1637,7 +1637,7 @@ bool hasUnalignedFields(Type* t)
|
|||
|
||||
// go through all the fields and try to find something unaligned
|
||||
ts->unaligned = 2;
|
||||
for (int i = 0; i < sym->fields.dim; i++)
|
||||
for (unsigned i = 0; i < sym->fields.dim; i++)
|
||||
{
|
||||
VarDeclaration* f = (VarDeclaration*)sym->fields.data[i];
|
||||
unsigned a = f->type->alignsize() - 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue