[cfe-commits] r56110 - /cfe/trunk/utils/scan-build
Ted Kremenek
kremenek at apple.com
Thu Sep 11 11:17:52 PDT 2008
Author: kremenek
Date: Thu Sep 11 13:17:51 2008
New Revision: 56110
URL: http://llvm.org/viewvc/llvm-project?rev=56110&view=rev
Log:
Check if the environment variable TERM is defined before using it.
This fixes: <rdar://problem/6164279> scan-build gives error when invoked without TERM variable
Modified:
cfe/trunk/utils/scan-build
Modified: cfe/trunk/utils/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/scan-build?rev=56110&r1=56109&r2=56110&view=diff
==============================================================================
--- cfe/trunk/utils/scan-build (original)
+++ cfe/trunk/utils/scan-build Thu Sep 11 13:17:51 2008
@@ -26,8 +26,9 @@
my $BuildDate;
my $CXX; # Leave undefined initially.
-my $UseColor = ((($ENV{'TERM'} eq 'xterm-color') and -t STDOUT)
- and defined($ENV{'SCAN_BUILD_COLOR'}));
+my $TERM = $ENV{'TERM'};
+my $UseColor = (defined $TERM and $TERM eq 'xterm-color' and -t STDOUT
+ and defined $ENV{'SCAN_BUILD_COLOR'});
##----------------------------------------------------------------------------##
# Diagnostics
More information about the cfe-commits
mailing list