From: Benoit Fouet Date: Fri, 11 Jun 2010 08:58:40 +0000 (+0000) Subject: Improve rule for possibly never read variables. X-Git-Tag: v0.7b1~3799 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6c265ec2bfc37a34b58a80af38b876c2500d0a8;p=platform%2Fupstream%2Flibav.git Improve rule for possibly never read variables. Originally committed as revision 23578 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/tools/patcheck b/tools/patcheck index a6923c4..62ad086 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