summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-07-31 07:55:22 +0000
committerivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-07-31 07:55:22 +0000
commit446403aa3d3b1425c7216f50a584914bbce6ba17 (patch)
tree93cc7e87f3c7eba0335045ca32a0a0532032a38d /TOOLS
parentc5bf6bb1bdac55bb740d768afac903a222cf720c (diff)
downloadmpv-446403aa3d3b1425c7216f50a584914bbce6ba17.tar.bz2
mpv-446403aa3d3b1425c7216f50a584914bbce6ba17.tar.xz
only test for stupid code and reserved identifiers if there are any .c or .h
files git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23957 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/checktree.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/TOOLS/checktree.sh b/TOOLS/checktree.sh
index 3a2e79ed1c..80231c207e 100755
--- a/TOOLS/checktree.sh
+++ b/TOOLS/checktree.sh
@@ -332,7 +332,7 @@ fi
# -----------------------------------------------------------------------------
-if [ "$_res" = "yes" ]; then
+if [ "$_res" = "yes" -a -n "$chfilelist" ]; then
printhead "checking for reserved identifiers ..."
grep $_grepopts "#[ $TAB]*define[ $TAB]\+_[[:upper:]].*" $chfilelist
grep $_grepopts "#[ $TAB]*define[ $TAB]\+__.*" $chfilelist
@@ -357,10 +357,9 @@ fi
# -----------------------------------------------------------------------------
-if [ "$_stupid" = "yes" ]; then
+if [ "$_stupid" = "yes" -a -n "$chfilelist" ]; then
printhead "checking for stupid code ..."
- if [ -n "$chfilelist" ]; then
for i in calloc malloc realloc memalign av_malloc av_mallocz faad_malloc \
lzo_malloc safe_malloc mpeg2_malloc _ogg_malloc; do
printhead "--> casting of void* $i()"
@@ -395,7 +394,6 @@ if [ "$_stupid" = "yes" ]; then
printhead "--> usage of -0"
grep $_grepopts "[a-zA-Z0-9)]\+[ ]*-[ ]*0[^.0-9xa-fA-F_]" $chfilelist
- fi
fi
# -----------------------------------------------------------------------------