ACK: [PATCH] cpu: microcode: fix a couple of warnings found by cppcheck:
Alex Hung
alex.hung at canonical.com
Wed Feb 17 04:17:43 UTC 2016
On 2016-01-30 10:11 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> [src/cpu/microcode/microcode.c:128]: (warning) %x in format string
> (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'.
> [src/cpu/microcode/microcode.c:157]: (warning) %x in format string
> (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/cpu/microcode/microcode.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/cpu/microcode/microcode.c b/src/cpu/microcode/microcode.c
> index f588e1f..7c78b9d 100644
> --- a/src/cpu/microcode/microcode.c
> +++ b/src/cpu/microcode/microcode.c
> @@ -123,7 +123,7 @@ static int microcode_test1(fwts_framework *fw)
> ptr = strstr(line, "revision=0x");
> if (ptr) {
> int cpu;
> - int revision;
> + unsigned int revision;
>
> if (sscanf(line, "%*s CPU%d sig=0x%*x, pf=0x%*x, revision=0x%x", &cpu, &revision) != 2)
> continue;
> @@ -149,7 +149,7 @@ static int microcode_test1(fwts_framework *fw)
> ptr = strstr(line, "updated to revision");
> if (ptr) {
> int cpu;
> - int revision;
> + unsigned int revision;
> int year;
> int month;
> int day;
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list