Skip to content

Commit

Permalink
Avoid unreferenced formal parameter warning in get_range_offset_and_l…
Browse files Browse the repository at this point in the history
…ength (#1838)

Release builds result in the following warning because `content_length` param was used only inside asserts:

1> cpp-httplib\httplib.h(4933,45): warning C4100: 'content_length': unreferenced formal parameter
  • Loading branch information
pps83 committed May 17, 2024
1 parent 3b6597b commit 05f9f83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -4935,7 +4935,7 @@ get_range_offset_and_length(Range r, size_t content_length) {
assert(0 <= r.first && r.first < static_cast<ssize_t>(content_length));
assert(r.first <= r.second &&
r.second < static_cast<ssize_t>(content_length));

(void)(content_length);
return std::make_pair(r.first, static_cast<size_t>(r.second - r.first) + 1);
}

Expand Down

0 comments on commit 05f9f83

Please sign in to comment.