Since these elts are runtime/internal-only, this seems like a worthwhile cleanup for 1.7/1.6? No API changes exposed.
On Fri, Jan 26, 2018 at 4:00 PM, <yla...@apache.org> wrote: > Author: ylavic > Date: Fri Jan 26 22:00:17 2018 > New Revision: 1822357 > > URL: http://svn.apache.org/viewvc?rev=1822357&view=rev > Log: > apr_pools: make index(es) an apr_size_t everywhere. > > Avoids "conversion from 'size_t' to 'apr_uint32_t', possible loss" warnings. > > > Modified: > apr/apr/trunk/memory/unix/apr_pools.c > > Modified: apr/apr/trunk/memory/unix/apr_pools.c > URL: > http://svn.apache.org/viewvc/apr/apr/trunk/memory/unix/apr_pools.c?rev=1822357&r1=1822356&r2=1822357&view=diff > ============================================================================== > --- apr/apr/trunk/memory/unix/apr_pools.c (original) > +++ apr/apr/trunk/memory/unix/apr_pools.c Fri Jan 26 22:00:17 2018 > @@ -188,7 +188,7 @@ APR_DECLARE(apr_status_t) apr_allocator_ > > APR_DECLARE(void) apr_allocator_destroy(apr_allocator_t *allocator) > { > - apr_uint32_t index; > + apr_size_t index; > apr_memnode_t *node, **ref; > > for (index = 0; index <= MAX_INDEX; index++) { > @@ -235,7 +235,7 @@ APR_DECLARE(apr_pool_t *) apr_allocator_ > APR_DECLARE(void) apr_allocator_max_free_set(apr_allocator_t *allocator, > apr_size_t in_size) > { > - apr_uint32_t max_free_index; > + apr_size_t max_free_index; > apr_size_t size = in_size; > > allocator_lock(allocator); > @@ -280,7 +280,7 @@ static APR_INLINE > apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t > in_size) > { > apr_memnode_t *node, **ref; > - apr_uint32_t max_index, upper_index; > + apr_size_t max_index, upper_index; > apr_size_t size, i, index; > > /* Round up the block size to the next boundary, but always > @@ -341,7 +341,7 @@ apr_memnode_t *allocator_alloc(apr_alloc > ref--; > max_index--; > } > - while (*ref == NULL && max_index > 0); > + while (*ref == NULL && max_index); > > allocator->max_index = max_index; > } > @@ -423,8 +423,8 @@ static APR_INLINE > void allocator_free(apr_allocator_t *allocator, apr_memnode_t *node) > { > apr_memnode_t *next, *freelist = NULL; > - apr_uint32_t index, max_index; > - apr_uint32_t max_free_index, current_free_index; > + apr_size_t index, max_index; > + apr_size_t max_free_index, current_free_index; > > allocator_lock(allocator); > > @@ -554,7 +554,7 @@ typedef struct debug_node_t debug_node_t > > struct debug_node_t { > debug_node_t *next; > - apr_uint32_t index; > + apr_size_t index; > void *beginp[64]; > void *endp[64]; > }; > @@ -1848,7 +1848,7 @@ APR_DECLARE(void *) apr_pcalloc_debug(ap > static void pool_clear_debug(apr_pool_t *pool, const char *file_line) > { > debug_node_t *node; > - apr_uint32_t index; > + apr_size_t index; > > /* Run pre destroy cleanups */ > run_cleanups(&pool->pre_cleanups); > @@ -2265,7 +2265,7 @@ static int pool_find(apr_pool_t *pool, v > { > void **pmem = (void **)data; > debug_node_t *node; > - apr_uint32_t index; > + apr_size_t index; > > node = pool->nodes; > > @@ -2298,7 +2298,7 @@ static int pool_num_bytes(apr_pool_t *po > { > apr_size_t *psize = (apr_size_t *)data; > debug_node_t *node; > - apr_uint32_t index; > + apr_size_t index; > > node = pool->nodes; > > >