Skip to content

Commit

Permalink
lint(io_context): explicit unsigned immediate
Browse files Browse the repository at this point in the history
  • Loading branch information
Codesire-Deng committed Jan 8, 2024
1 parent 21e3d25 commit 166be5d
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/co_context/detail/worker_meta.cpp
Original file line number Diff line number Diff line change
@@ -127,7 +127,7 @@ void worker_meta::work_once() {
}

void worker_meta::check_submission_threshold() noexcept {
if constexpr (config::submission_threshold != -1) {
if constexpr (config::submission_threshold != -1U) {
if (requests_to_submit >= config::submission_threshold) {
[[maybe_unused]] int res = ring.submit_and_get_events();
assert(res >= 0 && "exception at uring::submit");
2 changes: 1 addition & 1 deletion lib/co_context/io_context.cpp
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ void io_context::do_worker_part() {
log::v("worker[%u] will run %u times...\n", id, num);
for (; num > 0; --num) {
worker.work_once();
if constexpr (config::submission_threshold != -1) {
if constexpr (config::submission_threshold != -1U) {
worker.check_submission_threshold();
}
}

0 comments on commit 166be5d

Please sign in to comment.