Skip to content
Snippets Groups Projects
Commit 37106e40 authored by scott snyder's avatar scott snyder
Browse files

JiveXMLServer: Fix gcc8 warnings.

Suppress a warning that originates from a problem with the xdr headers.

Catching polymorphic exception by value.
parent 1966aa79
No related branches found
No related tags found
No related merge requests found
......@@ -125,7 +125,15 @@ namespace JiveXML {
// Now issue the call with a timeout
struct timeval timeout; timeout.tv_sec = 1; timeout.tv_usec = 0;
// xdr_void is defined inconsistently in xdr.h and gets a warning from gcc8.
#if __GNUC__ >= 8
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wcast-function-type"
#endif
clnt_call(client, NULLPROC, (xdrproc_t)xdr_void, NULL, (xdrproc_t)xdr_void, NULL, timeout);
#if __GNUC__ >= 8
# pragma GCC diagnostic pop
#endif
// A pointer to the return value of the thread
void* ret = NULL;
......@@ -238,7 +246,7 @@ namespace JiveXML {
//Now add the new event
m_eventStreamMap.insert(EventStreamPair(evtStreamID,event));
} catch ( std::exception e ) {
} catch ( const std::exception& e ) {
ERS_ERROR("Exception caught while updating event for stream "
<< evtStreamID.StreamName() << ": " << e.what());
//Also release the lock in this case
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment