diff options
| author | Eli Zaretskii | 2017-05-02 11:04:33 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-05-02 11:04:33 +0300 |
| commit | 5f75304f61d6533a8a8dcad1da3b5a223bceaa71 (patch) | |
| tree | a0179d2382703b0ae81434a93ec4b51a2c409e30 /src | |
| parent | 9c2b03fe3fc7695867d883f4918d74ba9a7c262e (diff) | |
| download | emacs-5f75304f61d6533a8a8dcad1da3b5a223bceaa71.tar.gz emacs-5f75304f61d6533a8a8dcad1da3b5a223bceaa71.zip | |
Avoid compilation warnings
* src/w32fns.c (Fx_file_dialog, w32_parse_and_hook_hot_key):
* src/w32term.c (x_draw_glyph_string):
* src/w32fns.c (compute_tip_xy):
* src/w32font.c (w32font_text_extents):
* src/w32menu.c (set_frame_menubar):
* src/search.c (Freplace_match): Avoid compiler warnings in
optimized builds.
Diffstat (limited to 'src')
| -rw-r--r-- | src/search.c | 2 | ||||
| -rw-r--r-- | src/w32fns.c | 8 | ||||
| -rw-r--r-- | src/w32font.c | 2 | ||||
| -rw-r--r-- | src/w32menu.c | 2 | ||||
| -rw-r--r-- | src/w32term.c | 6 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/search.c b/src/search.c index f5f9e46d5a3..1223cbf07cc 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -2630,7 +2630,7 @@ since only regular expressions have distinguished subexpressions. */) | |||
| 2630 | const unsigned char *add_stuff = NULL; | 2630 | const unsigned char *add_stuff = NULL; |
| 2631 | ptrdiff_t add_len = 0; | 2631 | ptrdiff_t add_len = 0; |
| 2632 | ptrdiff_t idx = -1; | 2632 | ptrdiff_t idx = -1; |
| 2633 | ptrdiff_t begbyte; | 2633 | ptrdiff_t begbyte UNINIT; |
| 2634 | 2634 | ||
| 2635 | if (str_multibyte) | 2635 | if (str_multibyte) |
| 2636 | { | 2636 | { |
diff --git a/src/w32fns.c b/src/w32fns.c index 311f9021c85..e490588d01b 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -7159,7 +7159,7 @@ compute_tip_xy (struct frame *f, | |||
| 7159 | int width, int height, int *root_x, int *root_y) | 7159 | int width, int height, int *root_x, int *root_y) |
| 7160 | { | 7160 | { |
| 7161 | Lisp_Object left, top, right, bottom; | 7161 | Lisp_Object left, top, right, bottom; |
| 7162 | int min_x, min_y, max_x, max_y; | 7162 | int min_x = 0, min_y, max_x = 0, max_y; |
| 7163 | 7163 | ||
| 7164 | /* User-specified position? */ | 7164 | /* User-specified position? */ |
| 7165 | left = Fcdr (Fassq (Qleft, parms)); | 7165 | left = Fcdr (Fassq (Qleft, parms)); |
| @@ -7777,7 +7777,7 @@ value of DIR as in previous invocations; this is standard Windows behavior. */) | |||
| 7777 | OPENFILENAMEA * file_details_a = &new_file_details_a.details; | 7777 | OPENFILENAMEA * file_details_a = &new_file_details_a.details; |
| 7778 | int use_unicode = w32_unicode_filenames; | 7778 | int use_unicode = w32_unicode_filenames; |
| 7779 | wchar_t *prompt_w; | 7779 | wchar_t *prompt_w; |
| 7780 | char *prompt_a; | 7780 | char *prompt_a UNINIT; |
| 7781 | int len; | 7781 | int len; |
| 7782 | char fname_ret[MAX_UTF8_PATH]; | 7782 | char fname_ret[MAX_UTF8_PATH]; |
| 7783 | #endif /* NTGUI_UNICODE */ | 7783 | #endif /* NTGUI_UNICODE */ |
| @@ -8505,8 +8505,8 @@ w32_parse_and_hook_hot_key (Lisp_Object key, int hook) | |||
| 8505 | { | 8505 | { |
| 8506 | /* Copied from Fdefine_key and store_in_keymap. */ | 8506 | /* Copied from Fdefine_key and store_in_keymap. */ |
| 8507 | register Lisp_Object c; | 8507 | register Lisp_Object c; |
| 8508 | int vk_code; | 8508 | int vk_code = 0; |
| 8509 | int lisp_modifiers; | 8509 | int lisp_modifiers = 0; |
| 8510 | int w32_modifiers; | 8510 | int w32_modifiers; |
| 8511 | Lisp_Object res = Qnil; | 8511 | Lisp_Object res = Qnil; |
| 8512 | char* vkname; | 8512 | char* vkname; |
diff --git a/src/w32font.c b/src/w32font.c index ef6eac44a68..67d2f6d666d 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -436,7 +436,7 @@ w32font_text_extents (struct font *font, unsigned *code, | |||
| 436 | int i; | 436 | int i; |
| 437 | HFONT old_font = NULL; | 437 | HFONT old_font = NULL; |
| 438 | HDC dc = NULL; | 438 | HDC dc = NULL; |
| 439 | struct frame * f; | 439 | struct frame * f UNINIT; |
| 440 | int total_width = 0; | 440 | int total_width = 0; |
| 441 | WORD *wcode; | 441 | WORD *wcode; |
| 442 | SIZE size; | 442 | SIZE size; |
diff --git a/src/w32menu.c b/src/w32menu.c index 7dae9de2966..de5c4b46b54 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -267,7 +267,7 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p) | |||
| 267 | HMENU menubar_widget = f->output_data.w32->menubar_widget; | 267 | HMENU menubar_widget = f->output_data.w32->menubar_widget; |
| 268 | Lisp_Object items; | 268 | Lisp_Object items; |
| 269 | widget_value *wv, *first_wv, *prev_wv = 0; | 269 | widget_value *wv, *first_wv, *prev_wv = 0; |
| 270 | int i, last_i; | 270 | int i, last_i = 0; |
| 271 | int *submenu_start, *submenu_end; | 271 | int *submenu_start, *submenu_end; |
| 272 | int *submenu_top_level_items, *submenu_n_panes; | 272 | int *submenu_top_level_items, *submenu_n_panes; |
| 273 | 273 | ||
diff --git a/src/w32term.c b/src/w32term.c index a2537e204d8..0f9dce9190c 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2454,7 +2454,7 @@ x_draw_glyph_string (struct glyph_string *s) | |||
| 2454 | thickness = font->underline_thickness; | 2454 | thickness = font->underline_thickness; |
| 2455 | else | 2455 | else |
| 2456 | thickness = 1; | 2456 | thickness = 1; |
| 2457 | if (x_underline_at_descent_line) | 2457 | if (x_underline_at_descent_line || !font) |
| 2458 | position = (s->height - thickness) - (s->ybase - s->y); | 2458 | position = (s->height - thickness) - (s->ybase - s->y); |
| 2459 | else | 2459 | else |
| 2460 | { | 2460 | { |
| @@ -2467,9 +2467,9 @@ x_draw_glyph_string (struct glyph_string *s) | |||
| 2467 | ROUND (x) = floor (x + 0.5) */ | 2467 | ROUND (x) = floor (x + 0.5) */ |
| 2468 | 2468 | ||
| 2469 | if (x_use_underline_position_properties | 2469 | if (x_use_underline_position_properties |
| 2470 | && font && font->underline_position >= 0) | 2470 | && font->underline_position >= 0) |
| 2471 | position = font->underline_position; | 2471 | position = font->underline_position; |
| 2472 | else if (font) | 2472 | else |
| 2473 | position = (font->descent + 1) / 2; | 2473 | position = (font->descent + 1) / 2; |
| 2474 | } | 2474 | } |
| 2475 | position = max (position, underline_minimum_offset); | 2475 | position = max (position, underline_minimum_offset); |