]> code.delx.au - gnu-emacs/commitdiff
Fix minor problems found by static checking.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Nov 2011 18:29:29 +0000 (10:29 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Nov 2011 18:29:29 +0000 (10:29 -0800)
* dispextern.h, xdisp.c (row_hash): Declare extern only if XASSERTS.
* dispnew.c (verify_row_hash): Now static.

src/ChangeLog
src/dispextern.h
src/dispnew.c
src/xdisp.c

index 1bb4a6a59935a33e20271525e87618010e611225..76986f60c16b953dccb8c70852c88ecce82def85 100644 (file)
@@ -1,3 +1,9 @@
+2011-11-18  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix minor problems found by static checking.
+       * dispextern.h, xdisp.c (row_hash): Declare extern only if XASSERTS.
+       * dispnew.c (verify_row_hash): Now static.
+
 2011-11-18  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
index 486aa4f7a407c85196f7f6bb0daed0d84ce37eea..48dd374f3c5276ade73d3c65b9ea8b38c10b37bc 100644 (file)
@@ -3127,7 +3127,9 @@ void w32_init_fringe (struct redisplay_interface *);
 void w32_reset_fringes (void);
 #endif
 
+#if XASSERTS
 extern unsigned row_hash (struct glyph_row *);
+#endif
 
 /* Defined in image.c */
 
index d6bf6666ee20e2d93016bf5f8bb33eaac85bce3c..e4868a237d2ab043506368d213dcdd5302a5225b 100644 (file)
@@ -431,7 +431,7 @@ margin_glyphs_to_reserve (struct window *w, int total_glyphs, Lisp_Object margin
 
 #if XASSERTS
 /* Return non-zero if ROW's hash value is correct, zero if not.  */
-int
+static int
 verify_row_hash (struct glyph_row *row)
 {
   return row->hash == row_hash (row);
index ae19e11565bb8ceb2d5158aa7e94f9b37cb8221c..65e2c1e4f001a16eee3223da8e496a0d6fab7a98 100644 (file)
@@ -17950,6 +17950,9 @@ insert_left_trunc_glyphs (struct it *it)
 }
 
 /* Compute the hash code for ROW.  */
+#if !XASSERTS
+static
+#endif
 unsigned
 row_hash (struct glyph_row *row)
 {