changeset 23937:00d78036f96b

only test for stupid code and reserved identifiers if there are any .c or .h files
author ivo
date Tue, 31 Jul 2007 07:55:22 +0000
parents c0b23a73d5f1
children 0239a594ec45
files TOOLS/checktree.sh
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/TOOLS/checktree.sh	Tue Jul 31 07:49:24 2007 +0000
+++ b/TOOLS/checktree.sh	Tue Jul 31 07:55:22 2007 +0000
@@ -332,7 +332,7 @@
 
 # -----------------------------------------------------------------------------
 
-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 @@
 
 # -----------------------------------------------------------------------------
 
-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 @@
 
     printhead "--> usage of -0"
     grep $_grepopts "[a-zA-Z0-9)]\+[ 	]*-[ 	]*0[^.0-9xa-fA-F_]" $chfilelist
-  fi
 fi
 
 # -----------------------------------------------------------------------------