Skip to content

Commit cfeb371

Browse files
committed
more clang fixes
Signed-off-by: Gavin Halliday <[email protected]>
1 parent 9f16829 commit cfeb371

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

roxie/roxiemem/roxiemem.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -7054,7 +7054,7 @@ class SimpleRowBuffer : implements IBufferedRowCallback
70547054
};
70557055

70567056
// A row buffer which does not allocate memory for the row array from roxiemem
7057-
class TestingRowBuffer : implements IBufferedRowCallback
7057+
class TestingRowBuffer final : implements IBufferedRowCallback
70587058
{
70597059
public:
70607060
TestingRowBuffer(unsigned _cost, unsigned _id) : cost(_cost), id(_id)
@@ -7136,7 +7136,7 @@ class CallbackBlockAllocator : implements IBufferedRowCallback
71367136

71377137

71387138
//Free the block as soon as requested
7139-
class SimpleCallbackBlockAllocator : public CallbackBlockAllocator
7139+
class SimpleCallbackBlockAllocator final : public CallbackBlockAllocator
71407140
{
71417141
public:
71427142
SimpleCallbackBlockAllocator(IRowManager * _rowManager, memsize_t _size, unsigned _cost, unsigned _id)
@@ -7154,7 +7154,7 @@ class SimpleCallbackBlockAllocator : public CallbackBlockAllocator
71547154
};
71557155

71567156
//Allocate another row before disposing of the first
7157-
class NastyCallbackBlockAllocator : public CallbackBlockAllocator
7157+
class NastyCallbackBlockAllocator final : public CallbackBlockAllocator
71587158
{
71597159
public:
71607160
NastyCallbackBlockAllocator(IRowManager * _rowManager, unsigned _size, unsigned _cost, unsigned _id)

system/jlib/jevent.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ constexpr size32_t getSizeOfAttr(T arg)
329329

330330
constexpr size32_t getSizeOfAttr(const char * arg)
331331
{
332-
return sizeof(EventAttr) + strlen(arg) + 1;
332+
//strlen is a constexpr in gcc, but not in clang
333+
return sizeof(EventAttr) + std::char_traits<char>::length(arg) + 1;
333334
}
334335

335336
template<typename... Args>
@@ -433,7 +434,7 @@ void EventRecorder::writeEventHeader(EventType type, offset_type & offset)
433434
}
434435
if (options & ERFthreadid)
435436
{
436-
__uint64 threadId = GetCurrentThreadId();
437+
__uint64 threadId = (__uint64)GetCurrentThreadId();
437438
write(offset, threadId);
438439
}
439440
}

0 commit comments

Comments
 (0)