summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-27 12:56:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:40 -0500
commite3dcc92deef81972a6f38bdbab75256d3d038357 (patch)
tree7a100f7fb1379a3b5ab8b0d9fc0d70613cf255d3 /source4/script
parent81045abddc359ffad3a20c9661ad7439e592166d (diff)
downloadsamba-e3dcc92deef81972a6f38bdbab75256d3d038357.tar.gz
samba-e3dcc92deef81972a6f38bdbab75256d3d038357.tar.bz2
samba-e3dcc92deef81972a6f38bdbab75256d3d038357.zip
r9684: Remove unused parameters (about 70)
(This used to be commit 4a51a31571d12078e3c2c78641c0c844fc26925d)
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/find_unused_options.sh17
1 files changed, 6 insertions, 11 deletions
diff --git a/source4/script/find_unused_options.sh b/source4/script/find_unused_options.sh
index d5c9f7ed99..d554580959 100755
--- a/source4/script/find_unused_options.sh
+++ b/source4/script/find_unused_options.sh
@@ -11,17 +11,15 @@ LIST_GLOBAL=`grep '^FN_GLOBAL' param/loadparm.c |sed -e's/^FN_GLOBAL.*(\(.*\).*,
LIST_LOCAL=`grep '^FN_LOCAL' param/loadparm.c |sed -e's/^FN_LOCAL.*(\(.*\).*,[ ]*\(.*\)).*/\1:\2/'`
+CFILES=`find . -name "*.c"`
+
for i in $LIST_GLOBAL;do
key=`echo $i|cut -d ':' -f1`
val=`echo $i|cut -d ':' -f2`
- found=`grep "$key[ ]*()" */*.c`
-
- if test -z "$found"; then
- found=`grep "$key[ ]*()" */*/*.c`
- if test -z "$found"; then
+ found=`grep "$key[ ]*()" $CFILES`
+ if test -z "$found"; then
echo "Not Used Global: $key() -> $val"
- fi
fi
done
@@ -29,13 +27,10 @@ for i in $LIST_LOCAL;do
key=`echo $i|cut -d ':' -f1`
val=`echo $i|cut -d ':' -f2`
- found=`grep "$key[ ]*(" */*.c`
+ found=`grep "$key[ ]*(" $CFILES`
- if test -z "$found"; then
- found=`grep "$key[ ]*(" */*/*.c`
- if test -z "$found"; then
+ if test -z "$found"; then
echo "Not Used LOCAL: $key() -> $val"
- fi
fi
done