Przeglądaj źródła

HPCC-14854 Fix windows compile error and warnings

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 9 lat temu
rodzic
commit
0d2628bdae

+ 1 - 1
common/thorhelper/thorstrand.cpp

@@ -451,7 +451,7 @@ protected:
 class OrderedReadAheadQueue
 {
 public:
-    OrderedReadAheadQueue() : avail(0), space(1)
+    OrderedReadAheadQueue() : avail(0U), space(1U)
     {
     }
 

+ 3 - 3
system/jlib/jqueue.hpp

@@ -352,7 +352,7 @@ public:
         if (--activeWriters <= 0)
         {
             state_t curState = state.load(std::memory_order_acquire);
-            unsigned readersWaiting = (curState & readerMask) >> readerShift;
+            unsigned readersWaiting = (unsigned)((curState & readerMask) >> readerShift);
             readers.signal(readersWaiting);
         }
     }
@@ -361,8 +361,8 @@ public:
         //readers and writers may enqueue/dequeue another row before this takes effect
         aborted.store(true, std::memory_order_release);
         state_t curState = state.load(std::memory_order_acquire);
-        unsigned readersWaiting = (curState & readerMask) >> readerShift;
-        unsigned writersWaiting = (curState & writerMask) >> writerShift;
+        unsigned readersWaiting = (unsigned)((curState & readerMask) >> readerShift);
+        unsigned writersWaiting = (unsigned)((curState & writerMask) >> writerShift);
         readers.signal(readersWaiting);
         writers.signal(writersWaiting);
     }

+ 1 - 1
system/jlib/jthread.hpp

@@ -156,7 +156,7 @@ public:
 
 extern jlib_decl void asyncStart(IThreaded & threaded);
 extern jlib_decl void asyncStart(const char * name, IThreaded & threaded);
-#if defined(__cplusplus) and __cplusplus >= 201100
+#if defined(__cplusplus) && __cplusplus >= 201100
 extern jlib_decl void asyncStart(std::function<void()> func);
 #endif