From 6aa1f800fa5e0217271ce7dc69d0bf0a63fad035 Mon Sep 17 00:00:00 2001 From: Sean McBride <sean@rogue-research.com> Date: Thu, 18 Sep 2014 12:06:38 -0400 Subject: [PATCH] SystemInformation: Fix clang -Wtautological-pointer-compare warning warning: comparison of array 'unameInfo.release' not equal to a null pointer is always true [-Wtautological-pointer-compare] if( unameInfo.release!=0 && strlen(unameInfo.release)>=3 ) ~~~~~~~~~~^~~~~~~ ~ Indeed an array declared as 'char foo[x]' can never be NULL. Removed check against null. Change-Id: I0352ad50049d926e78b9ecc796493e898b1bfdb7 --- SystemInformation.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SystemInformation.cxx b/SystemInformation.cxx index 2521aac..f9248f0 100644 --- a/SystemInformation.cxx +++ b/SystemInformation.cxx @@ -3786,7 +3786,7 @@ bool SystemInformationImplementation::QueryLinuxMemory() return false; } - if( unameInfo.release!=0 && strlen(unameInfo.release)>=3 ) + if( strlen(unameInfo.release)>=3 ) { // release looks like "2.6.3-15mdk-i686-up-4GB" char majorChar=unameInfo.release[0]; -- GitLab