mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-04 03:23:14 +01:00
Fix format-string bugs by adding __attribute__((__format__)) in all applicable
places and fixing all warnings my gcc produced. Among other things, this should fix several segfaults (including one I just ran into).
This commit is contained in:
@@ -240,7 +240,7 @@ LLConstant* DtoConstArrayInitializer(ArrayInitializer* arrinit)
|
||||
// make sure the number of initializers is sane
|
||||
if (arrinit->index.dim > arrlen || arrinit->dim > arrlen)
|
||||
{
|
||||
error(arrinit->loc, "too many initializers, %d, for array[%d]", arrinit->index.dim, arrlen);
|
||||
error(arrinit->loc, "too many initializers, %u, for array[%zu]", arrinit->index.dim, arrlen);
|
||||
fatal();
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ LLConstant* DtoConstArrayInitializer(ArrayInitializer* arrinit)
|
||||
// error check from dmd
|
||||
if (initvals[j] != NULL)
|
||||
{
|
||||
error(arrinit->loc, "duplicate initialization for index %d", j);
|
||||
error(arrinit->loc, "duplicate initialization for index %zu", j);
|
||||
}
|
||||
|
||||
LLConstant* c = DtoConstInitializer(val->loc, elemty, val);
|
||||
|
||||
Reference in New Issue
Block a user