]> git.eshelyaron.com Git - emacs.git/commitdiff
* dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 24 Sep 2013 15:29:27 +0000 (08:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 24 Sep 2013 15:29:27 +0000 (08:29 -0700)
instead of ints, as it's the usual style for offsetof constants.  See:
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html

src/ChangeLog
src/dispnew.c

index 90ffce575f95c57c9d627bacbe90e9b49a0ee12a..3f0c4196afd659b006dd418d4a89659eb30e45f8 100644 (file)
@@ -1,5 +1,9 @@
 2013-09-24  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
+       instead of ints, as it's the usual style for offsetof constants.  See:
+       http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
+
        * data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
        This is ugly, but it should fix the performance problem for older
        GCC versions in the short run.  I'll look into integrating the
index f9132f37f68593be6be7574216ad64eaf00b6104..27167f4e1e466e7f57597bfc863e051e97a3d3c6 100644 (file)
@@ -838,7 +838,7 @@ clear_window_matrices (struct window *w, bool desired_p)
 void
 clear_glyph_row (struct glyph_row *row)
 {
-  int off = offsetof (struct glyph_row, used);
+  enum { off = offsetof (struct glyph_row, used) };
 
   /* Zero everything except pointers in `glyphs'.  */
   memset (row->used, 0, sizeof *row - off);
@@ -988,7 +988,7 @@ swap_glyph_pointers (struct glyph_row *a, struct glyph_row *b)
 static void
 copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from)
 {
-  int off = offsetof (struct glyph_row, x);
+  enum { off = offsetof (struct glyph_row, x) };
 
   memcpy (&to->x, &from->x, sizeof *to - off);
 }