Mercurial > projects > ldc
diff gen/arrays.cpp @ 1372:229e02867307
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).
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 17 May 2009 00:15:25 +0200 |
parents | 15e9762bb620 |
children | 44c8eef6e6ee |
line wrap: on
line diff
--- a/gen/arrays.cpp Sat May 16 23:44:27 2009 +0200 +++ b/gen/arrays.cpp Sun May 17 00:15:25 2009 +0200 @@ -240,7 +240,7 @@ // 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 @@ // 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);