diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-03 08:18:46 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-03 08:19:16 +0200 |
commit | baba1d14766282bd2c592bffd79ed69f9078cfe1 (patch) | |
tree | 1bfec5b5e19c275b3cd085f94c8d0c567c26fed5 /bin | |
parent | d97cc94a02c00b912bbcb430cde55ce0cfb0292c (diff) |
tdf#93068 - UI: Crash when Character dialogue opened
Change-Id: I92a9e6f27ef649c9d7501df55287c95c4d796156
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/find-unused-defines.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/find-unused-defines.sh b/bin/find-unused-defines.sh index bd03cdcfa075..6f31ec47393e 100755 --- a/bin/find-unused-defines.sh +++ b/bin/find-unused-defines.sh @@ -16,11 +16,15 @@ # (6) use awk to to check if only one match for a given constant was found # (7) if so, generate a sed command to remove the #define # -git grep -hP '^#define\s+\w+.*\\' -- "[!e][!x][!t]*" \ - | sed -r 's/#define[ ]+([a-zA-Z0-9_]+).*/\1/' \ +( git grep -hP '^\w*#define\s+\w+.*\\' -- "[!e][!x][!t]*" \ + && \ + git grep -hP '^\w*#define\s+\w+\s*$' -- "[!e][!x][!t]*" ) \ + | grep -v '_idl' \ + | grep -vE '^INCLUDED_' \ + | sed -r 's/[ ]*#define[ ]+([a-zA-Z0-9_]+).*/\1/' \ | sort \ | uniq \ - | xargs -Ixxx sh -c \ + | xargs -Ixxx -n 1 -P 8 sh -c \ "git grep -w 'xxx' | awk -f bin/find-unused-defines.awk -v p1=xxx && echo \"xxx\" 1>&2" |