currentTime returns random result if used in user program
---------------------------------------------------------

                 Key: THRIFT-69
                 URL: https://issues.apache.org/jira/browse/THRIFT-69
             Project: Thrift
          Issue Type: Bug
            Reporter: Alexander Shigin
            Priority: Minor
         Attachments: thrift-current-time-fix.patch

There is a problem in concurrency/Util.h 

The problem is implementation of currentTime routine:
#if defined(HAVE_CLOCK_GETTIME)
...
#elif defined(HAVE_GETTIMEOFDAY)
...
#end

HAVE_* defines placed in config.h, but installed version of thrift hasn't got 
the config.h.

For example make -f Makefile.stress, gcc complains: 
../../lib/cpp/src/concurrency/Util.h:104: warning: 'result' is used 
uninitialized in this function

I think the only way to resolve it is to move the function to .cpp file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to