Skip to content

Commit 46c6bd1

Browse files
committed
ipa: rpi: sync: Fix some compiler warnings
Fix clang compiler warnings about signed/unsigned comparison and stray semicolons. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
1 parent e72ebf8 commit 46c6bd1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ipa/rpi/controller/rpi/sync.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ void Sync::process([[maybe_unused]] StatisticsPtr &stats, Metadata *imageMetadat
260260
int64_t clientFrameTimestampNearest = clientFrameTimestamp - framePeriodErrors * frameDurationEstimated_;
261261
/* We must shorten a single client frame by this amount if it exceeds the minimum: */
262262
int32_t correction = clientFrameTimestampNearest - serverFrameTimestamp;
263-
if (std::abs(correction) < minAdjustment_)
263+
if (static_cast<uint32_t>(std::abs(correction)) < minAdjustment_)
264264
correction = 0;
265265

266266
LOG(RPiSync, Debug) << "Received packet (frameNumber " << frameCount_ << "):";
@@ -314,12 +314,12 @@ void Sync::setMode(Mode mode)
314314
void Sync::setFrameDuration(libcamera::utils::Duration frameDuration)
315315
{
316316
frameDuration_ = frameDuration;
317-
};
317+
}
318318

319319
void Sync::setReadyFrame(unsigned int frame)
320320
{
321321
readyFrame_ = frame;
322-
};
322+
}
323323

324324
/* Register algorithm with the system. */
325325
static Algorithm *create(Controller *controller)

0 commit comments

Comments
 (0)