diff options
| author | Paul Eggert | 2014-09-10 17:48:57 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-09-10 17:48:57 -0700 |
| commit | b3ed13e84d591eeb2f0dde2e7c2558e7abcc66ca (patch) | |
| tree | 747ac2d7805b50b1c83be62888a367b2f13061e2 /src/frame.h | |
| parent | fe252976a18bf7bb66009fa80c1c6f02b124404f (diff) | |
| download | emacs-b3ed13e84d591eeb2f0dde2e7c2558e7abcc66ca.tar.gz emacs-b3ed13e84d591eeb2f0dde2e7c2558e7abcc66ca.zip | |
Pacify --enable-gcc-warnings when no window system is used.
These warnings found that subscript error, so they seem worthwhile.
* composite.c (char_composable_p): Simplify a bit.
* frame.c (x_set_frame_parameters): Add an IF_LINT.
* frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
* frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
* window.c (set_window_scroll_bars):
Use USE_HORIZONTAL_SCROLL_BARS for simplicity.
* frame.h [! USE_HORIZONTAL_SCROLL_BARS]:
Ignore -Wsuggest-attribute=const.
* window.h (USE_HORIZONTAL_SCROLL_BARS): New macro.
(WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it.
Diffstat (limited to 'src/frame.h')
| -rw-r--r-- | src/frame.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/frame.h b/src/frame.h index 0f34770d9b4..c942a9008fa 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -868,9 +868,7 @@ default_pixels_per_inch_y (void) | |||
| 868 | #endif /* HAVE_WINDOW_SYSTEM */ | 868 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 869 | 869 | ||
| 870 | /* Whether horizontal scroll bars are currently enabled for frame F. */ | 870 | /* Whether horizontal scroll bars are currently enabled for frame F. */ |
| 871 | #if (defined (HAVE_WINDOW_SYSTEM) \ | 871 | #if USE_HORIZONTAL_SCROLL_BARS |
| 872 | && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \ | ||
| 873 | || defined (HAVE_NTGUI))) | ||
| 874 | #define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \ | 872 | #define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \ |
| 875 | ((f)->horizontal_scroll_bars) | 873 | ((f)->horizontal_scroll_bars) |
| 876 | #else | 874 | #else |
| @@ -1501,4 +1499,11 @@ extern Lisp_Object make_monitor_attribute_list (struct MonitorInfo *monitors, | |||
| 1501 | 1499 | ||
| 1502 | INLINE_HEADER_END | 1500 | INLINE_HEADER_END |
| 1503 | 1501 | ||
| 1502 | /* Suppress -Wsuggest-attribute=const if there are no scroll bars. | ||
| 1503 | This is for functions like x_set_horizontal_scroll_bars that have | ||
| 1504 | no effect in this case. */ | ||
| 1505 | #if ! USE_HORIZONTAL_SCROLL_BARS && 4 < __GNUC__ + (6 <= __GNUC_MINOR__) | ||
| 1506 | # pragma GCC diagnostic ignored "-Wsuggest-attribute=const" | ||
| 1507 | #endif | ||
| 1508 | |||
| 1504 | #endif /* not EMACS_FRAME_H */ | 1509 | #endif /* not EMACS_FRAME_H */ |