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

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