From 05f9f83240a388239c088f067a1e3e6af2a7bf51 Mon Sep 17 00:00:00 2001 From: Pavel P Date: Fri, 17 May 2024 05:56:06 +0500 Subject: [PATCH] Avoid unreferenced formal parameter warning in get_range_offset_and_length (#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 --- httplib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index c7449cd..ba6e666 100644 --- a/httplib.h +++ b/httplib.h @@ -4935,7 +4935,7 @@ get_range_offset_and_length(Range r, size_t content_length) { assert(0 <= r.first && r.first < static_cast(content_length)); assert(r.first <= r.second && r.second < static_cast(content_length)); - + (void)(content_length); return std::make_pair(r.first, static_cast(r.second - r.first) + 1); }