Skip to content

Commit 028c9d5

Browse files
committed
Fix another bunch of C4146 warnings
1 parent 1a9ce93 commit 028c9d5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/burp/backup.epp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ void compress(const UCHAR* data, ULONG length)
547547
{
548548
for (q = p + 2; q < end && (q[-2] != q[-1] || q[-1] != q[0]); q++)
549549
;
550-
ULONG run = (q < end) ? q - p - 2 : end - p;
550+
SLONG run = (q < end) ? q - p - 2 : end - p;
551551
if (run)
552552
{
553553
for (; run > 127; run -= 127)

src/dsql/WinNodes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ void FirstValueWinNode::aggInit(thread_db* tdbb, Request* request) const
432432

433433
dsc* FirstValueWinNode::winPass(thread_db* tdbb, Request* request, SlidingWindow* window) const
434434
{
435-
if (!window->moveWithinFrame(-(window->getRecordPosition() - window->getFrameStart())))
435+
if (!window->moveWithinFrame(-static_cast<SINT64>(window->getRecordPosition() - window->getFrameStart())))
436436
return NULL;
437437

438438
dsc* desc = EVL_expr(tdbb, request, arg);
@@ -583,7 +583,7 @@ dsc* NthValueWinNode::winPass(thread_db* tdbb, Request* request, SlidingWindow*
583583
const SLONG fromPos = desc ? MOV_get_long(tdbb, desc, 0) : FROM_FIRST;
584584

585585
if (fromPos == FROM_FIRST)
586-
records += -(window->getRecordPosition() - window->getFrameStart()) - 1;
586+
records += -static_cast<SINT64>(window->getRecordPosition() - window->getFrameStart()) - 1;
587587
else
588588
records = window->getFrameEnd() - window->getRecordPosition() - records + 1;
589589

0 commit comments

Comments
 (0)