vim-patch:8.2.0560: compiler warning in tiny build

Problem:    Compiler warning in tiny build.
Solution:   Move declaration inside #ifdef. (Dominique Pelle, closes vim/vim#5915)
2196bce56f
This commit is contained in:
Jan Edmund Lazo
2020-04-12 15:58:14 -04:00
parent 0f18c718cd
commit a122f6c6d4
3 changed files with 12 additions and 14 deletions

View File

@@ -197,7 +197,7 @@ static void save_dbg_stuff(struct dbg_stuff *dsp)
static void restore_dbg_stuff(struct dbg_stuff *dsp)
{
suppress_errthrow = FALSE;
suppress_errthrow = false;
trylevel = dsp->trylevel;
force_abort = dsp->force_abort;
caught_stack = dsp->caught_stack;
@@ -394,8 +394,8 @@ int do_cmdline(char_u *cmdline, LineGetter fgetline,
* Initialize "force_abort" and "suppress_errthrow" at the top level.
*/
if (!recursive) {
force_abort = FALSE;
suppress_errthrow = FALSE;
force_abort = false;
suppress_errthrow = false;
}
// If requested, store and reset the global values controlling the
@@ -879,16 +879,14 @@ int do_cmdline(char_u *cmdline, LineGetter fgetline,
xfree(sourcing_name);
sourcing_name = saved_sourcing_name;
sourcing_lnum = saved_sourcing_lnum;
} else if (got_int || (did_emsg && force_abort)) {
// On an interrupt or an aborting error not converted to an exception,
// disable the conversion of errors to exceptions. (Interrupts are not
// converted any more, here.) This enables also the interrupt message
// when force_abort is set and did_emsg unset in case of an interrupt
// from a finally clause after an error.
suppress_errthrow = true;
}
/*
* On an interrupt or an aborting error not converted to an exception,
* disable the conversion of errors to exceptions. (Interrupts are not
* converted any more, here.) This enables also the interrupt message
* when force_abort is set and did_emsg unset in case of an interrupt
* from a finally clause after an error.
*/
else if (got_int || (did_emsg && force_abort))
suppress_errthrow = TRUE;
}
// The current cstack will be freed when do_cmdline() returns. An uncaught

View File

@@ -508,7 +508,7 @@ static int throw_exception(void *value, except_type_T type, char_u *cmdname)
nomem:
xfree(excp);
suppress_errthrow = TRUE;
suppress_errthrow = true;
EMSG(_(e_outofmem));
fail:
current_exception = NULL;

View File

@@ -296,7 +296,7 @@ EXTERN struct msglist **msg_list INIT(= NULL);
/// interrupt message or reporting an exception that is still uncaught at the
/// top level (which has already been discarded then). Also used for the error
/// message when no exception can be thrown.
EXTERN int suppress_errthrow INIT(= false);
EXTERN bool suppress_errthrow INIT(= false);
/// The stack of all caught and not finished exceptions. The exception on the
/// top of the stack is the one got by evaluation of v:exception. The complete