From 16260f977ff75d60f547e2ffb9522a475e38a4da Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 20 Oct 2022 00:33:18 +0300 Subject: Eliminate 'parameter can be declared as const pointer' cppcheck warnings (refactoring) * allchblk.c (free_list_index_of): Add const to pointer argument. * backgraph.c (is_in_progress): Likewise. * include/private/gc_priv.h [MSWIN32 || MSWINCE || CYGWIN32] (GC_is_heap_base): Likewise. * os_dep.c [USE_WINALLOC && !REDIRECT_MALLOC] (GC_is_malloc_heap_base): Likewise. * os_dep.c [MSWIN32 || MSWINCE || CYGWIN32] (GC_is_heap_base): Likewise. * os_dep.c [CHECKSUMS && (GWW_VDB || SOFT_VDB) || PROC_VDB] (GC_or_pages): Likewise. * finalize.c (GC_grow_table): Add const to entries_ptr argument. * os_dep.c [USE_WINALLOC && !REDIRECT_MALLOC] (GC_is_malloc_heap_base): Change while loop to for. --- allchblk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'allchblk.c') diff --git a/allchblk.c b/allchblk.c index 81c5af89..a0a3f313 100644 --- a/allchblk.c +++ b/allchblk.c @@ -164,7 +164,7 @@ STATIC int GC_hblk_fl_from_blocks(word blocks_needed) /* Return the free list index on which the block described by the header */ /* appears, or -1 if it appears nowhere. */ -static int free_list_index_of(hdr *wanted) +static int free_list_index_of(const hdr *wanted) { int i; -- cgit v1.2.1