ACK: [PATCH] bios: mtrr: fix compile error in ubuntu trusty
Colin Ian King
colin.king at canonical.com
Mon Jun 12 05:36:28 UTC 2017
On 09/06/17 21:26, Alex Hung wrote:
> This is to fix the below error
>
> bios/mtrr/mtrr.c:368:2: error: ‘for’ loop initial declarations are only
> allowed in C99 mode
> for (int i = 0; i < 5; i++) {
>
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
> src/bios/mtrr/mtrr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index 6386b6e..dfc3c6a 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -362,10 +362,10 @@ static int guess_cache_type(
>
> void multi_types_check(fwts_framework *fw, int *type)
> {
> - int n_types = 0;
> + int n_types = 0, i;
>
> /* checking number fo types set, UNCACHED, WRITE_BACK, WRITE_COMBINING, WRITE_THROUGH, WRITE_PROTECT */
> - for (int i = 0; i < 5; i++) {
> + for (i = 0; i < 5; i++) {
> if (*type & (1 << i))
> n_types++;
> }
>
Acked-by: Colin Ian King <colin.king at canonical.com>
More information about the fwts-devel
mailing list