bugGNUstep - Bugs: bug #39328, EOModelEditor: generated ObjC...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #39328: EOModelEditor: generated ObjC files cause warnings with clang

Submitted by:  Graham Lee <leeg>
Submitted on:  Sun 23 Jun 2013 04:21:15 PM UTC  
 
Category: gdl2Severity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Sebastian Reitenbach <buzzdee>
Open/Closed: Closed

Mon 12 Aug 2013 03:27:36 PM UTC, comment #1:

The patch got applied with svn rev: 36967

thanks

Sebastian Reitenbach <buzzdee>
Project MemberIn charge of this item.
Sun 23 Jun 2013 04:21:15 PM UTC, original submission:

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).

Graham Lee <leeg>

 

Attached Files
file #28392:  codegenerator.patch added by leeg (1kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by buzzdee (Posted a comment)
  • -unavailable- added by leeg (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 12 Aug 2013 03:27:36 PM UTCbuzzdeeStatusNone=>Fixed
      Assigned toNone=>buzzdee
      Open/ClosedOpen=>Closed
    Sun 23 Jun 2013 04:21:15 PM UTCleegAttached File-=>Added codegenerator.patch, #28392

    Back to the top


    Powered by Savane 3.1-cleanup