Browse Source

HPCC-18927 Fix compile problem on osx, and remove deprecated throws

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 7 years ago
parent
commit
551338126f

+ 6 - 6
esp/bindings/SOAP/xpp/sxt/XmlTokenizer.h

@@ -221,8 +221,8 @@ namespace sxt {
    *   such as readName() or isS().
    *   such as readName() or isS().
    *
    *
    */
    */
-   //int XmlTokenizer::next() throw(XmlTokenizerException) {
-   int next() throw(XmlTokenizerException) {
+   //int XmlTokenizer::next() {
+   int next() {
      if(state == STATE_FINISHED)
      if(state == STATE_FINISHED)
           return END_DOCUMENT;
           return END_DOCUMENT;
      parsedContent = false;
      parsedContent = false;
@@ -765,7 +765,7 @@ namespace sxt {
    * If it is last character set internal flag reachedEnd.
    * If it is last character set internal flag reachedEnd.
    * If there are no more characters throw XmlTokenizerException.
    * If there are no more characters throw XmlTokenizerException.
    */
    */
-    SXT_CHAR more() throw ( XmlTokenizerException ) {
+    SXT_CHAR more() {
       if(backtracking) {
       if(backtracking) {
         backtracking = false;
         backtracking = false;
         //++pos;
         //++pos;
@@ -846,7 +846,7 @@ namespace sxt {
      * Read name from input or throw exception ([4] NameChar, [5] Name).
      * Read name from input or throw exception ([4] NameChar, [5] Name).
      */
      */
     // TODO: make it fully complaint with XML spec
     // TODO: make it fully complaint with XML spec
-    char readName(char ch) throw (XmlTokenizerException) {
+    char readName(char ch) {
       posNsColon = -1;
       posNsColon = -1;
       nsColonCount = 0;
       nsColonCount = 0;
       if(!(ch >= 'A' && ch <= 'Z') && !(ch >= 'a' && ch <= 'z') 
       if(!(ch >= 'A' && ch <= 'Z') && !(ch >= 'a' && ch <= 'z') 
@@ -874,13 +874,13 @@ namespace sxt {
     }
     }
 
 
 
 
-    char skipS(char ch) throw (XmlTokenizerException) {
+    char skipS(char ch) {
       while(ch == ' ' || ch == '\n' || ch == '\t' || ch == '\r')
       while(ch == ' ' || ch == '\n' || ch == '\t' || ch == '\r')
         ch = more();
         ch = more();
       return ch;
       return ch;
     }
     }
 
 
-    char readS(char ch) throw (XmlTokenizerException) {
+    char readS(char ch) {
       if(!isS(ch))
       if(!isS(ch))
           throw XmlTokenizerException("expected white space not ",
           throw XmlTokenizerException("expected white space not ",
           ch, getPosDesc(), getLineNumber(), getColumnNumber());
           ch, getPosDesc(), getLineNumber(), getColumnNumber());

+ 1 - 1
plugins/cassandra/CMakeLists.txt

@@ -69,7 +69,7 @@ if(USE_CASSANDRA)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral") # Work around cassandra build error
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral") # Work around cassandra build error
     if (CMAKE_COMPILER_IS_GNUCXX)
     if (CMAKE_COMPILER_IS_GNUCXX)
         if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
         if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
-          set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wimplicit-fallthrough=0") # Work around cassandra build error
+          set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wimplicit-fallthrough=0 -Wno-maybe-uninitialized") # Work around cassandra build error
         endif ()
         endif ()
     endif ()
     endif ()
   endif()
   endif()

+ 2 - 2
system/jlib/jqueue.hpp

@@ -399,9 +399,9 @@ protected:
     std::atomic<int> activeWriters;
     std::atomic<int> activeWriters;
     std::atomic<bool> aborted;
     std::atomic<bool> aborted;
     Semaphore readers;
     Semaphore readers;
-    char readerPadding[CACHE_LINE_SIZE - sizeof(Semaphore)];
+    char readerPadding[CACHE_LINE_SIZE - (sizeof(Semaphore) % CACHE_LINE_SIZE)];
     Semaphore writers;
     Semaphore writers;
-    char writerPadding[CACHE_LINE_SIZE - sizeof(Semaphore)];
+    char writerPadding[CACHE_LINE_SIZE - (sizeof(Semaphore) % CACHE_LINE_SIZE)];
     //Ensure the state is not on the same cache line as anything else, especially anything that is modified.
     //Ensure the state is not on the same cache line as anything else, especially anything that is modified.
     std::atomic<state_t> state;
     std::atomic<state_t> state;
 };
 };