[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libjit] [PATCH 1/1] jit-rules-x86-64.c: dont declare var in for ini
From: |
Aleksey Demakov |
Subject: |
Re: [Libjit] [PATCH 1/1] jit-rules-x86-64.c: dont declare var in for initializer |
Date: |
Sat, 25 Aug 2018 16:35:43 +0300 |
Applied, thanks.
On Wed, Aug 22, 2018 at 3:54 PM Aurelien Aptel <address@hidden> wrote:
>
> This fixes the build on compilers that default to standards older than
> C99 (e.g. gcc 4.8.5).
>
> ---
> jit/jit-rules-x86-64.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/jit/jit-rules-x86-64.c b/jit/jit-rules-x86-64.c
> index 606dc53..74c36a4 100644
> --- a/jit/jit-rules-x86-64.c
> +++ b/jit/jit-rules-x86-64.c
> @@ -2618,6 +2618,7 @@ small_block_copy(jit_gencode_t gen, unsigned char *inst,
> int scratch_reg, int scratch_xreg, int
> is_aligned)
> {
> jit_nint offset = 0;
> + int i;
>
> /* Copy all 16 byte blocks of the struct */
> while(size >= 16)
> @@ -2641,7 +2642,7 @@ small_block_copy(jit_gencode_t gen, unsigned char *inst,
> }
>
> /* Now copy the rest of the struct */
> - for(int i = 8; i > 0; i /= 2)
> + for(i = 8; i > 0; i /= 2)
> {
> if(size >= i)
> {
> @@ -2753,6 +2754,7 @@ small_block_set(jit_gencode_t gen, unsigned char *inst,
> int is_aligned, int use_sse)
> {
> jit_nint offset = 0;
> + int i;
>
> /* Make sure only the least significant byte serves as the filler. */
> val &= 0xff;
> @@ -2804,7 +2806,7 @@ small_block_set(jit_gencode_t gen, unsigned char *inst,
> }
>
> /* Now fill the rest */
> - for(int i = 8; i > 0; i /= 2)
> + for(i = 8; i > 0; i /= 2)
> {
> while(size >= i)
> {
> --
> 2.13.7
>
>