[coreboot] [PATCH] Fix compiler warnings in romcc
Bernhard Walle
bernhard.walle at gmx.de
Sun Jan 20 23:08:50 CET 2008
Hello,
This patch fixes compiler warnings in romcc (due to "size_t" != "int" and %d
for "long").
Bernhard
--
Zwei Dinge sind unendlich, das Universum und die menschliche Dummheit, aber
bei dem Universum bin ich mir noch nicht ganz sicher
-- Albert Einstein
-------------- next part --------------
This patch fixes compiler warnings in romcc (due to "size_t" != "int" and %d
for "long").
This patch should be trivial.
Signed-off-by: Bernhard Walle <bernhard.walle at gmx.de>
---
romcc.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--- romcc.c (Revision 3066)
+++ romcc.c (Arbeitskopie)
@@ -20340,17 +20340,17 @@
struct ssa_edge *sedge)
{
if (state->compiler->debug & DEBUG_SCC_TRANSFORM2) {
- fprintf(state->errout, "adding sedge: %5d (%4d -> %5d)\n",
+ fprintf(state->errout, "adding sedge: %5ld (%4d -> %5d)\n",
sedge - scc->ssa_edges,
sedge->src->def->id,
- sedge->dst->def->id);
+ (int)sedge->dst->def->id);
}
if ((sedge == scc->ssa_work_list) ||
(sedge->work_next != sedge) ||
(sedge->work_prev != sedge)) {
if (state->compiler->debug & DEBUG_SCC_TRANSFORM2) {
- fprintf(state->errout, "dupped sedge: %5d\n",
+ fprintf(state->errout, "dupped sedge: %5ld\n",
sedge - scc->ssa_edges);
}
return;
@@ -21096,7 +21096,7 @@
fblock = lnode->fblock;
if (state->compiler->debug & DEBUG_SCC_TRANSFORM) {
- fprintf(state->errout, "sedge: %5d (%5d -> %5d)\n",
+ fprintf(state->errout, "sedge: %5ld (%5d -> %5d)\n",
sedge - scc.ssa_edges,
sedge->src->def->id,
sedge->dst->def->id);
@@ -23843,12 +23843,12 @@
long ref;
ref = next_label(state);
fprintf(fp, ".section \"" DATA_SECTION "\"\n");
- fprintf(fp, ".balign %d\n", align_of_in_bytes(state, ins->type));
+ fprintf(fp, ".balign %d\n", (int)align_of_in_bytes(state, ins->type));
fprintf(fp, "L%s%lu:\n", state->compiler->label_prefix, ref);
print_const(state, ins, fp);
fill_bytes = bits_to_bytes(size - size_of(state, ins->type));
if (fill_bytes) {
- fprintf(fp, ".fill %d, 1, 0\n", fill_bytes);
+ fprintf(fp, ".fill %d, 1, 0\n", (int)fill_bytes);
}
fprintf(fp, ".section \"" TEXT_SECTION "\"\n");
return ref;
@@ -24657,7 +24657,7 @@
struct triple *ins, FILE *fp)
{
fprintf(fp, ".section \"" DATA_SECTION "\"\n");
- fprintf(fp, ".balign %d\n", align_of_in_bytes(state, ins->type));
+ fprintf(fp, ".balign %d\n", (int)align_of_in_bytes(state, ins->type));
fprintf(fp, "L%s%lu:\n",
state->compiler->label_prefix, (unsigned long)(ins->u.cval));
print_const(state, MISC(ins, 0), fp);
More information about the coreboot
mailing list