Fix false positives in gcc QA with debug mode some more. Thanks again to
authorZac Medico <zmedico@gentoo.org>
Tue, 8 Sep 2009 09:11:35 +0000 (09:11 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 8 Sep 2009 09:11:35 +0000 (09:11 -0000)
Amit Dor-Shifer <amitds@oversi.com> for reporting.

svn path=/main/trunk/; revision=14218

bin/misc-functions.sh

index 93d5eca6d865e713e5179b3bdb1527730b465972..0249063c575a43c181bf62540c20fd6e84379426 100755 (executable)
@@ -408,8 +408,8 @@ install_qa_check() {
 
        # Evaluate misc gcc warnings
        if [[ -n ${PORTAGE_LOG_FILE} && -r ${PORTAGE_LOG_FILE} ]] ; then
-               # In debug mode, this variable definition will produce
-               # a false positive if it's shown in the trace.
+               # In debug mode, this variable definition and corresponding grep calls
+               # will produce false positives if they're shown in the trace.
                local reset_debug=0
                if [[ ${-/x/} != $- ]] ; then
                        set +x
@@ -424,7 +424,6 @@ install_qa_check() {
                        ": warning: comparisons like X<=Y<=Z do not have their mathematical meaning$"
                        ": warning: null argument where non-null required "
                )
-               [[ $reset_debug = 1 ]] && set -x
                abort="no"
                i=0
                while [[ -n ${msgs[${i}]} ]] ; do
@@ -440,6 +439,7 @@ install_qa_check() {
                                abort="yes"
                        fi
                done
+               [[ $reset_debug = 1 ]] && set -x
                f=$(cat "${PORTAGE_LOG_FILE}" | \
                        "$PORTAGE_BIN_PATH"/check-implicit-pointer-usage.py)
                if [[ -n ${f} ]] ; then