PR c++/11990:
[deliverable/binutils-gdb.git] / gdb / macroexp.c
index 22b904e624950ed35b97215072553fdd95f3236c..d88dac366a7832a59478937d5ca83fa0842e2913 100644 (file)
@@ -1,5 +1,5 @@
 /* C preprocessor macro expansion for GDB.
-   Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 2002-2013 Free Software Foundation, Inc.
    Contributed by Red Hat, Inc.
 
    This file is part of GDB.
@@ -337,7 +337,6 @@ get_character_constant (struct macro_buffer *tok, char *p, char *end)
          && p[1] == '\''))
     {
       char *tok_start = p;
-      char *body_start;
       int char_count = 0;
 
       if (*p == '\'')
@@ -347,7 +346,6 @@ get_character_constant (struct macro_buffer *tok, char *p, char *end)
       else
         gdb_assert_not_reached ("unexpected character constant");
 
-      body_start = p;
       for (;;)
         {
           if (p >= end)
@@ -700,10 +698,10 @@ macro_stringify (const char *str)
 {
   struct macro_buffer buffer;
   int len = strlen (str);
-  char *result;
 
   init_buffer (&buffer, len);
   stringify (&buffer, str, len);
+  appendc (&buffer, '\0');
 
   return free_buffer_return_text (&buffer);
 }
This page took 0.024522 seconds and 4 git commands to generate.