Skip to content
Snippets Groups Projects
Commit b6c265ec authored by Benoit Fouet's avatar Benoit Fouet
Browse files

Improve rule for possibly never read variables.

Originally committed as revision 23578 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent c404e783
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment