telegram-bot-api icon indicating copy to clipboard operation
telegram-bot-api copied to clipboard

clang-18 warnings

Open ammarfaizi2 opened this issue 3 months ago • 0 comments

This is obviously not a fatal issue, but it would be great to get cleaned up.

tgdc-master_1  | [ 97%] Building CXX object CMakeFiles/telegram-bot-api.dir/telegram-bot-api/HttpStatConnection.cpp.o
tgdc-master_1  | [ 97%] Building CXX object CMakeFiles/telegram-bot-api.dir/telegram-bot-api/Query.cpp.o
tgdc-master_1  | [ 97%] Building CXX object CMakeFiles/telegram-bot-api.dir/telegram-bot-api/ClientManager.cpp.o
tgdc-master_1  | [ 98%] Building CXX object CMakeFiles/telegram-bot-api.dir/telegram-bot-api/Client.cpp.o
tgdc-master_1  | [ 98%] Building CXX object CMakeFiles/telegram-bot-api.dir/telegram-bot-api/HttpConnection.cpp.o
tgdc-master_1  | [ 97%] Building CXX object CMakeFiles/telegram-bot-api.dir/telegram-bot-api/telegram-bot-api.cpp.o
tgdc-master_1  | [ 98%] Building CXX object CMakeFiles/telegram-bot-api.dir/telegram-bot-api/Stats.cpp.o
tgdc-master_1  | /var/www/tgdc-bot/modules/telegram-bot-api/telegram-bot-api/Client.cpp:6206:33: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
tgdc-master_1  |  6206 |       group_info->invite_link = std::move(
tgdc-master_1  |       |                                 ^
tgdc-master_1  | /var/www/tgdc-bot/modules/telegram-bot-api/telegram-bot-api/Client.cpp:6206:33: note: remove std::move call here
tgdc-master_1  |  6206 |       group_info->invite_link = std::move(
tgdc-master_1  |       |                                 ^~~~~~~~~~
tgdc-master_1  |  6207 |           full_info->invite_link_ != nullptr ? std::move(full_info->invite_link_->invite_link_) : td::string());
tgdc-master_1  |       |                                                                                                               ~
tgdc-master_1  | /var/www/tgdc-bot/modules/telegram-bot-api/telegram-bot-api/Client.cpp:6223:38: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
tgdc-master_1  |  6223 |       supergroup_info->invite_link = std::move(
tgdc-master_1  |       |                                      ^
tgdc-master_1  | /var/www/tgdc-bot/modules/telegram-bot-api/telegram-bot-api/Client.cpp:6223:38: note: remove std::move call here
tgdc-master_1  |  6223 |       supergroup_info->invite_link = std::move(
tgdc-master_1  |       |                                      ^~~~~~~~~~
tgdc-master_1  |  6224 |           full_info->invite_link_ != nullptr ? std::move(full_info->invite_link_->invite_link_) : td::string());
tgdc-master_1  |       |                                                                                                               ~
tgdc-master_1  | [100%] Building CXX object CMakeFiles/telegram-bot-api.dir/telegram-bot-api/Watchdog.cpp.o
tgdc-master_1  | [100%] Building CXX object CMakeFiles/telegram-bot-api.dir/telegram-bot-api/WebhookActor.cpp.o
tgdc-master_1  | /var/www/tgdc-bot/modules/telegram-bot-api/telegram-bot-api/Client.cpp:1105:17: warning: private field 'client_' is not used [-Wunused-private-field]
tgdc-master_1  |  1105 |   const Client *client_;
tgdc-master_1  |       |                 ^
tgdc-master_1  | 3 warnings generated.
tgdc-master_1  | [100%] Linking CXX executable telegram-bot-api
tgdc-master_1  | [100%] Built target telegram-bot-api
tgdc-master_1  | Install the project...
tgdc-master_1  | -- Install configuration: "Release"
tgdc-master_1  | -- Installing: /usr/local/bin/telegram-bot-api

ammarfaizi2 avatar Mar 12 '24 22:03 ammarfaizi2