• Paul Eggert's avatar
    Port --enable-gcc-warnings to GCC 6.1 · 374f6a5f
    Paul Eggert authored
    * configure.ac (WERROR_CFLAGS): Omit -Wunused-const-variable=2.
    * lib-src/etags.c (LOOKING_AT, LOOKING_AT_NOCASE):
    Omit test whether pointer plus a constant equals a null pointer.
    * src/alloc.c (compact_small_strings):
    Avoid pointer arithmetic on null pointers.
    * src/alloc.c (mark_face_cache):
    * src/fontset.c (free_realized_fontsets, Fset_fontset_font):
    * src/fringe.c (draw_fringe_bitmap_1)
    (Fset_fringe_bitmap_face):
    * src/macfont.m (macfont_draw):
    * src/msdos.c (IT_set_face, IT_clear_screen):
    * src/nsfont.m (nsfont_draw):
    * src/nsterm.h (FRAME_DEFAULT_FACE):
    * src/nsterm.m (ns_draw_window_cursor)
    (ns_draw_vertical_window_border, ns_draw_window_divider)
    (ns_dumpglyphs_box_or_relief)
    (ns_maybe_dumpglyphs_background, ns_dumpglyphs_image)
    (ns_dumpglyphs_stretch):
    * src/w32term.c (w32_draw_vertical_window_border)
    (w32_draw_window_divider, x_set_mouse_face_gc):
    * src/xdisp.c (estimate_mode_line_height, init_iterator)
    (handle_face_prop, handle_single_display_spec, pop_it)
    (CHAR_COMPOSED_P, get_next_display_element)
    (next_element_from_display_vector, extend_face_to_end_of_line)
    (fill_gstring_glyph_string,BUILD_COMPOSITE_GLYPH_STRING):
    * src/xfaces.c (Finternal_merge_in_global_face, Fface_font)
    (lookup_named_face):
    * src/xterm.c (x_draw_vertical_window_border)
    (x_draw_window_divider, x_set_mouse_face_gc):
    Prefer FACE_OPT_FROM_ID to FACE_FROM_ID when the result might be null.
    * src/xterm.c (try_window_id):
    Redo loop to convince GCC 6.1 that it is null pointer safe.
    (x_color_cells):
    Use eassume as necessary to pacify GCC 6.1.
    * src/dispextern.h (FACE_FROM_ID, IMAGE_FROM_ID): Now returns non-null.
    (FACE_OPT_FROM_ID, IMAGE_OPT_FROM_ID): New macro, with the old
    behavior of the non-_OPT macro, to be used when the result
    might be a null pointer.
    * src/dispnew.c (buffer_posn_from_coords, marginal_area_string)
    [HAVE_WINDOW_SYSTEM]:
    * src/intervals.h (INTERVAL_WRITABLE_P):
    * src/term.c (turn_off_face):
    * src/xdisp.c (get_glyph_face_and_encoding, fill_image_glyph_string)
    (produce_image_glyph, produce_xwidget_glyph):
    * src/xfaces.c (lookup_named_face):
    Remove unnecessary test for null pointer.
    * src/keyboard.c (read_char): Suppress bogus -Wclobbered warning.
    * src/process.c (would_block): New function.
    (server_accept_connection, wait_reading_process_output, send_process):
    Use it.
    * src/xdisp.c (get_window_cursor_type, note_mouse_highlight):
    Prefer IMAGE_OPT_FROM_ID to IMAGE_FROM_ID when the result
    might be null.
    374f6a5f
term.c 127 KB