diff options
author | Jacob Garber <jgarber1@ualberta.ca> | 2019-07-02 12:39:16 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-07-10 18:21:23 +0000 |
commit | 3dbaf4f33646dc2e0ae9aaa8f4c8570d50a04c27 (patch) | |
tree | a9c76a59210850194e9fb90759c26c577260dfec | |
parent | 2e31ea05bb2c88913310d20a9baaa83e8934da52 (diff) | |
download | coreboot-3dbaf4f33646dc2e0ae9aaa8f4c8570d50a04c27.tar.xz |
util/romcc: Correct format specifiers
The right specifier for printing ptrdiff_t is %td.
Change-Id: I7bae4d47f15cfe85ca870f687c6f702339f680bb
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Found-by: Coverity CID 14021{64,68,76}
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33984
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
-rw-r--r-- | util/romcc/romcc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index 2a158e5fe0..378bfc50f2 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -19873,7 +19873,7 @@ static int color_graph(struct compile_state *state, struct reg_state *rstate) else { return 1; } - cgdebug_printf(state, " %d\n", range - rstate->lr); + cgdebug_printf(state, " %td\n", range - rstate->lr); range->group_prev = 0; for(edge = range->edges; edge; edge = edge->next) { struct live_range *node; @@ -19891,7 +19891,7 @@ static int color_graph(struct compile_state *state, struct reg_state *rstate) if (&node->group_next == rstate->high_tail) { rstate->high_tail = node->group_prev; } - cgdebug_printf(state, "Moving...%d to low\n", node - rstate->lr); + cgdebug_printf(state, "Moving...%td to low\n", node - rstate->lr); node->group_prev = rstate->low_tail; node->group_next = 0; *rstate->low_tail = node; @@ -19904,7 +19904,7 @@ static int color_graph(struct compile_state *state, struct reg_state *rstate) } colored = color_graph(state, rstate); if (colored) { - cgdebug_printf(state, "Coloring %d @", range - rstate->lr); + cgdebug_printf(state, "Coloring %td @", range - rstate->lr); cgdebug_loc(state, range->defs->def); cgdebug_flush(state); colored = select_free_color(state, rstate, range); @@ -20198,7 +20198,7 @@ static void allocate_registers(struct compile_state *state) */ if ((range->degree < regc_max_size(state, range->classes)) || (range->color != REG_UNSET)) { - cgdebug_printf(state, "Lo: %5d degree %5d%s\n", + cgdebug_printf(state, "Lo: %5td degree %5d%s\n", range - rstate.lr, range->degree, (range->color != REG_UNSET) ? " (colored)": ""); *range->group_prev = range->group_next; @@ -20215,7 +20215,7 @@ static void allocate_registers(struct compile_state *state) next = point; } else { - cgdebug_printf(state, "hi: %5d degree %5d%s\n", + cgdebug_printf(state, "hi: %5td degree %5d%s\n", range - rstate.lr, range->degree, (range->color != REG_UNSET) ? " (colored)": ""); } |