]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix bootstrapping with --disable-checking
authorDodji Seketeli <dodji@redhat.com>
Mon, 17 Oct 2011 14:01:37 +0000 (14:01 +0000)
committerDodji Seketeli <dodji@gcc.gnu.org>
Mon, 17 Oct 2011 14:01:37 +0000 (16:01 +0200)
libcpp/ChangeLog

* line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
variable without using it if ENABLE_CHECKING is not defined.  Mark
the LOCATION parameter as being unused.

From-SVN: r180090

libcpp/ChangeLog
libcpp/line-map.c

index 375072003affde1cfe46936c4e93b7e375666a78..c81c9676e7606ee72f3162f3ad6a1414995e3965 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-17  Dodji Seketeli  <dodji@redhat.com>
+
+       * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a
+       variable without using it if ENABLE_CHECKING is not defined.  Mark
+       the LOCATION parameter as being unused.
+
 2011-10-15  Tom Tromey  <tromey@redhat.com>
            Dodji Seketeli  <dodji@redhat.com>
 
index 87b8bfe8a0f63e742e3687d5500bf268383f2e70..43e28565770bbb42b72d9b1e047a59d3c55b6c1a 100644 (file)
@@ -621,18 +621,16 @@ linemap_macro_expansion_map_p (const struct line_map *map)
    Read the comments of struct line_map and struct line_map_macro in
    line-map.h to understand what a macro expansion point is.  */
 
-source_location
+static source_location
 linemap_macro_map_loc_to_exp_point (const struct line_map *map,
-                                   source_location location)
+                                   source_location location ATTRIBUTE_UNUSED)
 {
-  unsigned token_no;
-
   linemap_assert (linemap_macro_expansion_map_p (map)
                  && location >= MAP_START_LOCATION (map));
 
   /* Make sure LOCATION is correct.  */
-  token_no = location - MAP_START_LOCATION (map);
-  linemap_assert (token_no <  MACRO_MAP_NUM_MACRO_TOKENS (map));
+  linemap_assert ((location - MAP_START_LOCATION (map))
+                 <  MACRO_MAP_NUM_MACRO_TOKENS (map));
 
   return MACRO_MAP_EXPANSION_POINT_LOCATION (map);
 }