]> code.delx.au - gnu-emacs/blobdiff - src/frame.h
Pacify --enable-gcc-warnings when no window system is used.
[gnu-emacs] / src / frame.h
index 0f34770d9b43f688693084939e4be64fe63d0f9f..c942a9008fae001ef87fe5c87ce7341cb9d56786 100644 (file)
@@ -868,9 +868,7 @@ default_pixels_per_inch_y (void)
 #endif /* HAVE_WINDOW_SYSTEM */
 
 /* Whether horizontal scroll bars are currently enabled for frame F.  */
-#if (defined (HAVE_WINDOW_SYSTEM)                                      \
-     && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS))     \
-        || defined (HAVE_NTGUI)))
+#if USE_HORIZONTAL_SCROLL_BARS
 #define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \
   ((f)->horizontal_scroll_bars)
 #else
@@ -1501,4 +1499,11 @@ extern Lisp_Object make_monitor_attribute_list (struct MonitorInfo *monitors,
 
 INLINE_HEADER_END
 
+/* Suppress -Wsuggest-attribute=const if there are no scroll bars.
+   This is for functions like x_set_horizontal_scroll_bars that have
+   no effect in this case.  */
+#if ! USE_HORIZONTAL_SCROLL_BARS && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
+#endif
+
 #endif /* not EMACS_FRAME_H */