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.c | |
| 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.c')
| -rw-r--r-- | src/frame.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/frame.c b/src/frame.c index 7077d42dd1b..d0e585622e2 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -3002,7 +3002,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) | |||
| 3002 | /* If both of these parameters are present, it's more efficient to | 3002 | /* If both of these parameters are present, it's more efficient to |
| 3003 | set them both at once. So we wait until we've looked at the | 3003 | set them both at once. So we wait until we've looked at the |
| 3004 | entire list before we set them. */ | 3004 | entire list before we set them. */ |
| 3005 | int width, height; | 3005 | int width, height IF_LINT (= 0); |
| 3006 | bool width_change = 0, height_change = 0; | 3006 | bool width_change = 0, height_change = 0; |
| 3007 | 3007 | ||
| 3008 | /* Same here. */ | 3008 | /* Same here. */ |
| @@ -3771,9 +3771,7 @@ x_set_vertical_scroll_bars (struct frame *f, Lisp_Object arg, Lisp_Object oldval | |||
| 3771 | void | 3771 | void |
| 3772 | x_set_horizontal_scroll_bars (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | 3772 | x_set_horizontal_scroll_bars (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3773 | { | 3773 | { |
| 3774 | #if (defined (HAVE_WINDOW_SYSTEM) \ | 3774 | #if USE_HORIZONTAL_SCROLL_BARS |
| 3775 | && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \ | ||
| 3776 | || defined (HAVE_NTGUI))) | ||
| 3777 | if ((NILP (arg) && FRAME_HAS_HORIZONTAL_SCROLL_BARS (f)) | 3775 | if ((NILP (arg) && FRAME_HAS_HORIZONTAL_SCROLL_BARS (f)) |
| 3778 | || (!NILP (arg) && !FRAME_HAS_HORIZONTAL_SCROLL_BARS (f))) | 3776 | || (!NILP (arg) && !FRAME_HAS_HORIZONTAL_SCROLL_BARS (f))) |
| 3779 | { | 3777 | { |
| @@ -3823,9 +3821,7 @@ x_set_scroll_bar_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 3823 | void | 3821 | void |
| 3824 | x_set_scroll_bar_height (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | 3822 | x_set_scroll_bar_height (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3825 | { | 3823 | { |
| 3826 | #if (defined (HAVE_WINDOW_SYSTEM) \ | 3824 | #if USE_HORIZONTAL_SCROLL_BARS |
| 3827 | && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \ | ||
| 3828 | || defined (HAVE_NTGUI))) | ||
| 3829 | int unit = FRAME_LINE_HEIGHT (f); | 3825 | int unit = FRAME_LINE_HEIGHT (f); |
| 3830 | 3826 | ||
| 3831 | if (NILP (arg)) | 3827 | if (NILP (arg)) |