From 286f8d6f2c9d94565b8e289986148c1a1d226f9e Mon Sep 17 00:00:00 2001 From: qmathe Date: Thu, 5 Jul 2012 09:55:42 +0000 Subject: [PATCH] Fixed constant string comparison error reported by Clang r158230 or more recent git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35255 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSPathUtilities.m | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38d529018..7c7d5394b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-07-05 Quentin Mathe + + * Source/NSPathUtilities.m: Fixed constant string comparison error + reported by Clang SVN trunk r158230 or more recent. + See http://llvm.org/viewvc/llvm-project?view=rev&revision=158230 + 2012-07-02 Richard Frith-Macdonald * Source/NSBundle.m: Attempted fix for bug #34191 ... change framework diff --git a/Source/NSPathUtilities.m b/Source/NSPathUtilities.m index e33e2642e..e7443f157 100644 --- a/Source/NSPathUtilities.m +++ b/Source/NSPathUtilities.m @@ -269,9 +269,11 @@ static void ShutdownPathUtilities(void); }\ }) -/* Conditionally assign lval to var only if var is nil */ +/* Conditionally assign lval to var only if var is nil + +lval must be casted because Clang disallows ObjC literals comparison */ #define TEST_ASSIGN(var, lval) ({\ - if ((var == nil)&&(lval != nil))\ + if ((var == nil)&&((NSString *)lval != nil))\ {\ var = RETAIN(lval);\ }\