Skip to content

Commit 05f9f83

Browse files
authored
Avoid unreferenced formal parameter warning in get_range_offset_and_length (yhirose#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
1 parent 3b6597b commit 05f9f83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httplib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4935,7 +4935,7 @@ get_range_offset_and_length(Range r, size_t content_length) {
49354935
assert(0 <= r.first && r.first < static_cast<ssize_t>(content_length));
49364936
assert(r.first <= r.second &&
49374937
r.second < static_cast<ssize_t>(content_length));
4938-
4938+
(void)(content_length);
49394939
return std::make_pair(r.first, static_cast<size_t>(r.second - r.first) + 1);
49404940
}
49414941

0 commit comments

Comments
 (0)