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


You are not allowed to post comments on this tracker with your current authentication 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:  gdl2 Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned 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


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

[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 (1KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-12 buzzdee StatusNone => Fixed
        Assigned toNone => buzzdee
        Open/ClosedOpen => Closed
    2013-06-23 leeg Attached File- => Added codegenerator.patch, #28392

    Back to the top

    Powered by Savane 3.3