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
This commit is contained in:
Quentin Mathe 2012-07-05 09:55:42 +00:00
parent 1744a7c18b
commit bb5d10108f
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2012-07-05 Quentin Mathe <quentin.mathe@gmail.com>
* 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 <rfm@gnu.org>
* Source/NSBundle.m: Attempted fix for bug #34191 ... change framework

View file

@ -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);\
}\