Fix format string warnings from gcc9. No functional change (I think!)
[valgrind.git] / tests / filter_libc
blob9607db56fd1381d41e1e2eabf4001a8acec7fac9
1 #! /usr/bin/perl -w
3 use strict;
5 while (<>)
7 s/ __getsockname / getsockname /;
8 s/ __sigaction / sigaction /;
9 s/ __GI___/ __/;
10 s/ __([a-z]*)_nocancel / $1 /;
12 # "lib[S|s]ystem*" occurs on Darwin, "libsocket" on older Solaris/illumos.
13 s/\(in \/.*(libc|libSystem|libsystem|libsocket).*\)$/(in \/...libc...)/;
14 s/\(within \/.*(libc|libSystem|libsystem|libsocket).*\)$/(within \/...libc...)/;
16 # Filter out dynamic loader
17 s/ \(in \/.*ld-.*so\)$//;
19 # Remove the filename -- on some platforms (eg. Linux) it will be in
20 # libc, on some (eg. Darwin) it will be in the main executable.
21 s/\(below main\) \(.+\)$/(below main)/;
23 # filter out the exact libc-start.c:### line number. (ppc64*)
24 s/\(libc-start.c:[0-9]*\)$/(in \/...libc...)/;
26 # Merge the different C++ operator variations.
27 s/(at.*)__builtin_new/$1...operator new.../;
28 s/(at.*)operator new\(unsigned(| int| long)\)/$1...operator new.../;
30 s/(at.*)__builtin_vec_new/$1...operator new.../;
31 s/(at.*)operator new\[\]\(unsigned(| int| long)\)/$1...operator new[].../;
33 s/(at.*)__builtin_delete/$1...operator delete.../;
34 s/(at.*)operator delete\(void\*(, unsigned(| int| long))?\)/$1...operator delete.../;
36 s/(at.*)__builtin_vec_delete/$1...operator delete[].../;
37 s/(at.*)operator delete\[\]\(void\*\)/$1...operator delete[].../;
39 # Some glibc versions complain about unexpected futex syscall errors.
40 s/The futex facility returned an unexpected error code.//;
42 print;
45 exit 0;