Skip to content

Commit

Permalink
examples/vm_power: fix type of cmdline token in cli
Browse files Browse the repository at this point in the history
[ upstream commit 99dc014 ]

Building the example with clang gives the error:

  error: expression which evaluates to zero treated as a null pointer
  constant of type 'const char *' [-Werror,-Wnon-literal-null-conversion]
                        lcore_id, UINT8);
                                  ^~~~~

This error is due to the wrong data type being given for the
cmd_set_cpu_freq_core_num value - it was specified as string rather than
numeric type.

Fixes: f5e5c33 ("examples/vm_power: cli in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
  • Loading branch information
bruce-richardson authored and kevintraynor committed Dec 10, 2019
1 parent bc12c8f commit 9945223
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
Expand Up @@ -158,7 +158,7 @@ cmd_set_cpu_freq_parsed(void *parsed_result, struct cmdline *cl,
cmdline_parse_token_string_t cmd_set_cpu_freq =
TOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result,
set_cpu_freq, "set_cpu_freq");
cmdline_parse_token_string_t cmd_set_cpu_freq_core_num =
cmdline_parse_token_num_t cmd_set_cpu_freq_core_num =
TOKEN_NUM_INITIALIZER(struct cmd_set_cpu_freq_result,
lcore_id, UINT8);
cmdline_parse_token_string_t cmd_set_cpu_freq_cmd_cmd =
Expand Down

0 comments on commit 9945223

Please sign in to comment.