aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-09-21 20:54:57 +0000
committerGerd Moellmann2000-09-21 20:54:57 +0000
commit6bbd7a29592594e23e5cb98467e608f10b00f877 (patch)
tree1e60389bc0f5c349fc0a39b2609b1a60b084e133 /src
parent8179cccd88a3f114b0e4891c033ecd302dfb094e (diff)
downloademacs-6bbd7a29592594e23e5cb98467e608f10b00f877.tar.gz
emacs-6bbd7a29592594e23e5cb98467e608f10b00f877.zip
Avoid some more compiler warnings.
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c9
-rw-r--r--src/data.c6
-rw-r--r--src/dired.c6
-rw-r--r--src/emacs.c3
-rw-r--r--src/fileio.c7
-rw-r--r--src/indent.c6
-rw-r--r--src/insdel.c1
-rw-r--r--src/keymap.c12
-rw-r--r--src/macros.c1
-rw-r--r--src/minibuf.c19
-rw-r--r--src/search.c10
-rw-r--r--src/term.c2
-rw-r--r--src/window.c5
-rw-r--r--src/xmenu.c9
-rw-r--r--src/xrdb.c2
15 files changed, 62 insertions, 36 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 678bdfa4252..75466a787c7 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2934,6 +2934,9 @@ mark_maybe_object (obj)
2934 } 2934 }
2935 } 2935 }
2936 break; 2936 break;
2937
2938 case Lisp_Int:
2939 break;
2937 } 2940 }
2938 2941
2939 if (mark_p) 2942 if (mark_p)
@@ -3138,7 +3141,7 @@ static void
3138mark_stack () 3141mark_stack ()
3139{ 3142{
3140 jmp_buf j; 3143 jmp_buf j;
3141 int stack_grows_down_p = (char *) &j > (char *) stack_base; 3144 volatile int stack_grows_down_p = (char *) &j > (char *) stack_base;
3142 void *end; 3145 void *end;
3143 3146
3144 /* This trick flushes the register windows so that all the state of 3147 /* 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 } 3365 }
3363 else if (MARKERP (obj)) 3366 else if (MARKERP (obj))
3364 error ("Attempt to copy a marker to pure storage"); 3367 error ("Attempt to copy a marker to pure storage");
3365 else 3368
3366 return obj; 3369 return obj;
3367} 3370}
3368 3371
3369 3372
diff --git a/src/data.c b/src/data.c
index 0e393bf450d..c85e5485d69 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1751,6 +1751,8 @@ or a byte-code object. IDX starts at 0.")
1751 { 1751 {
1752 Lisp_Object val; 1752 Lisp_Object val;
1753 1753
1754 val = Qnil;
1755
1754 if (idxval < 0) 1756 if (idxval < 0)
1755 args_out_of_range (array, idx); 1757 args_out_of_range (array, idx);
1756 if (idxval < CHAR_TABLE_ORDINARY_SLOTS) 1758 if (idxval < CHAR_TABLE_ORDINARY_SLOTS)
@@ -1821,7 +1823,7 @@ or a byte-code object. IDX starts at 0.")
1821 } 1823 }
1822 else 1824 else
1823 { 1825 {
1824 int size; 1826 int size = 0;
1825 if (VECTORP (array)) 1827 if (VECTORP (array))
1826 size = XVECTOR (array)->size; 1828 size = XVECTOR (array)->size;
1827 else if (COMPILEDP (array)) 1829 else if (COMPILEDP (array))
@@ -2010,7 +2012,7 @@ arithcompare (num1, num2, comparison)
2010 Lisp_Object num1, num2; 2012 Lisp_Object num1, num2;
2011 enum comparison comparison; 2013 enum comparison comparison;
2012{ 2014{
2013 double f1, f2; 2015 double f1 = 0, f2 = 0;
2014 int floatp = 0; 2016 int floatp = 0;
2015 2017
2016 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num1, 0); 2018 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num1, 0);
diff --git a/src/dired.c b/src/dired.c
index bedda2a7f13..e0dce3ae46e 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -131,7 +131,7 @@ directory_files_internal (directory, full, match, nosort, attrs)
131 Lisp_Object list, name, dirfilename; 131 Lisp_Object list, name, dirfilename;
132 Lisp_Object encoded_directory; 132 Lisp_Object encoded_directory;
133 Lisp_Object handler; 133 Lisp_Object handler;
134 struct re_pattern_buffer *bufp; 134 struct re_pattern_buffer *bufp = NULL;
135 int needsep = 0; 135 int needsep = 0;
136 struct gcpro gcpro1, gcpro2; 136 struct gcpro gcpro1, gcpro2;
137 137
@@ -389,7 +389,7 @@ file_name_completion (file, dirname, all_flag, ver_flag)
389{ 389{
390 DIR *d; 390 DIR *d;
391 DIRENTRY *dp; 391 DIRENTRY *dp;
392 int bestmatchsize, skip; 392 int bestmatchsize = 0, skip;
393 register int compare, matchsize; 393 register int compare, matchsize;
394 unsigned char *p1, *p2; 394 unsigned char *p1, *p2;
395 int matchcount = 0; 395 int matchcount = 0;
@@ -402,6 +402,8 @@ file_name_completion (file, dirname, all_flag, ver_flag)
402 int count = specpdl_ptr - specpdl; 402 int count = specpdl_ptr - specpdl;
403 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; 403 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
404 404
405 elt = Qnil;
406
405#ifdef VMS 407#ifdef VMS
406 extern DIRENTRY * readdirver (); 408 extern DIRENTRY * readdirver ();
407 409
diff --git a/src/emacs.c b/src/emacs.c
index 47aadd866d8..9c2645f361f 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -604,7 +604,7 @@ argmatch (argv, argc, sstr, lstr, minlen, valptr, skipptr)
604 char **valptr; 604 char **valptr;
605 int *skipptr; 605 int *skipptr;
606{ 606{
607 char *p; 607 char *p = NULL;
608 int arglen; 608 int arglen;
609 char *arg; 609 char *arg;
610 610
@@ -1506,6 +1506,7 @@ main (argc, argv, envp)
1506 /* Enter editor command loop. This never returns. */ 1506 /* Enter editor command loop. This never returns. */
1507 Frecursive_edit (); 1507 Frecursive_edit ();
1508 /* NOTREACHED */ 1508 /* NOTREACHED */
1509 return 0;
1509} 1510}
1510 1511
1511/* Sort the args so we can find the most important ones 1512/* Sort the args so we can find the most important ones
diff --git a/src/fileio.c b/src/fileio.c
index b8c50d0f505..a07ea27b1de 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1973,7 +1973,7 @@ duplicates what `expand-file-name' does.")
1973 unsigned char *nm; 1973 unsigned char *nm;
1974 1974
1975 register unsigned char *s, *p, *o, *x, *endp; 1975 register unsigned char *s, *p, *o, *x, *endp;
1976 unsigned char *target; 1976 unsigned char *target = NULL;
1977 int total = 0; 1977 int total = 0;
1978 int substituted = 0; 1978 int substituted = 0;
1979 unsigned char *xnm; 1979 unsigned char *xnm;
@@ -2180,6 +2180,7 @@ duplicates what `expand-file-name' does.")
2180 2180
2181 /* NOTREACHED */ 2181 /* NOTREACHED */
2182#endif /* not VMS */ 2182#endif /* not VMS */
2183 return Qnil;
2183} 2184}
2184 2185
2185/* A slightly faster and more convenient way to get 2186/* A slightly faster and more convenient way to get
@@ -3421,7 +3422,7 @@ actually used.")
3421 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 3422 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
3422 Lisp_Object handler, val, insval, orig_filename; 3423 Lisp_Object handler, val, insval, orig_filename;
3423 Lisp_Object p; 3424 Lisp_Object p;
3424 int total; 3425 int total = 0;
3425 int not_regular = 0; 3426 int not_regular = 0;
3426 unsigned char read_buf[READ_BUF_SIZE]; 3427 unsigned char read_buf[READ_BUF_SIZE];
3427 struct coding_system coding; 3428 struct coding_system coding;
@@ -4397,7 +4398,7 @@ This does code conversion according to the value of\n\
4397{ 4398{
4398 register int desc; 4399 register int desc;
4399 int failure; 4400 int failure;
4400 int save_errno; 4401 int save_errno = 0;
4401 unsigned char *fn; 4402 unsigned char *fn;
4402 struct stat st; 4403 struct stat st;
4403 int tem; 4404 int tem;
diff --git a/src/indent.c b/src/indent.c
index 7a7be2fe301..f5f44d93c40 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -835,8 +835,8 @@ The return value is the current column.")
835 register int multibyte = !NILP (current_buffer->enable_multibyte_characters); 835 register int multibyte = !NILP (current_buffer->enable_multibyte_characters);
836 836
837 Lisp_Object val; 837 Lisp_Object val;
838 int prev_col; 838 int prev_col = 0;
839 int c; 839 int c = 0;
840 int next_boundary; 840 int next_boundary;
841 841
842 int pos_byte, end_byte, next_boundary_byte; 842 int pos_byte, end_byte, next_boundary_byte;
@@ -1053,7 +1053,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
1053 1053
1054 register int pos; 1054 register int pos;
1055 int pos_byte; 1055 int pos_byte;
1056 register int c; 1056 register int c = 0;
1057 register int tab_width = XFASTINT (current_buffer->tab_width); 1057 register int tab_width = XFASTINT (current_buffer->tab_width);
1058 register int ctl_arrow = !NILP (current_buffer->ctl_arrow); 1058 register int ctl_arrow = !NILP (current_buffer->ctl_arrow);
1059 register struct Lisp_Char_Table *dp = window_display_table (win); 1059 register struct Lisp_Char_Table *dp = window_display_table (win);
diff --git a/src/insdel.c b/src/insdel.c
index acc1d47395d..4229fb6abb5 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1347,6 +1347,7 @@ replace_range (from, to, new, prepare, inherit, markers)
1347 CHECK_MARKERS (); 1347 CHECK_MARKERS ();
1348 1348
1349 GCPRO1 (new); 1349 GCPRO1 (new);
1350 deletion = Qnil;
1350 1351
1351 if (prepare) 1352 if (prepare)
1352 { 1353 {
diff --git a/src/keymap.c b/src/keymap.c
index 26659410227..864c860db5c 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -269,8 +269,7 @@ get_keymap_1 (object, error, autoload)
269 end: 269 end:
270 if (error) 270 if (error)
271 wrong_type_argument (Qkeymapp, object); 271 wrong_type_argument (Qkeymapp, object);
272 else 272 return Qnil;
273 return Qnil;
274} 273}
275 274
276 275
@@ -1775,10 +1774,10 @@ spaces are put between sequence elements, etc.")
1775 (keys) 1774 (keys)
1776 Lisp_Object keys; 1775 Lisp_Object keys;
1777{ 1776{
1778 int len; 1777 int len = 0;
1779 int i, i_byte; 1778 int i, i_byte;
1780 Lisp_Object sep; 1779 Lisp_Object sep;
1781 Lisp_Object *args; 1780 Lisp_Object *args = NULL;
1782 1781
1783 if (STRINGP (keys)) 1782 if (STRINGP (keys))
1784 { 1783 {
@@ -2021,6 +2020,7 @@ around function keys and event symbols.")
2021 return Fcopy_sequence (key); 2020 return Fcopy_sequence (key);
2022 else 2021 else
2023 error ("KEY must be an integer, cons, symbol, or string"); 2022 error ("KEY must be an integer, cons, symbol, or string");
2023 return Qnil;
2024} 2024}
2025 2025
2026char * 2026char *
@@ -2846,6 +2846,8 @@ describe_map (map, keys, elt_describer, partial, shadow, seen, nomenu)
2846 int first = 1; 2846 int first = 1;
2847 struct gcpro gcpro1, gcpro2, gcpro3; 2847 struct gcpro gcpro1, gcpro2, gcpro3;
2848 2848
2849 suppress = Qnil;
2850
2849 if (!NILP (keys) && XFASTINT (Flength (keys)) > 0) 2851 if (!NILP (keys) && XFASTINT (Flength (keys)) > 0)
2850 { 2852 {
2851 /* Call Fkey_description first, to avoid GC bug for the other string. */ 2853 /* Call Fkey_description first, to avoid GC bug for the other string. */
@@ -3027,6 +3029,8 @@ describe_vector (vector, elt_prefix, elt_describer,
3027 int character; 3029 int character;
3028 int starting_i; 3030 int starting_i;
3029 3031
3032 suppress = Qnil;
3033
3030 if (indices == 0) 3034 if (indices == 0)
3031 indices = (int *) alloca (3 * sizeof (int)); 3035 indices = (int *) alloca (3 * sizeof (int));
3032 3036
diff --git a/src/macros.c b/src/macros.c
index 5c37f0daa3d..3c6e0b33edb 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -213,6 +213,7 @@ DEFUN ("cancel-kbd-macro-events", Fcancel_kbd_macro_events,
213 () 213 ()
214{ 214{
215 current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_end; 215 current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_end;
216 return Qnil;
216} 217}
217 218
218DEFUN ("store-kbd-macro-event", Fstore_kbd_macro_event, 219DEFUN ("store-kbd-macro-event", Fstore_kbd_macro_event,
diff --git a/src/minibuf.c b/src/minibuf.c
index 740f73cbd4e..8df082bc195 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -281,6 +281,7 @@ read_minibuf_noninteractive (map, initial, prompt, backup_n, expflag,
281 fprintf (stdout, "%s", XSTRING (prompt)->data); 281 fprintf (stdout, "%s", XSTRING (prompt)->data);
282 fflush (stdout); 282 fflush (stdout);
283 283
284 val = Qnil;
284 size = 100; 285 size = 100;
285 len = 0; 286 len = 0;
286 line = (char *) xmalloc (size * sizeof *line); 287 line = (char *) xmalloc (size * sizeof *line);
@@ -1046,11 +1047,11 @@ is used to further constrain the set of candidates.")
1046{ 1047{
1047 Lisp_Object bestmatch, tail, elt, eltstring; 1048 Lisp_Object bestmatch, tail, elt, eltstring;
1048 /* Size in bytes of BESTMATCH. */ 1049 /* Size in bytes of BESTMATCH. */
1049 int bestmatchsize; 1050 int bestmatchsize = 0;
1050 /* These are in bytes, too. */ 1051 /* These are in bytes, too. */
1051 int compare, matchsize; 1052 int compare, matchsize;
1052 int list = CONSP (alist) || NILP (alist); 1053 int list = CONSP (alist) || NILP (alist);
1053 int index, obsize; 1054 int index = 0, obsize = 0;
1054 int matchcount = 0; 1055 int matchcount = 0;
1055 Lisp_Object bucket, zero, end, tem; 1056 Lisp_Object bucket, zero, end, tem;
1056 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 1057 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
@@ -1059,7 +1060,7 @@ is used to further constrain the set of candidates.")
1059 if (!list && !VECTORP (alist)) 1060 if (!list && !VECTORP (alist))
1060 return call3 (alist, string, predicate, Qnil); 1061 return call3 (alist, string, predicate, Qnil);
1061 1062
1062 bestmatch = Qnil; 1063 bestmatch = bucket = Qnil;
1063 1064
1064 /* If ALIST is not a list, set TAIL just for gc pro. */ 1065 /* If ALIST is not a list, set TAIL just for gc pro. */
1065 tail = alist; 1066 tail = alist;
@@ -1299,7 +1300,7 @@ are ignored unless STRING itself starts with a space.")
1299 Lisp_Object tail, elt, eltstring; 1300 Lisp_Object tail, elt, eltstring;
1300 Lisp_Object allmatches; 1301 Lisp_Object allmatches;
1301 int list = CONSP (alist) || NILP (alist); 1302 int list = CONSP (alist) || NILP (alist);
1302 int index, obsize; 1303 int index = 0, obsize = 0;
1303 Lisp_Object bucket, tem; 1304 Lisp_Object bucket, tem;
1304 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 1305 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
1305 1306
@@ -1308,7 +1309,7 @@ are ignored unless STRING itself starts with a space.")
1308 { 1309 {
1309 return call3 (alist, string, predicate, Qt); 1310 return call3 (alist, string, predicate, Qt);
1310 } 1311 }
1311 allmatches = Qnil; 1312 allmatches = bucket = Qnil;
1312 1313
1313 /* If ALIST is not a list, set TAIL just for gc pro. */ 1314 /* If ALIST is not a list, set TAIL just for gc pro. */
1314 tail = alist; 1315 tail = alist;
@@ -1809,7 +1810,7 @@ a repetition of this command will exit.")
1809 return Qnil; 1810 return Qnil;
1810 } 1811 }
1811 exit: 1812 exit:
1812 Fthrow (Qexit, Qnil); 1813 return Fthrow (Qexit, Qnil);
1813 /* NOTREACHED */ 1814 /* NOTREACHED */
1814} 1815}
1815 1816
@@ -2028,6 +2029,8 @@ It can find the completion buffer in `standard-output'.")
2028 int length; 2029 int length;
2029 Lisp_Object startpos, endpos; 2030 Lisp_Object startpos, endpos;
2030 2031
2032 startpos = Qnil;
2033
2031 elt = Fcar (tail); 2034 elt = Fcar (tail);
2032 /* Compute the length of this element. */ 2035 /* Compute the length of this element. */
2033 if (CONSP (elt)) 2036 if (CONSP (elt))
@@ -2202,14 +2205,14 @@ DEFUN ("self-insert-and-exit", Fself_insert_and_exit, Sself_insert_and_exit, 0,
2202 else 2205 else
2203 bitch_at_user (); 2206 bitch_at_user ();
2204 2207
2205 Fthrow (Qexit, Qnil); 2208 return Fthrow (Qexit, Qnil);
2206} 2209}
2207 2210
2208DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "", 2211DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "",
2209 "Terminate this minibuffer argument.") 2212 "Terminate this minibuffer argument.")
2210 () 2213 ()
2211{ 2214{
2212 Fthrow (Qexit, Qnil); 2215 return Fthrow (Qexit, Qnil);
2213} 2216}
2214 2217
2215DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0, 2218DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0,
diff --git a/src/search.c b/src/search.c
index 3ba413ae8c2..48528bea121 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1527,7 +1527,7 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt,
1527{ 1527{
1528 int direction = ((n > 0) ? 1 : -1); 1528 int direction = ((n > 0) ? 1 : -1);
1529 register int dirlen; 1529 register int dirlen;
1530 int infinity, limit, k, stride_for_teases; 1530 int infinity, limit, k, stride_for_teases = 0;
1531 register int *BM_tab; 1531 register int *BM_tab;
1532 int *BM_tab_base; 1532 int *BM_tab_base;
1533 register unsigned char *cursor, *p_limit; 1533 register unsigned char *cursor, *p_limit;
@@ -1536,8 +1536,8 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt,
1536 int multibyte = ! NILP (current_buffer->enable_multibyte_characters); 1536 int multibyte = ! NILP (current_buffer->enable_multibyte_characters);
1537 1537
1538 unsigned char simple_translate[0400]; 1538 unsigned char simple_translate[0400];
1539 int translate_prev_byte; 1539 int translate_prev_byte = 0;
1540 int translate_anteprev_byte; 1540 int translate_anteprev_byte = 0;
1541 1541
1542#ifdef C_ALLOCA 1542#ifdef C_ALLOCA
1543 int BM_tab_space[0400]; 1543 int BM_tab_space[0400];
@@ -2337,7 +2337,7 @@ since only regular expressions have distinguished subexpressions.")
2337 for (pos_byte = 0, pos = 0; pos_byte < length;) 2337 for (pos_byte = 0, pos = 0; pos_byte < length;)
2338 { 2338 {
2339 int substart = -1; 2339 int substart = -1;
2340 int subend; 2340 int subend = 0;
2341 int delbackslash = 0; 2341 int delbackslash = 0;
2342 2342
2343 FETCH_STRING_CHAR_ADVANCE (c, newtext, pos, pos_byte); 2343 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 if (NILP (last_thing_searched)) 2633 if (NILP (last_thing_searched))
2634 return Qnil; 2634 return Qnil;
2635 2635
2636 prev = Qnil;
2637
2636 data = (Lisp_Object *) alloca ((2 * search_regs.num_regs) 2638 data = (Lisp_Object *) alloca ((2 * search_regs.num_regs)
2637 * sizeof (Lisp_Object)); 2639 * sizeof (Lisp_Object));
2638 2640
diff --git a/src/term.c b/src/term.c
index 07e633fec62..e704f0db0bb 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1146,7 +1146,7 @@ insert_glyphs (start, len)
1146 register int len; 1146 register int len;
1147{ 1147{
1148 char *buf; 1148 char *buf;
1149 struct glyph *glyph; 1149 struct glyph *glyph = NULL;
1150 struct frame *f, *sf; 1150 struct frame *f, *sf;
1151 1151
1152 if (len <= 0) 1152 if (len <= 0)
diff --git a/src/window.c b/src/window.c
index d9c807ccf93..6cdf2943e60 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1770,6 +1770,9 @@ window_loop (type, obj, mini, frames)
1770 && NILP (XBUFFER (w->buffer)->name)) 1770 && NILP (XBUFFER (w->buffer)->name))
1771 abort (); 1771 abort ();
1772 break; 1772 break;
1773
1774 case WINDOW_LOOP_UNUSED:
1775 break;
1773 } 1776 }
1774 } 1777 }
1775 1778
@@ -3476,6 +3479,8 @@ shrink_window_lowest_first (w, height)
3476 Lisp_Object last_child; 3479 Lisp_Object last_child;
3477 int delta = old_height - height; 3480 int delta = old_height - height;
3478 int last_top; 3481 int last_top;
3482
3483 last_child = Qnil;
3479 3484
3480 /* Find the last child. We are taking space from lowest windows 3485 /* Find the last child. We are taking space from lowest windows
3481 first, so we iterate over children from the last child 3486 first, so we iterate over children from the last child
diff --git a/src/xmenu.c b/src/xmenu.c
index 07e050018f8..fa7c352cc88 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -691,11 +691,11 @@ cached information about equivalent key sequences.")
691 Lisp_Object position, menu; 691 Lisp_Object position, menu;
692{ 692{
693 Lisp_Object keymap, tem; 693 Lisp_Object keymap, tem;
694 int xpos, ypos; 694 int xpos = 0, ypos = 0;
695 Lisp_Object title; 695 Lisp_Object title;
696 char *error_name; 696 char *error_name;
697 Lisp_Object selection; 697 Lisp_Object selection;
698 FRAME_PTR f; 698 struct frame *f = NULL;
699 Lisp_Object x, y, window; 699 Lisp_Object x, y, window;
700 int keymaps = 0; 700 int keymaps = 0;
701 int for_click = 0; 701 int for_click = 0;
@@ -899,7 +899,7 @@ on the left of the dialog box and all following items on the right.\n\
899 (position, contents) 899 (position, contents)
900 Lisp_Object position, contents; 900 Lisp_Object position, contents;
901{ 901{
902 FRAME_PTR f; 902 struct frame * f = NULL;
903 Lisp_Object window; 903 Lisp_Object window;
904 904
905 check_x (); 905 check_x ();
@@ -1247,6 +1247,7 @@ menubar_selection_callback (widget, id, client_data)
1247 1247
1248 if (!f) 1248 if (!f)
1249 return; 1249 return;
1250 entry = Qnil;
1250 subprefix_stack = (Lisp_Object *) alloca (f->menu_bar_items_used * sizeof (Lisp_Object)); 1251 subprefix_stack = (Lisp_Object *) alloca (f->menu_bar_items_used * sizeof (Lisp_Object));
1251 vector = f->menu_bar_vector; 1252 vector = f->menu_bar_vector;
1252 prefix = Qnil; 1253 prefix = Qnil;
@@ -2233,7 +2234,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
2233 { 2234 {
2234 Lisp_Object prefix, entry; 2235 Lisp_Object prefix, entry;
2235 2236
2236 prefix = Qnil; 2237 prefix = entry = Qnil;
2237 i = 0; 2238 i = 0;
2238 while (i < menu_items_used) 2239 while (i < menu_items_used)
2239 { 2240 {
diff --git a/src/xrdb.c b/src/xrdb.c
index 82603c75fed..830610945a1 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -180,7 +180,7 @@ magic_file_p (string, string_len, class, escaped_suffix, suffix)
180 while (p < string + string_len) 180 while (p < string + string_len)
181 { 181 {
182 /* The chunk we're about to stick on the end of result. */ 182 /* The chunk we're about to stick on the end of result. */
183 char *next; 183 char *next = NULL;
184 int next_len; 184 int next_len;
185 185
186 if (*p == '%') 186 if (*p == '%')