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> Reviewed-on: https://review.coreboot.org/14521 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
06a0b567ce
commit
0cf7acc688
|
@ -78,8 +78,8 @@ int main()
|
||||||
struct cb_cmos_entries *option = first_cmos_entry(opttbl);
|
struct cb_cmos_entries *option = first_cmos_entry(opttbl);
|
||||||
while (option) {
|
while (option) {
|
||||||
if ((option->config != 'r') &&
|
if ((option->config != 'r') &&
|
||||||
(strcmp("check_sum", option->name) != 0)) {
|
(strcmp("check_sum", (char *)option->name) != 0)) {
|
||||||
maxlength = max(maxlength, strlen(option->name));
|
maxlength = max(maxlength, strlen((char *)option->name));
|
||||||
numopts++;
|
numopts++;
|
||||||
}
|
}
|
||||||
option = next_cmos_entry(option);
|
option = next_cmos_entry(option);
|
||||||
|
@ -95,19 +95,19 @@ int main()
|
||||||
option = first_cmos_entry(opttbl);
|
option = first_cmos_entry(opttbl);
|
||||||
for (i = 0; i < numopts; i++) {
|
for (i = 0; i < numopts; i++) {
|
||||||
while ((option->config == 'r') ||
|
while ((option->config == 'r') ||
|
||||||
(strcmp("check_sum", option->name) == 0)) {
|
(strcmp("check_sum", (char *)option->name) == 0)) {
|
||||||
option = next_cmos_entry(option);
|
option = next_cmos_entry(option);
|
||||||
}
|
}
|
||||||
fields[2 * i] =
|
fields[2 * i] =
|
||||||
new_field(1, strlen(option->name), i * 2, 1, 0, 0);
|
new_field(1, strlen((char *)option->name), i * 2, 1, 0, 0);
|
||||||
set_field_buffer(fields[2 * i], 0, option->name);
|
set_field_buffer(fields[2 * i], 0, (char *)option->name);
|
||||||
field_opts_off(fields[2 * i], O_ACTIVE);
|
field_opts_off(fields[2 * i], O_ACTIVE);
|
||||||
|
|
||||||
fields[2 * i + 1] =
|
fields[2 * i + 1] =
|
||||||
new_field(1, 40, i * 2, maxlength + 2, 0, 0);
|
new_field(1, 40, i * 2, maxlength + 2, 0, 0);
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
int fail =
|
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) {
|
switch (option->config) {
|
||||||
case 'h': {
|
case 'h': {
|
||||||
set_field_type(fields[2 * i + 1], TYPE_INTEGER, 0, 0,
|
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 invalid data in CMOS, set buf to first enum */
|
||||||
if (fail && cmos_enum) {
|
if (fail && cmos_enum) {
|
||||||
buf = cmos_enum->text;
|
buf = (char *)cmos_enum->text;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (cmos_enum) {
|
while (cmos_enum) {
|
||||||
|
@ -142,7 +142,7 @@ int main()
|
||||||
cmos_enum =
|
cmos_enum =
|
||||||
first_cmos_enum_of_id(opttbl, option->config_id);
|
first_cmos_enum_of_id(opttbl, option->config_id);
|
||||||
while (cmos_enum) {
|
while (cmos_enum) {
|
||||||
values[cnt] = cmos_enum->text;
|
values[cnt] = (char *)cmos_enum->text;
|
||||||
cnt++;
|
cnt++;
|
||||||
cmos_enum = next_cmos_enum_of_id(
|
cmos_enum = next_cmos_enum_of_id(
|
||||||
cmos_enum, option->config_id);
|
cmos_enum, option->config_id);
|
||||||
|
|
Loading…
Reference in New Issue