Skip to content

Commit

Permalink
reduce number of compiler warnings (#1691)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv authored May 20, 2022
1 parent 1657355 commit c124c4c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions libmamba/src/api/repoquery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ namespace mamba
switch (format)
{
case QueryResultFormat::kTREE:
case QueryResultFormat::kPRETTY:
res.tree(std::cout);
break;
case QueryResultFormat::kJSON:
Expand All @@ -95,6 +96,7 @@ namespace mamba
switch (format)
{
case QueryResultFormat::kTREE:
case QueryResultFormat::kPRETTY:
res.tree(std::cout);
break;
case QueryResultFormat::kJSON:
Expand Down
3 changes: 2 additions & 1 deletion libmamba/src/core/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,9 @@ namespace mamba
* Console *
***********/

struct ConsoleData
class ConsoleData
{
public:
std::mutex m_mutex;
std::unique_ptr<ProgressBarManager> p_progress_bar_manager;

Expand Down
2 changes: 1 addition & 1 deletion libmamba/src/core/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ namespace mamba
return signum;
});

MainExecutor::instance().take_ownership(std::move(t.extract()));
MainExecutor::instance().take_ownership(t.extract());

{
std::unique_lock<std::mutex> l(m);
Expand Down
2 changes: 1 addition & 1 deletion libmamba/src/core/util_os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ namespace mamba
// Enable buffering to prevent VS from chopping up UTF-8 byte sequences
setvbuf(stdout, nullptr, _IOFBF, 1000);
#else
static constexpr char* utf8_locales[] = {
static constexpr const char* utf8_locales[] = {
"C.UTF-8",
"POSIX.UTF-8",
"en_US.UTF-8",
Expand Down
2 changes: 2 additions & 0 deletions libmambapy/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ PYBIND11_MODULE(bindings, m)
switch (format)
{
case query::TREE:
case query::PRETTY:
res.tree(res_stream);
break;
case query::JSON:
Expand All @@ -237,6 +238,7 @@ PYBIND11_MODULE(bindings, m)
switch (format)
{
case query::TREE:
case query::PRETTY:
res.tree(res_stream);
break;
case query::JSON:
Expand Down
4 changes: 2 additions & 2 deletions micromamba/src/completer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ add_activate_completion(CLI::App* app, std::vector<std::string>& completer_args,

// Mock functions just for completion
CLI::App* activate_subcom = app->add_subcommand("activate");
CLI::App* deactivate_subcom = app->add_subcommand("deactivate");
app->add_subcommand("deactivate");
activate_subcom->callback(
[app, &completer_args, &completed]()
{
Expand Down Expand Up @@ -124,7 +124,7 @@ add_ps_completion(CLI::App* app, std::vector<std::string>& completer_args, bool&
{ complete_options(list_subcom, completer_args, completed); });

stop_subcom->callback(
[app, &completer_args, &completed]()
[&completer_args, &completed]()
{
if (completer_args.size() == 1)
{
Expand Down

0 comments on commit c124c4c

Please sign in to comment.