Bug 1112566 - Move variable declaration to the top its block for MSVC compatibility. r=jasone,r=glandium

This commit is contained in:
Guilherme Goncalves 2014-12-17 14:46:35 -02:00 committed by Mike Hommey
parent e47a825d2e
commit ba8709a07e
3 changed files with 38 additions and 2 deletions

View File

@ -0,0 +1,35 @@
From 9c6a8d3b0cc14fd26b119ad08f190e537771464f Mon Sep 17 00:00:00 2001
From: Guilherme Goncalves <guilherme.p.gonc@gmail.com>
Date: Wed, 17 Dec 2014 14:46:35 -0200
Subject: [PATCH] Move variable declaration to the top its block for MSVC
compatibility.
---
src/arena.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/arena.c b/src/arena.c
index bf78995..1eb4000 100644
--- a/src/arena.c
+++ b/src/arena.c
@@ -2022,6 +2022,7 @@ arena_ralloc_large_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr,
* following run, then merge the first part with the existing
* allocation.
*/
+ arena_run_t *run;
size_t flag_dirty, splitsize, usize;
usize = s2u(size + extra);
@@ -2030,8 +2031,7 @@ arena_ralloc_large_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr,
assert(usize >= usize_min);
splitsize = usize - oldsize;
- arena_run_t *run = &arena_miscelm_get(chunk,
- pageind+npages)->run;
+ run = &arena_miscelm_get(chunk, pageind+npages)->run;
arena_run_split_large(arena, run, splitsize, zero);
size = oldsize + splitsize;
--
2.1.3

View File

@ -2022,6 +2022,7 @@ arena_ralloc_large_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr,
* following run, then merge the first part with the existing
* allocation.
*/
arena_run_t *run;
size_t flag_dirty, splitsize, usize;
usize = s2u(size + extra);
@ -2030,8 +2031,7 @@ arena_ralloc_large_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr,
assert(usize >= usize_min);
splitsize = usize - oldsize;
arena_run_t *run = &arena_miscelm_get(chunk,
pageind+npages)->run;
run = &arena_miscelm_get(chunk, pageind+npages)->run;
arena_run_split_large(arena, run, splitsize, zero);
size = oldsize + splitsize;

View File

@ -15,6 +15,7 @@ git describe --long --abbrev=40 > VERSION
rm -rf .git .gitignore .gitattributes autom4te.cache .autom4te.cfg
patch -p1 < ../0001-Dont-overwrite-VERSION-on-a-git-repository.patch
patch -p1 < ../0002-Move-variable-declaration-to-the-top-its-block-for-M.patch
cd ..
hg addremove -q src