btest.c (test5): Replace #ifdef guard with 'unused' attribute to fix compile warning...
authorSam Thursfield <sam.thursfield@codethink.co.uk>
Wed, 8 Mar 2017 14:21:21 +0000 (14:21 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 8 Mar 2017 14:21:21 +0000 (14:21 +0000)
       * btest.c (test5): Replace #ifdef guard with 'unused' attribute
       to fix compile warning when BACKTRACE_SUPPORTED isn't defined.

From-SVN: r245977

libbacktrace/ChangeLog
libbacktrace/btest.c

index 64832850387014d0035fe25c1572b61c1ccbedff..25cd92119803b4ee419a9885d54138755ecfd8e3 100644 (file)
@@ -1,3 +1,8 @@
+2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
+
+       * btest.c (test5): Replace #ifdef guard with 'unused' attribute
+       to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
+
 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
 
        Update copyright years.
index e28a3d83d45229875f86e38813df7345f6474ff8..92cb325fdce0fe802f59ad82d16e2ca2d8bb011e 100644 (file)
@@ -616,7 +616,7 @@ f33 (int f1line, int f2line)
   return failures;
 }
 
-#if BACKTRACE_SUPPORTS_DATA
+static int test5 (void) __attribute__ ((unused));
 
 int global = 1;
 
@@ -686,8 +686,6 @@ test5 (void)
   return failures;
 }
 
-#endif /* BACKTRACE_SUPPORTS_DATA  */
-
 static void
 error_callback_create (void *data ATTRIBUTE_UNUSED, const char *msg,
                       int errnum)