#298 int to pointer cast error on Xcode 5.1

v1.1.3
closed
Václav Zeman
5
2014-04-02
2014-03-25
Maxym
No

Hi!

I have build issue on Mac - Xcode 5.1 doesn't cast integers to pointers anymore. So, in single threaded build the line below doesn't compile:
mtx (LOG4CPLUS_THREADED (new impl::Mutex (t)) + 0)
I propose to replace LOG4CPLUS_THREADED macro here and in few others places with the one with two parameters - for single threaded and multi threaded cases:
mtx (LOG4CPLUS_THREADED2 (new impl::Mutex (t), nullptr))

See diff in the attachment for include/log4cplus/thread/syncprims-pub-impl.h.

Discussion

  • Václav Zeman
    Václav Zeman
    2014-03-25

    • assigned_to: Václav Zeman
     
  • Václav Zeman
    Václav Zeman
    2014-03-25

    There is nothing attached to this ticket.

     
  • Václav Zeman
    Václav Zeman
    2014-04-02

    • labels: --> xcode, macosx, v1.1.3, build
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,8 +1,8 @@
     Hi!
    
     I have build issue on Mac - Xcode 5.1 doesn't cast integers to pointers anymore. So, in single threaded build the line below doesn't compile:
    -mtx (LOG4CPLUS_THREADED (new impl::Mutex (t)) + 0)
    +`mtx (LOG4CPLUS_THREADED (new impl::Mutex (t)) + 0)`
     I propose to replace LOG4CPLUS_THREADED macro here and in few others places with the one with two parameters - for single threaded and multi threaded cases:
    -mtx (LOG4CPLUS_THREADED2 (new impl::Mutex (t), nullptr))
    +`mtx (LOG4CPLUS_THREADED2 (new impl::Mutex (t), nullptr))`
    
     See diff in the attachment for include/log4cplus/thread/syncprims-pub-impl.h.
    
     
  • Václav Zeman
    Václav Zeman
    2014-04-02

    • labels: xcode, macosx, v1.1.3, build --> xcode, macosx, v1.1.3, build, fixed
    • status: open --> closed