Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.6
    • Fix Version/s: 0.7
    • Component/s: C++ Client
    • Labels:
      None

      Activity

      Gordon Sim created issue -
      Gordon Sim made changes -
      Field Original Value New Value
      Status Open [ 1 ] Resolved [ 5 ]
      Resolution Fixed [ 1 ]
      Hide
      Chuck Rolke added a comment -

      This file has several instances of references with a 'const' issue on Solaris.
      The issue is solved for one instance in Uuid.cpp in
      http://mail-archives.apache.org/mod_mbox/qpid-commits/200911.mbox/%3C20091118061200.BD5E12388865@eris.apache.org%3E
      where const_cast is applied: const_cast<uint8_t*>(data)

      I propose adding a macro somewhere and a compile-time switch to control it:

      #ifdef SUNOS

      1. define UUID_DATA(X) const_cast<uint8_t*>((X))
        #else
      2. define UUID_DATA(X) (X)
        #endif

      Files types/Uuid.cpp and framing/Uuid.cpp would both use this scheme.
      Then Linux platforms all enjoy the benefits of const-ness while only
      Solaris loses const-ness.

      This applies to all compilers, SolStudio or g++ or whatever.
      -------
      Alternatively, the offending call sites could simply be changed
      to the const_cast<> and be done with it.

      Show
      Chuck Rolke added a comment - This file has several instances of references with a 'const' issue on Solaris. The issue is solved for one instance in Uuid.cpp in http://mail-archives.apache.org/mod_mbox/qpid-commits/200911.mbox/%3C20091118061200.BD5E12388865@eris.apache.org%3E where const_cast is applied: const_cast<uint8_t*>(data) I propose adding a macro somewhere and a compile-time switch to control it: #ifdef SUNOS define UUID_DATA(X) const_cast<uint8_t*>((X)) #else define UUID_DATA(X) (X) #endif Files types/Uuid.cpp and framing/Uuid.cpp would both use this scheme. Then Linux platforms all enjoy the benefits of const-ness while only Solaris loses const-ness. This applies to all compilers, SolStudio or g++ or whatever. ------- Alternatively, the offending call sites could simply be changed to the const_cast<> and be done with it.
      Hide
      Gordon Sim added a comment -

      It would be better to open a new JIRA for this sort of thing. That way the changes in any given release are more visible and obvious (e.g. compilation errors in Solaris fixed).

      Show
      Gordon Sim added a comment - It would be better to open a new JIRA for this sort of thing. That way the changes in any given release are more visible and obvious (e.g. compilation errors in Solaris fixed).
      Justin Ross made changes -
      Status Resolved [ 5 ] Closed [ 6 ]

        People

        • Assignee:
          Gordon Sim
          Reporter:
          Gordon Sim
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development