Commit 6bbd7a29 authored by Gerd Moellmann's avatar Gerd Moellmann

Avoid some more compiler warnings.

parent 8179cccd
...@@ -2934,6 +2934,9 @@ mark_maybe_object (obj) ...@@ -2934,6 +2934,9 @@ mark_maybe_object (obj)
} }
} }
break; break;
case Lisp_Int:
break;
} }
if (mark_p) if (mark_p)
...@@ -3138,7 +3141,7 @@ static void ...@@ -3138,7 +3141,7 @@ static void
mark_stack () mark_stack ()
{ {
jmp_buf j; jmp_buf j;
int stack_grows_down_p = (char *) &j > (char *) stack_base; volatile int stack_grows_down_p = (char *) &j > (char *) stack_base;
void *end; void *end;
/* This trick flushes the register windows so that all the state of /* This trick flushes the register windows so that all the state of
...@@ -3362,8 +3365,8 @@ Does not copy symbols. Copies strings without text properties.") ...@@ -3362,8 +3365,8 @@ Does not copy symbols. Copies strings without text properties.")
} }
else if (MARKERP (obj)) else if (MARKERP (obj))
error ("Attempt to copy a marker to pure storage"); error ("Attempt to copy a marker to pure storage");
else
return obj; return obj;
} }
......
...@@ -1751,6 +1751,8 @@ or a byte-code object. IDX starts at 0.") ...@@ -1751,6 +1751,8 @@ or a byte-code object. IDX starts at 0.")
{ {
Lisp_Object val; Lisp_Object val;
val = Qnil;
if (idxval < 0) if (idxval < 0)
args_out_of_range (array, idx); args_out_of_range (array, idx);
if (idxval < CHAR_TABLE_ORDINARY_SLOTS) if (idxval < CHAR_TABLE_ORDINARY_SLOTS)
...@@ -1821,7 +1823,7 @@ or a byte-code object. IDX starts at 0.") ...@@ -1821,7 +1823,7 @@ or a byte-code object. IDX starts at 0.")
} }
else else
{ {
int size; int size = 0;
if (VECTORP (array)) if (VECTORP (array))
size = XVECTOR (array)->size; size = XVECTOR (array)->size;
else if (COMPILEDP (array)) else if (COMPILEDP (array))
...@@ -2010,7 +2012,7 @@ arithcompare (num1, num2, comparison) ...@@ -2010,7 +2012,7 @@ arithcompare (num1, num2, comparison)
Lisp_Object num1, num2; Lisp_Object num1, num2;
enum comparison comparison; enum comparison comparison;
{ {
double f1, f2; double f1 = 0, f2 = 0;
int floatp = 0; int floatp = 0;
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num1, 0); CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num1, 0);
......
...@@ -131,7 +131,7 @@ directory_files_internal (directory, full, match, nosort, attrs) ...@@ -131,7 +131,7 @@ directory_files_internal (directory, full, match, nosort, attrs)
Lisp_Object list, name, dirfilename; Lisp_Object list, name, dirfilename;
Lisp_Object encoded_directory; Lisp_Object encoded_directory;
Lisp_Object handler; Lisp_Object handler;
struct re_pattern_buffer *bufp; struct re_pattern_buffer *bufp = NULL;
int needsep = 0; int needsep = 0;
struct gcpro gcpro1, gcpro2; struct gcpro gcpro1, gcpro2;
...@@ -389,7 +389,7 @@ file_name_completion (file, dirname, all_flag, ver_flag) ...@@ -389,7 +389,7 @@ file_name_completion (file, dirname, all_flag, ver_flag)
{ {
DIR *d; DIR *d;
DIRENTRY *dp; DIRENTRY *dp;
int bestmatchsize, skip; int bestmatchsize = 0, skip;
register int compare, matchsize; register int compare, matchsize;
unsigned char *p1, *p2; unsigned char *p1, *p2;
int matchcount = 0; int matchcount = 0;
...@@ -402,6 +402,8 @@ file_name_completion (file, dirname, all_flag, ver_flag) ...@@ -402,6 +402,8 @@ file_name_completion (file, dirname, all_flag, ver_flag)
int count = specpdl_ptr - specpdl; int count = specpdl_ptr - specpdl;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
elt = Qnil;
#ifdef VMS #ifdef VMS
extern DIRENTRY * readdirver (); extern DIRENTRY * readdirver ();
......
...@@ -604,7 +604,7 @@ argmatch (argv, argc, sstr, lstr, minlen, valptr, skipptr) ...@@ -604,7 +604,7 @@ argmatch (argv, argc, sstr, lstr, minlen, valptr, skipptr)
char **valptr; char **valptr;
int *skipptr; int *skipptr;
{ {
char *p; char *p = NULL;
int arglen; int arglen;
char *arg; char *arg;
...@@ -1506,6 +1506,7 @@ main (argc, argv, envp) ...@@ -1506,6 +1506,7 @@ main (argc, argv, envp)
/* Enter editor command loop. This never returns. */ /* Enter editor command loop. This never returns. */
Frecursive_edit (); Frecursive_edit ();
/* NOTREACHED */ /* NOTREACHED */
return 0;
} }
/* Sort the args so we can find the most important ones /* Sort the args so we can find the most important ones
......
...@@ -1973,7 +1973,7 @@ duplicates what `expand-file-name' does.") ...@@ -1973,7 +1973,7 @@ duplicates what `expand-file-name' does.")
unsigned char *nm; unsigned char *nm;
register unsigned char *s, *p, *o, *x, *endp; register unsigned char *s, *p, *o, *x, *endp;
unsigned char *target; unsigned char *target = NULL;
int total = 0; int total = 0;
int substituted = 0; int substituted = 0;
unsigned char *xnm; unsigned char *xnm;
...@@ -2180,6 +2180,7 @@ duplicates what `expand-file-name' does.") ...@@ -2180,6 +2180,7 @@ duplicates what `expand-file-name' does.")
/* NOTREACHED */ /* NOTREACHED */
#endif /* not VMS */ #endif /* not VMS */
return Qnil;
} }
/* A slightly faster and more convenient way to get /* A slightly faster and more convenient way to get
...@@ -3421,7 +3422,7 @@ actually used.") ...@@ -3421,7 +3422,7 @@ actually used.")
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
Lisp_Object handler, val, insval, orig_filename; Lisp_Object handler, val, insval, orig_filename;
Lisp_Object p; Lisp_Object p;
int total; int total = 0;
int not_regular = 0; int not_regular = 0;
unsigned char read_buf[READ_BUF_SIZE]; unsigned char read_buf[READ_BUF_SIZE];
struct coding_system coding; struct coding_system coding;
...@@ -4397,7 +4398,7 @@ This does code conversion according to the value of\n\ ...@@ -4397,7 +4398,7 @@ This does code conversion according to the value of\n\
{ {
register int desc; register int desc;
int failure; int failure;
int save_errno; int save_errno = 0;
unsigned char *fn; unsigned char *fn;
struct stat st; struct stat st;
int tem; int tem;
......
...@@ -835,8 +835,8 @@ The return value is the current column.") ...@@ -835,8 +835,8 @@ The return value is the current column.")
register int multibyte = !NILP (current_buffer->enable_multibyte_characters); register int multibyte = !NILP (current_buffer->enable_multibyte_characters);
Lisp_Object val; Lisp_Object val;
int prev_col; int prev_col = 0;
int c; int c = 0;
int next_boundary; int next_boundary;
int pos_byte, end_byte, next_boundary_byte; int pos_byte, end_byte, next_boundary_byte;
...@@ -1053,7 +1053,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, ...@@ -1053,7 +1053,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
register int pos; register int pos;
int pos_byte; int pos_byte;
register int c; register int c = 0;
register int tab_width = XFASTINT (current_buffer->tab_width); register int tab_width = XFASTINT (current_buffer->tab_width);
register int ctl_arrow = !NILP (current_buffer->ctl_arrow); register int ctl_arrow = !NILP (current_buffer->ctl_arrow);
register struct Lisp_Char_Table *dp = window_display_table (win); register struct Lisp_Char_Table *dp = window_display_table (win);
......
...@@ -1347,6 +1347,7 @@ replace_range (from, to, new, prepare, inherit, markers) ...@@ -1347,6 +1347,7 @@ replace_range (from, to, new, prepare, inherit, markers)
CHECK_MARKERS (); CHECK_MARKERS ();
GCPRO1 (new); GCPRO1 (new);
deletion = Qnil;
if (prepare) if (prepare)
{ {
......
...@@ -269,8 +269,7 @@ get_keymap_1 (object, error, autoload) ...@@ -269,8 +269,7 @@ get_keymap_1 (object, error, autoload)
end: end:
if (error) if (error)
wrong_type_argument (Qkeymapp, object); wrong_type_argument (Qkeymapp, object);
else return Qnil;
return Qnil;
} }
...@@ -1775,10 +1774,10 @@ spaces are put between sequence elements, etc.") ...@@ -1775,10 +1774,10 @@ spaces are put between sequence elements, etc.")
(keys) (keys)
Lisp_Object keys; Lisp_Object keys;
{ {
int len; int len = 0;
int i, i_byte; int i, i_byte;
Lisp_Object sep; Lisp_Object sep;
Lisp_Object *args; Lisp_Object *args = NULL;
if (STRINGP (keys)) if (STRINGP (keys))
{ {
...@@ -2021,6 +2020,7 @@ around function keys and event symbols.") ...@@ -2021,6 +2020,7 @@ around function keys and event symbols.")
return Fcopy_sequence (key); return Fcopy_sequence (key);
else else
error ("KEY must be an integer, cons, symbol, or string"); error ("KEY must be an integer, cons, symbol, or string");
return Qnil;
} }
char * char *
...@@ -2846,6 +2846,8 @@ describe_map (map, keys, elt_describer, partial, shadow, seen, nomenu) ...@@ -2846,6 +2846,8 @@ describe_map (map, keys, elt_describer, partial, shadow, seen, nomenu)
int first = 1; int first = 1;
struct gcpro gcpro1, gcpro2, gcpro3; struct gcpro gcpro1, gcpro2, gcpro3;
suppress = Qnil;
if (!NILP (keys) && XFASTINT (Flength (keys)) > 0) if (!NILP (keys) && XFASTINT (Flength (keys)) > 0)
{ {
/* Call Fkey_description first, to avoid GC bug for the other string. */ /* Call Fkey_description first, to avoid GC bug for the other string. */
...@@ -3027,6 +3029,8 @@ describe_vector (vector, elt_prefix, elt_describer, ...@@ -3027,6 +3029,8 @@ describe_vector (vector, elt_prefix, elt_describer,
int character; int character;
int starting_i; int starting_i;
suppress = Qnil;
if (indices == 0) if (indices == 0)
indices = (int *) alloca (3 * sizeof (int)); indices = (int *) alloca (3 * sizeof (int));
......
...@@ -213,6 +213,7 @@ DEFUN ("cancel-kbd-macro-events", Fcancel_kbd_macro_events, ...@@ -213,6 +213,7 @@ DEFUN ("cancel-kbd-macro-events", Fcancel_kbd_macro_events,
() ()
{ {
current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_end; current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_end;
return Qnil;
} }
DEFUN ("store-kbd-macro-event", Fstore_kbd_macro_event, DEFUN ("store-kbd-macro-event", Fstore_kbd_macro_event,
......
...@@ -281,6 +281,7 @@ read_minibuf_noninteractive (map, initial, prompt, backup_n, expflag, ...@@ -281,6 +281,7 @@ read_minibuf_noninteractive (map, initial, prompt, backup_n, expflag,
fprintf (stdout, "%s", XSTRING (prompt)->data); fprintf (stdout, "%s", XSTRING (prompt)->data);
fflush (stdout); fflush (stdout);
val = Qnil;
size = 100; size = 100;
len = 0; len = 0;
line = (char *) xmalloc (size * sizeof *line); line = (char *) xmalloc (size * sizeof *line);
...@@ -1046,11 +1047,11 @@ is used to further constrain the set of candidates.") ...@@ -1046,11 +1047,11 @@ is used to further constrain the set of candidates.")
{ {
Lisp_Object bestmatch, tail, elt, eltstring; Lisp_Object bestmatch, tail, elt, eltstring;
/* Size in bytes of BESTMATCH. */ /* Size in bytes of BESTMATCH. */
int bestmatchsize; int bestmatchsize = 0;
/* These are in bytes, too. */ /* These are in bytes, too. */
int compare, matchsize; int compare, matchsize;
int list = CONSP (alist) || NILP (alist); int list = CONSP (alist) || NILP (alist);
int index, obsize; int index = 0, obsize = 0;
int matchcount = 0; int matchcount = 0;
Lisp_Object bucket, zero, end, tem; Lisp_Object bucket, zero, end, tem;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
...@@ -1059,7 +1060,7 @@ is used to further constrain the set of candidates.") ...@@ -1059,7 +1060,7 @@ is used to further constrain the set of candidates.")
if (!list && !VECTORP (alist)) if (!list && !VECTORP (alist))
return call3 (alist, string, predicate, Qnil); return call3 (alist, string, predicate, Qnil);
bestmatch = Qnil; bestmatch = bucket = Qnil;
/* If ALIST is not a list, set TAIL just for gc pro. */ /* If ALIST is not a list, set TAIL just for gc pro. */
tail = alist; tail = alist;
...@@ -1299,7 +1300,7 @@ are ignored unless STRING itself starts with a space.") ...@@ -1299,7 +1300,7 @@ are ignored unless STRING itself starts with a space.")
Lisp_Object tail, elt, eltstring; Lisp_Object tail, elt, eltstring;
Lisp_Object allmatches; Lisp_Object allmatches;
int list = CONSP (alist) || NILP (alist); int list = CONSP (alist) || NILP (alist);
int index, obsize; int index = 0, obsize = 0;
Lisp_Object bucket, tem; Lisp_Object bucket, tem;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
...@@ -1308,7 +1309,7 @@ are ignored unless STRING itself starts with a space.") ...@@ -1308,7 +1309,7 @@ are ignored unless STRING itself starts with a space.")
{ {
return call3 (alist, string, predicate, Qt); return call3 (alist, string, predicate, Qt);
} }
allmatches = Qnil; allmatches = bucket = Qnil;
/* If ALIST is not a list, set TAIL just for gc pro. */ /* If ALIST is not a list, set TAIL just for gc pro. */
tail = alist; tail = alist;
...@@ -1809,7 +1810,7 @@ a repetition of this command will exit.") ...@@ -1809,7 +1810,7 @@ a repetition of this command will exit.")
return Qnil; return Qnil;
} }
exit: exit:
Fthrow (Qexit, Qnil); return Fthrow (Qexit, Qnil);
/* NOTREACHED */ /* NOTREACHED */
} }
...@@ -2028,6 +2029,8 @@ It can find the completion buffer in `standard-output'.") ...@@ -2028,6 +2029,8 @@ It can find the completion buffer in `standard-output'.")
int length; int length;
Lisp_Object startpos, endpos; Lisp_Object startpos, endpos;
startpos = Qnil;
elt = Fcar (tail); elt = Fcar (tail);
/* Compute the length of this element. */ /* Compute the length of this element. */
if (CONSP (elt)) if (CONSP (elt))
...@@ -2202,14 +2205,14 @@ DEFUN ("self-insert-and-exit", Fself_insert_and_exit, Sself_insert_and_exit, 0, ...@@ -2202,14 +2205,14 @@ DEFUN ("self-insert-and-exit", Fself_insert_and_exit, Sself_insert_and_exit, 0,
else else
bitch_at_user (); bitch_at_user ();
Fthrow (Qexit, Qnil); return Fthrow (Qexit, Qnil);
} }
DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "", DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "",
"Terminate this minibuffer argument.") "Terminate this minibuffer argument.")
() ()
{ {
Fthrow (Qexit, Qnil); return Fthrow (Qexit, Qnil);
} }
DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0, DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0,
......
...@@ -1527,7 +1527,7 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, ...@@ -1527,7 +1527,7 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt,
{ {
int direction = ((n > 0) ? 1 : -1); int direction = ((n > 0) ? 1 : -1);
register int dirlen; register int dirlen;
int infinity, limit, k, stride_for_teases; int infinity, limit, k, stride_for_teases = 0;
register int *BM_tab; register int *BM_tab;
int *BM_tab_base; int *BM_tab_base;
register unsigned char *cursor, *p_limit; register unsigned char *cursor, *p_limit;
...@@ -1536,8 +1536,8 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, ...@@ -1536,8 +1536,8 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt,
int multibyte = ! NILP (current_buffer->enable_multibyte_characters); int multibyte = ! NILP (current_buffer->enable_multibyte_characters);
unsigned char simple_translate[0400]; unsigned char simple_translate[0400];
int translate_prev_byte; int translate_prev_byte = 0;
int translate_anteprev_byte; int translate_anteprev_byte = 0;
#ifdef C_ALLOCA #ifdef C_ALLOCA
int BM_tab_space[0400]; int BM_tab_space[0400];
...@@ -2337,7 +2337,7 @@ since only regular expressions have distinguished subexpressions.") ...@@ -2337,7 +2337,7 @@ since only regular expressions have distinguished subexpressions.")
for (pos_byte = 0, pos = 0; pos_byte < length;) for (pos_byte = 0, pos = 0; pos_byte < length;)
{ {
int substart = -1; int substart = -1;
int subend; int subend = 0;
int delbackslash = 0; int delbackslash = 0;
FETCH_STRING_CHAR_ADVANCE (c, newtext, pos, pos_byte); FETCH_STRING_CHAR_ADVANCE (c, newtext, pos, pos_byte);
...@@ -2633,6 +2633,8 @@ to hold all the values, and if INTEGERS is non-nil, no consing is done.") ...@@ -2633,6 +2633,8 @@ to hold all the values, and if INTEGERS is non-nil, no consing is done.")
if (NILP (last_thing_searched)) if (NILP (last_thing_searched))
return Qnil; return Qnil;
prev = Qnil;
data = (Lisp_Object *) alloca ((2 * search_regs.num_regs) data = (Lisp_Object *) alloca ((2 * search_regs.num_regs)
* sizeof (Lisp_Object)); * sizeof (Lisp_Object));
......
...@@ -1146,7 +1146,7 @@ insert_glyphs (start, len) ...@@ -1146,7 +1146,7 @@ insert_glyphs (start, len)
register int len; register int len;
{ {
char *buf; char *buf;
struct glyph *glyph; struct glyph *glyph = NULL;
struct frame *f, *sf; struct frame *f, *sf;
if (len <= 0) if (len <= 0)
......
...@@ -1770,6 +1770,9 @@ window_loop (type, obj, mini, frames) ...@@ -1770,6 +1770,9 @@ window_loop (type, obj, mini, frames)
&& NILP (XBUFFER (w->buffer)->name)) && NILP (XBUFFER (w->buffer)->name))
abort (); abort ();
break; break;
case WINDOW_LOOP_UNUSED:
break;
} }
} }
...@@ -3476,6 +3479,8 @@ shrink_window_lowest_first (w, height) ...@@ -3476,6 +3479,8 @@ shrink_window_lowest_first (w, height)
Lisp_Object last_child; Lisp_Object last_child;
int delta = old_height - height; int delta = old_height - height;
int last_top; int last_top;
last_child = Qnil;
/* Find the last child. We are taking space from lowest windows /* Find the last child. We are taking space from lowest windows
first, so we iterate over children from the last child first, so we iterate over children from the last child
......
...@@ -691,11 +691,11 @@ cached information about equivalent key sequences.") ...@@ -691,11 +691,11 @@ cached information about equivalent key sequences.")
Lisp_Object position, menu; Lisp_Object position, menu;
{ {
Lisp_Object keymap, tem; Lisp_Object keymap, tem;
int xpos, ypos; int xpos = 0, ypos = 0;
Lisp_Object title; Lisp_Object title;
char *error_name; char *error_name;
Lisp_Object selection; Lisp_Object selection;
FRAME_PTR f; struct frame *f = NULL;
Lisp_Object x, y, window; Lisp_Object x, y, window;
int keymaps = 0; int keymaps = 0;
int for_click = 0; int for_click = 0;
...@@ -899,7 +899,7 @@ on the left of the dialog box and all following items on the right.\n\ ...@@ -899,7 +899,7 @@ on the left of the dialog box and all following items on the right.\n\
(position, contents) (position, contents)
Lisp_Object position, contents; Lisp_Object position, contents;
{ {
FRAME_PTR f; struct frame * f = NULL;
Lisp_Object window; Lisp_Object window;
check_x (); check_x ();
...@@ -1247,6 +1247,7 @@ menubar_selection_callback (widget, id, client_data) ...@@ -1247,6 +1247,7 @@ menubar_selection_callback (widget, id, client_data)
if (!f) if (!f)
return; return;
entry = Qnil;
subprefix_stack = (Lisp_Object *) alloca (f->menu_bar_items_used * sizeof (Lisp_Object)); subprefix_stack = (Lisp_Object *) alloca (f->menu_bar_items_used * sizeof (Lisp_Object));
vector = f->menu_bar_vector; vector = f->menu_bar_vector;
prefix = Qnil; prefix = Qnil;
...@@ -2233,7 +2234,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) ...@@ -2233,7 +2234,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
{ {
Lisp_Object prefix, entry; Lisp_Object prefix, entry;
prefix = Qnil; prefix = entry = Qnil;
i = 0; i = 0;
while (i < menu_items_used) while (i < menu_items_used)
{ {
......
...@@ -180,7 +180,7 @@ magic_file_p (string, string_len, class, escaped_suffix, suffix) ...@@ -180,7 +180,7 @@ magic_file_p (string, string_len, class, escaped_suffix, suffix)
while (p < string + string_len) while (p < string + string_len)
{ {
/* The chunk we're about to stick on the end of result. */ /* The chunk we're about to stick on the end of result. */
char *next; char *next = NULL;
int next_len; int next_len;
if (*p == '%') if (*p == '%')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment