Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 52822df

Browse files
committed
Silence compiler warnings
1 parent 9db7bf7 commit 52822df

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

libsweep/src/sweep.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
// A threadsafe-queue to store and retrieve scans
1313
class ScanQueue {
1414
public:
15-
ScanQueue(int32_t max) : the_queue(), the_mutex(), the_cond_var() { max_size = max; }
15+
ScanQueue(int32_t max) : max_size(max), the_queue(), the_mutex(), the_cond_var() {}
1616

17-
// empty the queue
17+
// Empty the queue
1818
void flush() {
1919
std::unique_lock<std::mutex> lock(the_mutex);
2020
while (!the_queue.empty()) {
@@ -27,7 +27,7 @@ class ScanQueue {
2727
std::lock_guard<std::mutex> lock(the_mutex);
2828

2929
// if necessary, remove the oldest scan to make room for new
30-
if (the_queue.size() >= max_size)
30+
if (static_cast<int32_t>(the_queue.size()) >= max_size)
3131
the_queue.pop();
3232

3333
the_queue.push(scan);
@@ -285,6 +285,7 @@ sweep_scan_s sweep_device_get_scan(sweep_device_s device, sweep_error_s* error)
285285
SWEEP_ASSERT(device);
286286
SWEEP_ASSERT(error);
287287
SWEEP_ASSERT(device->is_scanning);
288+
(void)error;
288289

289290
auto out = device->scan_queue->dequeue();
290291
return out;
@@ -704,4 +705,4 @@ void sweep_device_attempt_set_motor_speed(sweep_device_s device, int32_t hz, swe
704705
default:
705706
break;
706707
}
707-
}
708+
}

0 commit comments

Comments
 (0)