From 6b5e4119223fb2be9e31994ce872bd247335beb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Wed, 10 Jan 2024 22:48:51 +0100 Subject: [PATCH] Fix assigned-but-not-used warnings When building without assertions. --- gum/arch-arm/gumarmrelocator.c | 4 ++-- gum/arch-arm/gumthumbrelocator.c | 4 ++-- gum/arch-arm64/gumarm64relocator.c | 4 ++-- gum/arch-mips/gummipsrelocator.c | 4 ++-- gum/arch-x86/gumx86relocator.c | 4 ++-- gum/dlmalloc.c | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gum/arch-arm/gumarmrelocator.c b/gum/arch-arm/gumarmrelocator.c index 795f23a33..7dae284bc 100644 --- a/gum/arch-arm/gumarmrelocator.c +++ b/gum/arch-arm/gumarmrelocator.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2023 Ole André Vadla Ravnås + * Copyright (C) 2010-2024 Ole André Vadla Ravnås * * Licence: wxWindows Library Licence, Version 3.1 */ @@ -304,7 +304,7 @@ gum_arm_relocator_write_one (GumArmRelocator * self) void gum_arm_relocator_write_all (GumArmRelocator * self) { - guint count = 0; + G_GNUC_UNUSED guint count = 0; while (gum_arm_relocator_write_one (self)) count++; diff --git a/gum/arch-arm/gumthumbrelocator.c b/gum/arch-arm/gumthumbrelocator.c index 635706231..6c3984dfe 100644 --- a/gum/arch-arm/gumthumbrelocator.c +++ b/gum/arch-arm/gumthumbrelocator.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2023 Ole André Vadla Ravnås + * Copyright (C) 2010-2024 Ole André Vadla Ravnås * * Licence: wxWindows Library Licence, Version 3.1 */ @@ -459,7 +459,7 @@ gum_stalker_relocator_write_it_branches (GumThumbRelocator * self) void gum_thumb_relocator_write_all (GumThumbRelocator * self) { - guint count = 0; + G_GNUC_UNUSED guint count = 0; while (gum_thumb_relocator_write_one (self)) count++; diff --git a/gum/arch-arm64/gumarm64relocator.c b/gum/arch-arm64/gumarm64relocator.c index de6f6ee75..a87fa3dcc 100644 --- a/gum/arch-arm64/gumarm64relocator.c +++ b/gum/arch-arm64/gumarm64relocator.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2023 Ole André Vadla Ravnås + * Copyright (C) 2014-2024 Ole André Vadla Ravnås * * Licence: wxWindows Library Licence, Version 3.1 */ @@ -313,7 +313,7 @@ gum_arm64_relocator_write_one (GumArm64Relocator * self) void gum_arm64_relocator_write_all (GumArm64Relocator * self) { - guint count = 0; + G_GNUC_UNUSED guint count = 0; while (gum_arm64_relocator_write_one (self)) count++; diff --git a/gum/arch-mips/gummipsrelocator.c b/gum/arch-mips/gummipsrelocator.c index 081ba6bee..776a3ba41 100644 --- a/gum/arch-mips/gummipsrelocator.c +++ b/gum/arch-mips/gummipsrelocator.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2022 Ole André Vadla Ravnås + * Copyright (C) 2014-2024 Ole André Vadla Ravnås * Copyright (C) 2019 Jon Wilson * * Licence: wxWindows Library Licence, Version 3.1 @@ -411,7 +411,7 @@ gum_mips_relocator_write_one (GumMipsRelocator * self) void gum_mips_relocator_write_all (GumMipsRelocator * self) { - guint count = 0; + G_GNUC_UNUSED guint count = 0; while (gum_mips_relocator_write_one (self)) count++; diff --git a/gum/arch-x86/gumx86relocator.c b/gum/arch-x86/gumx86relocator.c index 416a0a484..11e9ba0be 100644 --- a/gum/arch-x86/gumx86relocator.c +++ b/gum/arch-x86/gumx86relocator.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2023 Ole André Vadla Ravnås + * Copyright (C) 2009-2024 Ole André Vadla Ravnås * * Licence: wxWindows Library Licence, Version 3.1 */ @@ -370,7 +370,7 @@ gum_x86_relocator_write_one_instruction (GumX86Relocator * self) void gum_x86_relocator_write_all (GumX86Relocator * self) { - guint count = 0; + G_GNUC_UNUSED guint count = 0; while (gum_x86_relocator_write_one (self)) count++; diff --git a/gum/dlmalloc.c b/gum/dlmalloc.c index 87a36ba43..69cd3a7a1 100644 --- a/gum/dlmalloc.c +++ b/gum/dlmalloc.c @@ -4042,7 +4042,7 @@ static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) { msegmentptr ss = (msegmentptr)(chunk2mem(sp)); mchunkptr tnext = chunk_plus_offset(sp, ssize); mchunkptr p = tnext; - int nfences = 0; + G_GNUC_UNUSED int nfences = 0; /* reset top to new space */ init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);