[PATCH] Initialize variable word in complete
Jan Vrany
jan.vrany@fit.cvut.cz
Thu May 30 12:21:00 GMT 2019
Hi,
fixed and pushed, thanks!
Jan
On Wed, 2019-05-29 at 11:40 -0700, Keith Seitz wrote:
> Hi,
>
> Tom already approved this, but I just noticed a little / obvious typo. If
> you catch this before pushing, please change. Otherwise, don't worry about it.
>
> On 5/22/19 4:14 AM, Jan Vrany wrote:
> > diff --git a/gdb/completer.c b/gdb/completer.c
> > index cc2f80bc66..954f435259 100644
> > --- a/gdb/completer.c
> > +++ b/gdb/completer.c
> > @@ -1622,6 +1622,13 @@ complete (const char *line, char const **word, int *quote_char)
> > completion_tracker tracker_handle_completions;
> > completion_tracker *tracker;
> >
> > + /* The WORD should be set to the end of word to complete. We initialize
> > + to the completion point which is assumed to be at the end of LINE.
> > + This leaves WORD to be initialized to a sensible value in cases
> > + completion_find_completion_word() fails i.e., throws an exception.
> > + See bug 24587. */
> > + *word = line + strlen(line);
> ^^^^^^^^^^^^
>
> That should read "strlen (line);".
>
> Keith
>
> > +
> > try
> > {
> > *word = completion_find_completion_word (tracker_handle_brkchars,
>
More information about the Gdb-patches
mailing list