-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llvm16-libcxx: warns example build #325
Comments
will clean it later. |
could you build with latest code? |
using: Cmd:
Using the same setting in both tools results the same output. OutputIn file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:8:
In file included from example/../include/cinatra/coro_http_client.hpp:22:
include/async_simple/coro/FutureAwaiter.h:32:41: warning: unused parameter 't' [-Wunused-parameter]
32 | [continuation](Try<T>&& t) mutable { continuation.resume(); });
| ^
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:8:
In file included from example/../include/cinatra/coro_http_client.hpp:25:
In file included from example/../include/cinatra/http_parser.hpp:12:
example/../include/cinatra/url_encode_decode.hpp:103:29: warning: 'codecvt_utf8<wchar_t>' is deprecated [-Wdeprecated-declarations]
103 | std::wstring_convert<std::codecvt_utf8<wchar_t>> conv;
| ^
/home/kassane/zig/0.12.0-dev.2158+4f2009de1/files/lib/libcxx/include/codecvt:187:28: note: 'codecvt_utf8<wchar_t>' has been explicitly marked deprecated here
187 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8
| ^
/home/kassane/zig/0.12.0-dev.2158+4f2009de1/files/lib/libcxx/include/__config:955:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
955 | # define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
| ^
/home/kassane/zig/0.12.0-dev.2158+4f2009de1/files/lib/libcxx/include/__config:928:49: note: expanded from macro '_LIBCPP_DEPRECATED'
928 | # define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
| ^
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:8:
In file included from example/../include/cinatra/coro_http_client.hpp:25:
In file included from example/../include/cinatra/http_parser.hpp:12:
example/../include/cinatra/url_encode_decode.hpp:103:8: warning: 'wstring_convert<std::codecvt_utf8<wchar_t>>' is deprecated [-Wdeprecated-declarations]
103 | std::wstring_convert<std::codecvt_utf8<wchar_t>> conv;
| ^
/home/kassane/zig/0.12.0-dev.2158+4f2009de1/files/lib/libcxx/include/locale:3598:28: note: 'wstring_convert<std::codecvt_utf8<wchar_t>>' has been explicitly marked deprecated here
3598 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert
| ^
/home/kassane/zig/0.12.0-dev.2158+4f2009de1/files/lib/libcxx/include/__config:955:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
955 | # define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
| ^
/home/kassane/zig/0.12.0-dev.2158+4f2009de1/files/lib/libcxx/include/__config:928:49: note: expanded from macro '_LIBCPP_DEPRECATED'
928 | # define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
| ^
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:8:
In file included from example/../include/cinatra/coro_http_client.hpp:25:
In file included from example/../include/cinatra/http_parser.hpp:12:
example/../include/cinatra/url_encode_decode.hpp:108:29: warning: 'codecvt_utf8<wchar_t>' is deprecated [-Wdeprecated-declarations]
108 | std::wstring_convert<std::codecvt_utf8<wchar_t>> conv;
| ^
/home/kassane/zig/0.12.0-dev.2158+4f2009de1/files/lib/libcxx/include/codecvt:187:28: note: 'codecvt_utf8<wchar_t>' has been explicitly marked deprecated here
187 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8
| ^
/home/kassane/zig/0.12.0-dev.2158+4f2009de1/files/lib/libcxx/include/__config:955:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
955 | # define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
| ^
/home/kassane/zig/0.12.0-dev.2158+4f2009de1/files/lib/libcxx/include/__config:928:49: note: expanded from macro '_LIBCPP_DEPRECATED'
928 | # define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
| ^
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:8:
In file included from example/../include/cinatra/coro_http_client.hpp:25:
In file included from example/../include/cinatra/http_parser.hpp:12:
example/../include/cinatra/url_encode_decode.hpp:108:8: warning: 'wstring_convert<std::codecvt_utf8<wchar_t>>' is deprecated [-Wdeprecated-declarations]
108 | std::wstring_convert<std::codecvt_utf8<wchar_t>> conv;
| ^
/home/kassane/zig/0.12.0-dev.2158+4f2009de1/files/lib/libcxx/include/locale:3598:28: note: 'wstring_convert<std::codecvt_utf8<wchar_t>>' has been explicitly marked deprecated here
3598 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert
| ^
/home/kassane/zig/0.12.0-dev.2158+4f2009de1/files/lib/libcxx/include/__config:955:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
955 | # define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
| ^
/home/kassane/zig/0.12.0-dev.2158+4f2009de1/files/lib/libcxx/include/__config:928:49: note: expanded from macro '_LIBCPP_DEPRECATED'
928 | # define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
| ^
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:8:
In file included from example/../include/cinatra/coro_http_client.hpp:31:
example/../include/cinatra/websocket.hpp:233:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Wsign-compare]
233 | for (int i = 0; i < data.size(); ++i) {
| ~ ^ ~~~~~~~~~~~
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:8:
In file included from example/../include/cinatra/coro_http_client.hpp:32:
In file included from example/../include/cinatra/ylt/coro_io/coro_file.hpp:26:
example/../include/cinatra/ylt/coro_io/io_context_pool.hpp:93:74: warning: unused parameter 'ec' [-Wunused-parameter]
93 | tm->async_wait([fn = std::move(func), timer = std::move(timer)](auto ec) {
| ^
example/../include/cinatra/ylt/coro_io/io_context_pool.hpp:212:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
212 | for (int i = 0; i < thd_num_; i++) {
| ~ ^ ~~~~~~~~
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:8:
In file included from example/../include/cinatra/coro_http_client.hpp:32:
In file included from example/../include/cinatra/ylt/coro_io/coro_file.hpp:44:
example/../include/cinatra/ylt/coro_io/coro_io.hpp:40:42: warning: unused parameter 'executor' [-Wunused-parameter]
40 | auto coAwait(async_simple::Executor *executor) const noexcept {
| ^
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:8:
example/../include/cinatra/coro_http_client.hpp:285:79: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
285 | co_return resp_data{std::make_error_code(std::errc::protocol_error), 404};
| ^
example/../include/cinatra/coro_http_client.hpp:292:34: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
292 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:665:30: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
665 | 404};
| ^
example/../include/cinatra/coro_http_client.hpp:672:79: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
672 | co_return resp_data{std::make_error_code(std::errc::protocol_error), 404};
| ^
example/../include/cinatra/coro_http_client.hpp:689:36: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
689 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:708:34: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
708 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:726:34: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
726 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:745:30: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
745 | 404};
| ^
example/../include/cinatra/coro_http_client.hpp:840:35: warning: missing field 'req_str' initializer [-Wmissing-field-initializers]
840 | req_context<> ctx{content_type};
| ^
example/../include/cinatra/coro_http_client.hpp:844:79: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
844 | co_return resp_data{std::make_error_code(std::errc::protocol_error), 404};
| ^
example/../include/cinatra/coro_http_client.hpp:851:76: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
851 | std::make_error_code(std::errc::no_such_file_or_directory), 404};
| ^
example/../include/cinatra/coro_http_client.hpp:858:76: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
858 | std::make_error_code(std::errc::no_such_file_or_directory), 404};
| ^
example/../include/cinatra/coro_http_client.hpp:880:36: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
880 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:890:34: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
890 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:914:70: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
914 | std::make_error_code(std::errc::bad_file_descriptor), 404};
| ^
example/../include/cinatra/coro_http_client.hpp:944:34: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
944 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:1653:36: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
1653 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:1660:38: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
1660 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:1666:38: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
1666 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:1722:76: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
1722 | std::make_error_code(std::errc::no_such_file_or_directory), 404};
| ^
example/../include/cinatra/coro_http_client.hpp:1731:34: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
1731 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:1746:38: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
1746 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:1750:40: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
1750 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:1760:36: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
1760 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:1764:32: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
1764 | co_return resp_data{{}, 200};
| ^
example/../include/cinatra/coro_http_client.hpp:1868:12: warning: unused parameter 'has_init_ssl' [-Wunused-parameter]
1868 | bool has_init_ssl = false) noexcept {
| ^
example/../include/cinatra/coro_http_client.hpp:1883:44: warning: unused parameter 'has_init_ssl' [-Wunused-parameter]
1883 | auto sock, AsioBuffer &&buffer, bool has_init_ssl = false) {
| ^
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:9:
In file included from example/../include/cinatra/coro_http_server.hpp:11:
In file included from include/cinatra/coro_http_response.hpp:15:
include/cinatra/time_util.hpp:289:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Wsign-compare]
289 | for (int i = 0; i < format.size(); ++i) {
| ~ ^ ~~~~~~~~~~~~~
include/cinatra/time_util.hpp:291:22: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Wsign-compare]
291 | char c = i + 2 < format.size() ? format[i + 2] : '0';
| ~~~~~ ^ ~~~~~~~~~~~~~
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:9:
In file included from example/../include/cinatra/coro_http_server.hpp:12:
In file included from include/cinatra/coro_http_router.hpp:12:
include/cinatra/coro_http_request.hpp:72:29: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
72 | if (start > 0 && (start >= file_size || start == end)) {
| ~~~~~ ^ ~~~~~~~~~
include/cinatra/coro_http_request.hpp:78:24: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
78 | if (end > 0 && end >= file_size) {
| ~~~ ^ ~~~~~~~~~
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:9:
In file included from example/../include/cinatra/coro_http_server.hpp:12:
In file included from include/cinatra/coro_http_router.hpp:13:
include/cinatra/coro_radix_tree.hpp:404:14: warning: comparison of integers of different signs: 'size_type' (aka 'unsigned long') and 'int' [-Wsign-compare]
404 | return i == -1 ? str.size() : i;
| ~ ^ ~~
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:9:
In file included from example/../include/cinatra/coro_http_server.hpp:12:
include/cinatra/coro_http_router.hpp:32:42: warning: unused parameter 'req' [-Wunused-parameter]
32 | virtual bool before(coro_http_request& req, coro_http_response& resp) {
| ^
include/cinatra/coro_http_router.hpp:32:67: warning: unused parameter 'resp' [-Wunused-parameter]
32 | virtual bool before(coro_http_request& req, coro_http_response& resp) {
| ^
include/cinatra/coro_http_router.hpp:36:41: warning: unused parameter 'req' [-Wunused-parameter]
36 | virtual bool after(coro_http_request& req, coro_http_response& resp) {
| ^
include/cinatra/coro_http_router.hpp:36:66: warning: unused parameter 'resp' [-Wunused-parameter]
36 | virtual bool after(coro_http_request& req, coro_http_response& resp) {
| ^
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:9:
In file included from example/../include/cinatra/coro_http_server.hpp:15:
example/../include/cinatra/coro_http_connection.hpp:471:31: warning: missing field 'type' initializer [-Wmissing-field-initializers]
471 | websocket_result result{ec};
| ^
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:9:
example/../include/cinatra/coro_http_server.hpp:366:37: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Wsign-compare]
366 | for (int i = 0; i < ranges.size(); i++) {
| ~ ^ ~~~~~~~~~~~~~
example/../include/cinatra/coro_http_server.hpp:378:27: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Wsign-compare]
378 | if (i == ranges.size() - 1) {
| ~ ^ ~~~~~~~~~~~~~~~~~
example/main.cpp:248:59: warning: unused parameter 'res' [-Wunused-parameter]
248 | bool before(coro_http_request &req, coro_http_response &res) {
| ^
example/main.cpp:286:37: warning: unused parameter 'req' [-Wunused-parameter]
286 | "/get", [](coro_http_request &req, coro_http_response &resp) {
| ^
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:9:
In file included from example/../include/cinatra/coro_http_server.hpp:11:
In file included from include/cinatra/coro_http_response.hpp:15:
include/cinatra/time_util.hpp:266:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
266 | for (int i = 0; i < N; i++) {
| ~ ^ ~
include/cinatra/time_util.hpp:274:52: note: in instantiation of function template specialization 'cinatra::to_int<4UL>' requested here
274 | inline void to_year(char *buf, int year, char c) { to_int<4>(year, c, buf); }
| ^
include/cinatra/time_util.hpp:266:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
266 | for (int i = 0; i < N; i++) {
| ~ ^ ~
include/cinatra/time_util.hpp:275:54: note: in instantiation of function template specialization 'cinatra::to_int<2UL>' requested here
275 | inline void to_month(char *buf, int month, char c) { to_int<2>(month, c, buf); }
| ^
include/cinatra/time_util.hpp:289:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Wsign-compare]
289 | for (int i = 0; i < format.size(); ++i) {
| ~ ^ ~~~~~~~~~~~~~
include/cinatra/time_util.hpp:358:14: note: in instantiation of function template specialization 'cinatra::get_local_time_str<8UL, 32UL>' requested here
358 | auto str = get_local_time_str(buf, tm, "%Y-%m-%d %H:%M:%S");
| ^
include/cinatra/time_util.hpp:291:22: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Wsign-compare]
291 | char c = i + 2 < format.size() ? format[i + 2] : '0';
| ~~~~~ ^ ~~~~~~~~~~~~~
include/cinatra/time_util.hpp:289:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Wsign-compare]
289 | for (int i = 0; i < format.size(); ++i) {
| ~ ^ ~~~~~~~~~~~~~
include/cinatra/time_util.hpp:380:12: note: in instantiation of function template specialization 'cinatra::get_local_time_str<0UL, 32UL>' requested here
380 | auto s = get_local_time_str<0>(buf, t, "%a, %d %b %Y %H:%M:%S");
| ^
include/cinatra/time_util.hpp:401:14: note: in instantiation of function template specialization 'cinatra::get_gmt_time_str<32UL>' requested here
401 | auto str = get_gmt_time_str(buf, tm);
| ^
include/cinatra/time_util.hpp:291:22: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Wsign-compare]
291 | char c = i + 2 < format.size() ? format[i + 2] : '0';
| ~~~~~ ^ ~~~~~~~~~~~~~
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:8:
example/../include/cinatra/coro_http_client.hpp:840:35: warning: missing field 'req_str' initializer [-Wmissing-field-initializers]
840 | req_context<> ctx{content_type};
| ^
example/main.cpp:79:33: note: in instantiation of function template specialization 'cinatra::coro_http_client::async_upload_chunked<std::string_view, (lambda at example/main.cpp:74:13)>' requested here
79 | auto result = co_await client.async_upload_chunked(
| ^
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:8:
example/../include/cinatra/coro_http_client.hpp:844:79: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
844 | co_return resp_data{std::make_error_code(std::errc::protocol_error), 404};
| ^
example/../include/cinatra/coro_http_client.hpp:880:36: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
880 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:890:34: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
890 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:944:34: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
944 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:840:35: warning: missing field 'req_str' initializer [-Wmissing-field-initializers]
840 | req_context<> ctx{content_type};
| ^
example/main.cpp:143:33: note: in instantiation of function template specialization 'cinatra::coro_http_client::async_upload_chunked<std::string_view, std::shared_ptr<std::stringstream>>' requested here
143 | auto result = co_await client.async_upload_chunked(
| ^
In file included from example/main.cpp:9:
In file included from example/../include/cinatra.hpp:8:
example/../include/cinatra/coro_http_client.hpp:844:79: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
844 | co_return resp_data{std::make_error_code(std::errc::protocol_error), 404};
| ^
example/../include/cinatra/coro_http_client.hpp:851:76: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
851 | std::make_error_code(std::errc::no_such_file_or_directory), 404};
| ^
example/../include/cinatra/coro_http_client.hpp:880:36: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
880 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:890:34: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
890 | co_return resp_data{ec, 404};
| ^
example/../include/cinatra/coro_http_client.hpp:944:34: warning: missing field 'resp_body' initializer [-Wmissing-field-initializers]
944 | co_return resp_data{ec, 404};
| ^
67 warnings generated. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Final binary, works:
$> ./http_server_test 200 302 client quit 301 301 client quit 200 200 302 client quit client quit
Building...
Reference .: #297
cc: @qicosmos
The text was updated successfully, but these errors were encountered: