In debug mode, avoid showing gcc QA search strings in the trace, so they won't
authorZac Medico <zmedico@gentoo.org>
Tue, 8 Sep 2009 01:44:24 +0000 (01:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 8 Sep 2009 01:44:24 +0000 (01:44 -0000)
trigger false positives. Thanks to Amit Dor-Shifer <amitds@oversi.com> for
reporting.

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

bin/misc-functions.sh

index 8a38da8582b721149a4b00df99df94791c5ed468..eee66eaa188093e940ee28de1d0d871e58eb64ba 100755 (executable)
@@ -408,6 +408,9 @@ 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.
+               [[ $PORTAGE_DEBUG = 1 ]] && set +x
                local m msgs=(
                        ": warning: dereferencing type-punned pointer will break strict-aliasing rules$"
                        ": warning: dereferencing pointer .* does break strict-aliasing rules$"
@@ -417,6 +420,7 @@ install_qa_check() {
                        ": warning: comparisons like X<=Y<=Z do not have their mathematical meaning$"
                        ": warning: null argument where non-null required "
                )
+               [[ $PORTAGE_DEBUG = 1 ]] && set -x
                abort="no"
                i=0
                while [[ -n ${msgs[${i}]} ]] ; do