Martin Roth (martinroth@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14521
-gerrit
commit 00c03973d327a3e7c97bd2e059d7a14419f45016 Author: Martin Roth martinroth@google.com Date: Tue Apr 26 12:33:44 2016 -0600
nvramcui: Cast u8 * values to char * to eliminate warnings
error: pointer targets of 'strcmp' differ in signedness expected 'const char *' but argument is of type 'u8 * {aka unsigned char *}'
Change-Id: Id5cbb6fc2efd7c57abc59b08416047e10461436f Signed-off-by: Martin Roth martinroth@google.com --- payloads/nvramcui/nvramcui.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/payloads/nvramcui/nvramcui.c b/payloads/nvramcui/nvramcui.c index 366fe39..08fef01 100644 --- a/payloads/nvramcui/nvramcui.c +++ b/payloads/nvramcui/nvramcui.c @@ -78,8 +78,8 @@ int main() struct cb_cmos_entries *option = first_cmos_entry(opttbl); while (option) { if ((option->config != 'r') && - (strcmp("check_sum", option->name) != 0)) { - maxlength = max(maxlength, strlen(option->name)); + (strcmp("check_sum", (char *)option->name) != 0)) { + maxlength = max(maxlength, strlen((char *)option->name)); numopts++; } option = next_cmos_entry(option); @@ -95,19 +95,19 @@ int main() option = first_cmos_entry(opttbl); for (i = 0; i < numopts; i++) { while ((option->config == 'r') || - (strcmp("check_sum", option->name) == 0)) { + (strcmp("check_sum", (char *)option->name) == 0)) { option = next_cmos_entry(option); } fields[2 * i] = - new_field(1, strlen(option->name), i * 2, 1, 0, 0); - set_field_buffer(fields[2 * i], 0, option->name); + new_field(1, strlen((char *)option->name), i * 2, 1, 0, 0); + set_field_buffer(fields[2 * i], 0, (char *)option->name); field_opts_off(fields[2 * i], O_ACTIVE);
fields[2 * i + 1] = new_field(1, 40, i * 2, maxlength + 2, 0, 0); char *buf = NULL; int fail = - get_option_as_string(use_nvram, opttbl, &buf, option->name); + get_option_as_string(use_nvram, opttbl, &buf, (char *)option->name); switch (option->config) { case 'h': { set_field_type(fields[2 * i + 1], TYPE_INTEGER, 0, 0, @@ -127,7 +127,7 @@ int main()
/* if invalid data in CMOS, set buf to first enum */ if (fail && cmos_enum) { - buf = cmos_enum->text; + buf = (char *)cmos_enum->text; }
while (cmos_enum) { @@ -142,7 +142,7 @@ int main() cmos_enum = first_cmos_enum_of_id(opttbl, option->config_id); while (cmos_enum) { - values[cnt] = cmos_enum->text; + values[cnt] = (char *)cmos_enum->text; cnt++; cmos_enum = next_cmos_enum_of_id( cmos_enum, option->config_id);