Pacify --enable-gcc-warnings
* src/charset.c (load_charset_map): * src/coding.c (decode_coding_object): * src/frame.c (make_frame): * src/window.c (Frecenter): Mark locals with UNINIT to silence false alarms from -Wmaybe-uninitialized. * src/lisp.h (SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD) (SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): Check and assume that values are nonnull. This pacifies -Wmaybe-uninitialized in Fmake_variable_buffer_local and Fmake_local_variable.
This commit is contained in:
parent
5fcc777ff3
commit
b10bd71987
5 changed files with 12 additions and 12 deletions
|
@ -241,7 +241,7 @@ struct charset_map_entries
|
|||
static void
|
||||
load_charset_map (struct charset *charset, struct charset_map_entries *entries, int n_entries, int control_flag)
|
||||
{
|
||||
Lisp_Object vec;
|
||||
Lisp_Object vec UNINIT;
|
||||
Lisp_Object table UNINIT;
|
||||
unsigned max_code = CHARSET_MAX_CODE (charset);
|
||||
bool ascii_compatible_p = charset->ascii_compatible_p;
|
||||
|
|
|
@ -8028,12 +8028,12 @@ decode_coding_object (struct coding_system *coding,
|
|||
Lisp_Object dst_object)
|
||||
{
|
||||
ptrdiff_t count = SPECPDL_INDEX ();
|
||||
unsigned char *destination;
|
||||
ptrdiff_t dst_bytes;
|
||||
unsigned char *destination UNINIT;
|
||||
ptrdiff_t dst_bytes UNINIT;
|
||||
ptrdiff_t chars = to - from;
|
||||
ptrdiff_t bytes = to_byte - from_byte;
|
||||
Lisp_Object attrs;
|
||||
ptrdiff_t saved_pt = -1, saved_pt_byte;
|
||||
ptrdiff_t saved_pt = -1, saved_pt_byte UNINIT;
|
||||
bool need_marker_adjustment = 0;
|
||||
Lisp_Object old_deactivate_mark;
|
||||
|
||||
|
|
|
@ -611,7 +611,7 @@ make_frame (bool mini_p)
|
|||
{
|
||||
Lisp_Object frame;
|
||||
struct frame *f;
|
||||
struct window *rw, *mw;
|
||||
struct window *rw, *mw UNINIT;
|
||||
Lisp_Object root_window;
|
||||
Lisp_Object mini_window;
|
||||
|
||||
|
|
12
src/lisp.h
12
src/lisp.h
|
@ -1837,19 +1837,19 @@ INLINE Lisp_Object
|
|||
INLINE struct Lisp_Symbol *
|
||||
SYMBOL_ALIAS (struct Lisp_Symbol *sym)
|
||||
{
|
||||
eassert (sym->redirect == SYMBOL_VARALIAS);
|
||||
eassume (sym->redirect == SYMBOL_VARALIAS && sym->val.alias);
|
||||
return sym->val.alias;
|
||||
}
|
||||
INLINE struct Lisp_Buffer_Local_Value *
|
||||
SYMBOL_BLV (struct Lisp_Symbol *sym)
|
||||
{
|
||||
eassert (sym->redirect == SYMBOL_LOCALIZED);
|
||||
eassume (sym->redirect == SYMBOL_LOCALIZED && sym->val.blv);
|
||||
return sym->val.blv;
|
||||
}
|
||||
INLINE union Lisp_Fwd *
|
||||
SYMBOL_FWD (struct Lisp_Symbol *sym)
|
||||
{
|
||||
eassert (sym->redirect == SYMBOL_FORWARDED);
|
||||
eassume (sym->redirect == SYMBOL_FORWARDED && sym->val.fwd);
|
||||
return sym->val.fwd;
|
||||
}
|
||||
|
||||
|
@ -1862,19 +1862,19 @@ INLINE void
|
|||
INLINE void
|
||||
SET_SYMBOL_ALIAS (struct Lisp_Symbol *sym, struct Lisp_Symbol *v)
|
||||
{
|
||||
eassert (sym->redirect == SYMBOL_VARALIAS);
|
||||
eassume (sym->redirect == SYMBOL_VARALIAS && v);
|
||||
sym->val.alias = v;
|
||||
}
|
||||
INLINE void
|
||||
SET_SYMBOL_BLV (struct Lisp_Symbol *sym, struct Lisp_Buffer_Local_Value *v)
|
||||
{
|
||||
eassert (sym->redirect == SYMBOL_LOCALIZED);
|
||||
eassume (sym->redirect == SYMBOL_LOCALIZED && v);
|
||||
sym->val.blv = v;
|
||||
}
|
||||
INLINE void
|
||||
SET_SYMBOL_FWD (struct Lisp_Symbol *sym, union Lisp_Fwd *v)
|
||||
{
|
||||
eassert (sym->redirect == SYMBOL_FORWARDED);
|
||||
eassume (sym->redirect == SYMBOL_FORWARDED && v);
|
||||
sym->val.fwd = v;
|
||||
}
|
||||
|
||||
|
|
|
@ -5683,7 +5683,7 @@ and redisplay normally--don't erase and redraw the frame. */)
|
|||
struct buffer *buf = XBUFFER (w->contents);
|
||||
bool center_p = false;
|
||||
ptrdiff_t charpos, bytepos;
|
||||
EMACS_INT iarg;
|
||||
EMACS_INT iarg UNINIT;
|
||||
int this_scroll_margin;
|
||||
|
||||
if (buf != current_buffer)
|
||||
|
|
Loading…
Add table
Reference in a new issue