[FFmpeg-devel] [PATCH] Try to add some ways variables can be read in patcheck.

Benoit Fouet benoit.fouet
Thu Jun 10 17:56:38 CEST 2010


In if statement for instance, a variable is read when compared, or'd, and'd...
---
 tools/patcheck |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/patcheck b/tools/patcheck
index a6923c4..0ebfd43 100755
--- a/tools/patcheck
+++ b/tools/patcheck
@@ -112,7 +112,7 @@ for i in \
     ; do
     echo $i | grep '^NULL$' && continue
     egrep $i' *(\+|-|\*|/|\||&|%|)=[^=]' $* >/dev/null || echo "possibly never written:"$i >> $TMP
-    egrep '(=|\(|return).*'$i'[^=]*$'    $* >/dev/null || echo "possibly never read   :"$i >> $TMP
+    egrep '(=|\(|return).*'$i'(( *(&*|\|*|==))|[^=])*$'    $* >/dev/null || echo "possibly never read   :"$i >> $TMP
     egrep -o $i' *((\+|-|\*|/|\||&|%|)=[^=]|\+\+|--) *(0x|)[0-9]*(;|)'   $* |\
            egrep -v $i' *= *(0x|)[0-9]{1,};'>/dev/null || echo "possibly constant     :"$i >> $TMP
 done
-- 
1.7.1.251.g92a7




More information about the ffmpeg-devel mailing list