]> git.eshelyaron.com Git - emacs.git/commitdiff
* scroll.c (CHECK_BOUNDS): #define only if GLYPH_DEBUG.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 27 Feb 2011 07:50:33 +0000 (23:50 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 27 Feb 2011 07:50:33 +0000 (23:50 -0800)
This avoids a gcc warning in some configurations.

src/ChangeLog
src/scroll.c

index 5c5bd61d0618b02f7c9e4719841e13c796a74798..1929c3fc98a8daadcd1b5eac3dcc8e5fbf2e8f3c 100644 (file)
@@ -1,5 +1,8 @@
 2011-02-27  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * scroll.c (CHECK_BOUNDS): #define only if GLYPH_DEBUG.
+       This avoids a gcc warning in some configurations.
+
        * frame.c (x_set_screen_gamma): Rename local to avoid shadowing.
 
        * frame.h: Avoid gcc -Wmissing-prototypes diagnostics.
index 08ae83eeee8036efda52e627b7027d145131f572..1343b89c41e2d2755df361cd561ee4f748076c42 100644 (file)
@@ -262,7 +262,8 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct m
   for (k = 0; k < window_size; ++k)
     copy_from[k] = -1;
 
-#define CHECK_BOUNDS                                                   \
+#if GLYPH_DEBUG
+# define CHECK_BOUNDS                                                  \
   do                                                                   \
     {                                                                  \
       int k;                                                           \
@@ -271,6 +272,7 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct m
                 || (copy_from[k] >= 0 && copy_from[k] < window_size)); \
     }                                                                  \
   while (0);
+#endif
 
   /* When j is advanced, this corresponds to deleted lines.
      When i is advanced, this corresponds to inserted lines.  */
@@ -1035,4 +1037,3 @@ do_line_insertion_deletion_costs (FRAME_PTR frame,
                 FRAME_DELETE_COST (frame), FRAME_DELETEN_COST (frame),
                 coefficient);
 }
-