Blame SOURCES/glibc-rh1505492-deprecated-2.patch

147e83
commit 0f88636c09686b1f8e876bfa88b40bacbcae8c11
147e83
Author: Joseph Myers <joseph@codesourcery.com>
147e83
Date:   Wed Dec 10 00:44:54 2014 +0000
147e83
147e83
    Disable -Wdeprecated-declarations for register_printf_function calls in tst-printfsz.c.
147e83
    
147e83
    This patch uses diagnostic control pragmas to disable warnings in
147e83
    stdio-common/tst-printfsz.c for use of the deprecated
147e83
    register_printf_function.  Because this test is testing printf_size
147e83
    and printf_size_info, and the latter has the interface expected for
147e83
    register_printf_function instead of the newer
147e83
    register_printf_specifier, it seems correct for this test to use the
147e83
    deprecated interface (wrapping printf_size_info in some way to use
147e83
    register_printf_specifier would seem an excessive change to what's
147e83
    tested).
147e83
    
147e83
    Tested for x86_64.
147e83
    
147e83
            * stdio-common/tst-printfsz.c: Include <libc-internal.h>.
147e83
            (main): Disable -Wdeprecated-declarations around calls to
147e83
            register_printf_function.
147e83
147e83
diff --git a/stdio-common/tst-printfsz.c b/stdio-common/tst-printfsz.c
147e83
index 5925050b59e90b79..74d67d2f694f344b 100644
147e83
--- a/stdio-common/tst-printfsz.c
147e83
+++ b/stdio-common/tst-printfsz.c
147e83
@@ -2,6 +2,7 @@
147e83
 #include <printf.h>
147e83
 #include <stdio.h>
147e83
 #include <string.h>
147e83
+#include <libc-internal.h>
147e83
 
147e83
 #define V       12345678.12345678
147e83
 
147e83
@@ -12,9 +13,15 @@ main (int argc, char *argv[])
147e83
   char buf[1024];
147e83
   int result = 0;
147e83
 
147e83
+  /* Testing printf_size_info requires using the deprecated
147e83
+     register_printf_function, resulting in warnings
147e83
+     "'register_printf_function' is deprecated".  */
147e83
+  DIAG_PUSH_NEEDS_COMMENT;
147e83
+  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
147e83
   /* Register the printf handlers.  */
147e83
   register_printf_function ('b', printf_size, printf_size_info);
147e83
   register_printf_function ('B', printf_size, printf_size_info);
147e83
+  DIAG_POP_NEEDS_COMMENT;
147e83
 
147e83
 
147e83
   sprintf (buf, "%g %b %B %.0b %.0B %.1b %.1B %8.0b %08.0B",