Paul Menzel (paulepanter@users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18196
-gerrit
commit 8d025e3fc7d8a836683259d336f01616508ebe08 Author: Paul Menzel paulepanter@users.sourceforge.net Date: Fri Jan 20 23:29:21 2017 +0100
nvramcui: Declare variable outside for loop
Make the code C89 compatible, which doesn’t allow loop initial declarations. Older compilers use C89 by default, so just declare the variable outside.
Change-Id: I3c5a8109e66f7a25687f4e4b2c72718d74276e04 Signed-off-by: Paul Menzel paulepanter@users.sourceforge.net --- payloads/nvramcui/nvramcui.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/payloads/nvramcui/nvramcui.c b/payloads/nvramcui/nvramcui.c index 84e5536..97be9df 100644 --- a/payloads/nvramcui/nvramcui.c +++ b/payloads/nvramcui/nvramcui.c @@ -90,8 +90,9 @@ static void cmos_walk_options(struct cb_cmos_option_table *opttbl, FIELD **fields, int numopts, int maxlength) { struct cb_cmos_entries *option = first_cmos_entry(opttbl); + int i;
- for (int i = 0; i < numopts; i++) { + for (i = 0; i < numopts; i++) { while ((option->config == 'r') || (strcmp("check_sum", (char *)option->name) == 0)) { option = next_cmos_entry(option); @@ -173,6 +174,7 @@ static void cmos_walk_options(struct cb_cmos_option_table *opttbl, int main(void) { int ch, done; + int i;
/* coreboot data structures */ lib_get_sysinfo(); @@ -268,7 +270,7 @@ int main(void)
endwin();
- for (int i = 0; i < numopts; i++) { + for (i = 0; i < numopts; i++) { char *name = field_buffer(fields[2 * i], 0); char *value = field_buffer(fields[2 * i + 1], 0); char *ptr;