[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #39328] EOModelEditor: generated ObjC files cause warnings with cla
From: |
Graham Lee |
Subject: |
[bug #39328] EOModelEditor: generated ObjC files cause warnings with clang |
Date: |
Sun, 23 Jun 2013 16:21:16 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1 |
URL:
<http://savannah.gnu.org/bugs/?39328>
Summary: EOModelEditor: generated ObjC files cause warnings
with clang
Project: GNUstep
Submitted by: leeg
Submitted on: Sun 23 Jun 2013 04:21:15 PM GMT
Category: gdl2
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Specifically the setters have too many parentheses in their test:
- (void) setPersonName:(NSString *) aValue
{
if ((_personName == aValue)) {
return;
}
[self willChange];
ASSIGN(_personName, aValue);
}
Clang, when used to build a gsw app containing this file, complains thus:
_Person.m:36:20: warning: equality comparison with extraneous parentheses
[-Wparentheses-equality]
if ((_personName == aValue)) {
~~~~~~~~~~~~^~~~~~~~~
_Person.m:36:20: note: remove extraneous parentheses around the comparison to
silence this warning
if ((_personName == aValue)) {
~ ^ ~
_Person.m:36:20: note: use '=' to turn this equality comparison into an
assignment
if ((_personName == aValue)) {
^~
=
The attached patch simply removes one set of parentheses (I suppose a
different approach would be to use -isEqual: for non-primitive tests, which
would short-cut the "like for like" path in assignment).
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sun 23 Jun 2013 04:21:15 PM GMT Name: codegenerator.patch Size: 1kB
By: leeg
<http://savannah.gnu.org/bugs/download.php?file_id=28392>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?39328>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #39328] EOModelEditor: generated ObjC files cause warnings with clang,
Graham Lee <=