mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-09 20:37:25 +03:00
Fix some more warnings.
Replace format modifier %zu (for size_t) with %llu and a cast to unsigned long long.
This commit is contained in:
parent
2d69424933
commit
136fe8dd03
3 changed files with 8 additions and 6 deletions
|
@ -284,7 +284,9 @@ LLConstant* DtoConstArrayInitializer(ArrayInitializer* arrinit)
|
||||||
// make sure the number of initializers is sane
|
// make sure the number of initializers is sane
|
||||||
if (arrinit->index.dim > arrlen || arrinit->dim > arrlen)
|
if (arrinit->index.dim > arrlen || arrinit->dim > arrlen)
|
||||||
{
|
{
|
||||||
error(arrinit->loc, "too many initializers, %u, for array[%zu]", arrinit->index.dim, arrlen);
|
error(arrinit->loc, "too many initializers, %llu, for array[%llu]",
|
||||||
|
static_cast<unsigned long long>(arrinit->index.dim),
|
||||||
|
static_cast<unsigned long long>(arrlen));
|
||||||
fatal();
|
fatal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,7 +323,7 @@ LLConstant* DtoConstArrayInitializer(ArrayInitializer* arrinit)
|
||||||
// error check from dmd
|
// error check from dmd
|
||||||
if (initvals[j] != NULL)
|
if (initvals[j] != NULL)
|
||||||
{
|
{
|
||||||
error(arrinit->loc, "duplicate initialization for index %zu", j);
|
error(arrinit->loc, "duplicate initialization for index %llu", static_cast<unsigned long long>(j));
|
||||||
}
|
}
|
||||||
|
|
||||||
LLConstant* c = DtoConstInitializer(val->loc, elemty, val);
|
LLConstant* c = DtoConstInitializer(val->loc, elemty, val);
|
||||||
|
|
|
@ -143,7 +143,7 @@ static void write_struct_literal(Loc loc, LLValue *mem, StructDeclaration *sd, E
|
||||||
DConstValue cv(vd->type, NULL); // Only used in one branch; value is set beforehand
|
DConstValue cv(vd->type, NULL); // Only used in one branch; value is set beforehand
|
||||||
if (expr)
|
if (expr)
|
||||||
{
|
{
|
||||||
IF_LOG Logger::println("expr %zu = %s", index, expr->toChars());
|
IF_LOG Logger::println("expr %llu = %s", static_cast<unsigned long long>(index), expr->toChars());
|
||||||
val = toElem(expr);
|
val = toElem(expr);
|
||||||
}
|
}
|
||||||
else if (vd == sd->vthis) {
|
else if (vd == sd->vthis) {
|
||||||
|
@ -2819,7 +2819,7 @@ public:
|
||||||
{
|
{
|
||||||
Expression* ekey = e->keys->tdata()[i];
|
Expression* ekey = e->keys->tdata()[i];
|
||||||
Expression* eval = e->values->tdata()[i];
|
Expression* eval = e->values->tdata()[i];
|
||||||
IF_LOG Logger::println("(%zu) aa[%s] = %s", i, ekey->toChars(), eval->toChars());
|
IF_LOG Logger::println("(%llu) aa[%s] = %s", static_cast<unsigned long long>(i), ekey->toChars(), eval->toChars());
|
||||||
unsigned errors = global.startGagging();
|
unsigned errors = global.startGagging();
|
||||||
LLConstant *ekeyConst = toConstElem(ekey, p);
|
LLConstant *ekeyConst = toConstElem(ekey, p);
|
||||||
LLConstant *evalConst = toConstElem(eval, p);
|
LLConstant *evalConst = toConstElem(eval, p);
|
||||||
|
@ -2880,7 +2880,7 @@ public:
|
||||||
Expression* ekey = (*e->keys)[i];
|
Expression* ekey = (*e->keys)[i];
|
||||||
Expression* eval = (*e->values)[i];
|
Expression* eval = (*e->values)[i];
|
||||||
|
|
||||||
IF_LOG Logger::println("(%zu) aa[%s] = %s", i, ekey->toChars(), eval->toChars());
|
IF_LOG Logger::println("(%llu) aa[%s] = %s", static_cast<unsigned long long>(i), ekey->toChars(), eval->toChars());
|
||||||
|
|
||||||
// index
|
// index
|
||||||
DValue* key = toElem(ekey);
|
DValue* key = toElem(ekey);
|
||||||
|
|
|
@ -16,7 +16,7 @@ std::vector<IrDsymbol*> IrDsymbol::list;
|
||||||
|
|
||||||
void IrDsymbol::resetAll()
|
void IrDsymbol::resetAll()
|
||||||
{
|
{
|
||||||
Logger::println("resetting %zu Dsymbols", list.size());
|
Logger::println("resetting %llu Dsymbols", static_cast<unsigned long long>(list.size()));
|
||||||
|
|
||||||
for (std::vector<IrDsymbol*>::iterator it = list.begin(), end = list.end(); it != end; ++it)
|
for (std::vector<IrDsymbol*>::iterator it = list.begin(), end = list.end(); it != end; ++it)
|
||||||
(*it)->reset();
|
(*it)->reset();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue