Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-3

Missing #else

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.10.0
    • Build
    • None
    • SGI Irix

    Description

      In file thread.cpp the function Thread::InterlockedIncrement is missing an #else directive:

      -------------------------- from Thread.cpp------------------------------
      #elif defined(HAVE_MS_THREAD)
      #if _MSC_VER == 1200 // MSDEV 6
      return ::InterlockedDecrement((long *)val);
      #else
      return ::InterlockedDecrement(val);
      #endif // _MSC_VER
      #else /****** Without this line the function does not return a value
      return *val - 1; // unsafe
      #endif
      ------------------------------------------------------------------------

      Also: should not the #else case be
      return --(*val) ?
      As it stands now *val is left unchanged...

      Similarly for function Thread::InterlockedDecrement.

      Attachments

        Activity

          People

            carnold@apache.org Curt Arnold
            ingekr Inge K. Eliassen
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: