\#10 Address compiler warnings

This commit is contained in:
2023-10-30 10:54:35 -05:00
parent b137b57dbc
commit 8cf19e0594
5 changed files with 22 additions and 31 deletions

View File

@ -42,18 +42,8 @@ list_objects(int /* argc */, char * /* argv */[],
if (pt == provider_type::s3) {
lock_data lock(pt, unique_id);
const auto res = lock.grab_lock(1u);
/* if (res == lock_result::locked) { */
/* auto port = app_config::default_api_port(pt); */
/* utils::cli::get_api_authentication_data(user, password, port, pt,
* data_directory); */
/* const auto response = */
/* client({"localhost", password, port,
* user}).create_directory(api_path); */
/* std::cout << static_cast<int>(response.response_type) << std::endl; */
/* std::cout << response.data.dump(2) << std::endl; */
/* } else */
if (res == lock_result::success) {
auto lock_res = lock.grab_lock(1u);
if (lock_res == lock_result::success) {
app_config config(pt, data_directory);
s3_comm comm(config);
std::vector<directory_item> list{};
@ -67,7 +57,7 @@ list_objects(int /* argc */, char * /* argv */[],
std::cout << api_error_to_string(res) << std::endl;
}
} else {
std::cout << "failed to grab lock: '" << static_cast<int>(res) << "'"
std::cout << "failed to grab lock: '" << static_cast<int>(lock_res) << "'"
<< std::endl;
ret = exit_code::lock_failed;
}

View File

@ -68,9 +68,10 @@ using event_consumer = event_system::event_consumer;
#define E_PROP(type, name, short_name, ts) \
private: \
void init_##short_name(const type &val_##name) { \
ss_ << "|" << #short_name << "|" << ts(val_##name); \
j_[#name] = ts(val_##name); \
void init_##short_name(const type &val) { \
auto ts_val = ts(val); \
ss_ << "|" << #short_name << "|" << ts_val; \
j_[#name] = ts_val; \
} \
\
public: \