Skip to content

Commit

Permalink
Fix assigned-but-not-used warnings
Browse files Browse the repository at this point in the history
When building without assertions.
  • Loading branch information
oleavr committed Jan 10, 2024
1 parent 22805da commit 6b5e411
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions gum/arch-arm/gumarmrelocator.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2023 Ole André Vadla Ravnås <oleavr@nowsecure.com>
* Copyright (C) 2010-2024 Ole André Vadla Ravnås <oleavr@nowsecure.com>
*
* Licence: wxWindows Library Licence, Version 3.1
*/
Expand Down Expand Up @@ -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++;
Expand Down
4 changes: 2 additions & 2 deletions gum/arch-arm/gumthumbrelocator.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2023 Ole André Vadla Ravnås <oleavr@nowsecure.com>
* Copyright (C) 2010-2024 Ole André Vadla Ravnås <oleavr@nowsecure.com>
*
* Licence: wxWindows Library Licence, Version 3.1
*/
Expand Down Expand Up @@ -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++;
Expand Down
4 changes: 2 additions & 2 deletions gum/arch-arm64/gumarm64relocator.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014-2023 Ole André Vadla Ravnås <oleavr@nowsecure.com>
* Copyright (C) 2014-2024 Ole André Vadla Ravnås <oleavr@nowsecure.com>
*
* Licence: wxWindows Library Licence, Version 3.1
*/
Expand Down Expand Up @@ -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++;
Expand Down
4 changes: 2 additions & 2 deletions gum/arch-mips/gummipsrelocator.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014-2022 Ole André Vadla Ravnås <oleavr@nowsecure.com>
* Copyright (C) 2014-2024 Ole André Vadla Ravnås <oleavr@nowsecure.com>
* Copyright (C) 2019 Jon Wilson <jonwilson@zepler.net>
*
* Licence: wxWindows Library Licence, Version 3.1
Expand Down Expand Up @@ -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++;
Expand Down
4 changes: 2 additions & 2 deletions gum/arch-x86/gumx86relocator.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2023 Ole André Vadla Ravnås <oleavr@nowsecure.com>
* Copyright (C) 2009-2024 Ole André Vadla Ravnås <oleavr@nowsecure.com>
*
* Licence: wxWindows Library Licence, Version 3.1
*/
Expand Down Expand Up @@ -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++;
Expand Down
2 changes: 1 addition & 1 deletion gum/dlmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6b5e411

Please sign in to comment.