blob: 935c7e1fb43d5fb56fab561244e614834d3448f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#! /bin/sh
# Complain about unused statistics fields.
t=__wt.$$
trap 'rm -f $t' 0 1 2 3 13 15
# List of files to search: skip stat.c, it lists all of the fields by
# definition.
l=`sed \
-e '/src\/support\/stat.c/d' \
-e '/^[a-z]/!d' \
-e 's/[ ].*$//' \
-e 's,^,../,' filelist`
l="$l `echo ../src/include/*.i ../src/include/os.h`"
(
# Get the list of statistics fields.
search=`sed \
-e 's/^ int64_t \([a-z_*]*\);$/\1/p' \
-e d ../src/include/stat.h |
sort`
echo "$search"
fgrep -who "$search" $l) | sort | uniq -u > $t
test -s $t && {
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
echo 'unused statistics fields'
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
cat $t
exit 1
}
exit 0
|