]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/build] Fix gdbserver/linux-aarch64-low.cc build
authorMark Wielaard <mark@klomp.org>
Fri, 3 May 2024 13:17:42 +0000 (15:17 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 3 May 2024 13:17:42 +0000 (15:17 +0200)
Commit 0ee25f97d21e ("Fix regression on aarch64-linux gdbserver")
removed the last use of i in gdbserver/linux-aarch64-low.cc
(aarch64_target::low_stopped_data_address). Breaking the build on
aarch64 with:

gdbserver/linux-aarch64-low.cc: In member function ?virtual CORE_ADDR aarch64_target::low_stopped_data_address()?:
gdbserver/linux-aarch64-low.cc:557:12: error: unused variable ?i? [-Werror=unused-variable]
  557 |   int pid, i;
      |            ^
cc1plus: all warnings being treated as errors

Fix this by removing the variable i completely.

Fixes: 0ee25f97d21e ("Fix regression on aarch64-linux gdbserver")
gdbserver/linux-aarch64-low.cc

index da5c1fd06298573e4cf39b1eeaeace736333044a..eb30c31f8f80d5d158daf857f882d6e6c838dfd0 100644 (file)
@@ -554,7 +554,7 @@ CORE_ADDR
 aarch64_target::low_stopped_data_address ()
 {
   siginfo_t siginfo;
-  int pid, i;
+  int pid;
   struct aarch64_debug_reg_state *state;
 
   pid = lwpid_of (current_thread);