Fix warnings (#2760)

This commit is contained in:
Hind-M 2023-08-21 15:16:48 +02:00 committed by GitHub
parent 33fa5a10c8
commit 427771c4b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -1159,7 +1159,7 @@ namespace mamba
}
else
{
const Channel& chan = m_pool.channel_context().make_channel(std::string(str));
const Channel& chan = m_pool.channel_context().make_channel(str);
chan_name = chan.canonical_name();
}
}

View File

@ -31,7 +31,7 @@ main(int argc, char** argv)
{
CLI::App app{};
fs::u8path path;
int timeout = 1;
std::size_t timeout = 1;
CLI::App* lock_com = app.add_subcommand("lock", "Lock a path");
lock_com->add_option("path", path, "Path to lock");

View File

@ -554,15 +554,15 @@ PYBIND11_MODULE(bindings, m)
)
.def_property(
"use_lockfiles",
[](Context& ctx)
[](Context& context)
{
ctx.use_lockfiles = is_file_locking_allowed();
return ctx.use_lockfiles;
context.use_lockfiles = is_file_locking_allowed();
return context.use_lockfiles;
},
[](Context& ctx, bool allow)
[](Context& context, bool allow)
{
allow_file_locking(allow);
ctx.use_lockfiles = allow;
context.use_lockfiles = allow;
}
)
.def("set_verbosity", &Context::set_verbosity)

View File

@ -120,7 +120,7 @@ set_ps_command(CLI::App* subcom)
#endif
for (auto& p : procs)
{
PID pid = std::stoull(p["pid"].get<std::string>());
PID pid = std::stoi(p["pid"].get<std::string>());
stop_process(p["name"], pid);
}
if (procs.empty())