gdb_rl_find_completion_word: Remove 'found_quote' local
authorPedro Alves <pedro@palves.net>
Mon, 7 Jun 2021 22:36:05 +0000 (23:36 +0100)
committerPedro Alves <pedro@palves.net>
Mon, 7 Jun 2021 22:55:04 +0000 (23:55 +0100)
commitfa6ec8efa4b902f65a8057b5ee3ba0da456ec8c2
tree08b201acee3e9215b255e4cd06314ea8dc7eb294
parentc57eb1a26982fd55f4fa991ede68576d91634f33
gdb_rl_find_completion_word: Remove 'found_quote' local

Compiling GDB with current git Clang (future 13) runs into this:

 src/gdb/completer.c:287:18: error: variable 'found_quote' set but not used [-Werror,-Wunused-but-set-variable]
   int scan, end, found_quote, delimiter, pass_next, isbrk;
  ^

gdb_rl_find_completion_word came to life as a modified (stripped down)
version of readline's internal _rl_find_completion_word function.
When I added it, I don't remember whether I realized that
'found_quote' wasn't really necessary.  Maybe I kept it thinking of
keeping the source code in sync with readline?  I don't recall
anymore.  Since the function is already stripped down compared to the
original, stripping it down some more doesn't hurt.

So fix the issue by removing the unnecessary code.

gdb/ChangeLog:
yyyy-mm-dd  Pedro Alves  <pedro@palves.net>

* completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
(RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): Delete.
(gdb_rl_find_completion_word): Remove write-only 'found_quote'
local.
gdb/ChangeLog
gdb/completer.c