Wed Dec 1 21:47:59 2004

Ticket #474 (Closed: fixed)

compiler warning at modules/core/src/AudioClip.cxx:108


Priority: normal Reporter: maroy
Severity: minor Assigned to: fgerlits
Component:   Status: closed
Version:   Resolution: fixed
Milestone:   Keywords:  

Description by maroy:

src/AudioClip?.cxx: In member function `virtual void LiveSupport::Core::AudioClip?::configure(const xmlpp::Element&)': src/AudioClip?.cxx:108: warning: suggest parentheses around assignment used as truth value

Attachments

Changelog

Wed Dec 1 21:48:11 2004: Modified by maroy

  • status changed from new to assigned
  • owner changed from anonymous to fgerlits

Thu Dec 2 11:27:41 2004: Modified by fgerlits

    It protesteth too much. What it wants me to do is to change if (x = someMethod()) { ... } to if ((x = someMethod())) { ... } Do you really want me to change that?

    Fri Dec 3 13:47:55 2004: Modified by fgerlits

    • resolution set to fixed
    • status changed from assigned to closed

    OK, I put the extra parentheses in. My idea of clarity seems to differ from gcc's, though.

    Fri Dec 3 13:56:36 2004: Modified by maroy

      the extra parenthesis here is to clearly mark your intent. compare if (x = someMethod()) { ... } with if (x == someMethod()) { ... } it's a very easy and common mistake to mistype == to =, and thus change the effect of the code totally. with the extra parenthesis you clearly mark that what you mean is an assignment, not a comparison.


      Add/Change #474 (compiler warning at modules/core/src/AudioClip.cxx:108)




      Change Properties






      Action