mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 17:16:15 +02:00
shut up clang warnings
- Fix some class/struct discrepancies - Explicit the overloading of `run` in the `Cmd*` classes - Ignore a warning in the generated lexer
This commit is contained in:
parent
88798613ee
commit
438977731c
5 changed files with 15 additions and 5 deletions
|
@ -12,6 +12,8 @@
|
||||||
|
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
#pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
#include "nixexpr.hh"
|
#include "nixexpr.hh"
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace nix {
|
||||||
|
|
||||||
/* Forward definition. */
|
/* Forward definition. */
|
||||||
struct Goal;
|
struct Goal;
|
||||||
struct Worker;
|
class Worker;
|
||||||
|
|
||||||
/* A pointer to a goal. */
|
/* A pointer to a goal. */
|
||||||
typedef std::shared_ptr<Goal> GoalPtr;
|
typedef std::shared_ptr<Goal> GoalPtr;
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
/* Forward definition. */
|
/* Forward definition. */
|
||||||
class DerivationGoal;
|
struct DerivationGoal;
|
||||||
class SubstitutionGoal;
|
struct SubstitutionGoal;
|
||||||
|
|
||||||
/* Workaround for not being able to declare a something like
|
/* Workaround for not being able to declare a something like
|
||||||
|
|
||||||
|
|
|
@ -296,8 +296,8 @@ private:
|
||||||
|
|
||||||
void createUser(const std::string & userName, uid_t userId) override;
|
void createUser(const std::string & userName, uid_t userId) override;
|
||||||
|
|
||||||
friend class DerivationGoal;
|
friend struct DerivationGoal;
|
||||||
friend class SubstitutionGoal;
|
friend struct SubstitutionGoal;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,9 @@ std::string chrootHelperName = "__run_in_chroot";
|
||||||
|
|
||||||
struct RunCommon : virtual Command
|
struct RunCommon : virtual Command
|
||||||
{
|
{
|
||||||
|
|
||||||
|
using Command::run;
|
||||||
|
|
||||||
void runProgram(ref<Store> store,
|
void runProgram(ref<Store> store,
|
||||||
const std::string & program,
|
const std::string & program,
|
||||||
const Strings & args)
|
const Strings & args)
|
||||||
|
@ -59,6 +62,9 @@ struct RunCommon : virtual Command
|
||||||
|
|
||||||
struct CmdShell : InstallablesCommand, RunCommon, MixEnvironment
|
struct CmdShell : InstallablesCommand, RunCommon, MixEnvironment
|
||||||
{
|
{
|
||||||
|
|
||||||
|
using InstallablesCommand::run;
|
||||||
|
|
||||||
std::vector<std::string> command = { getEnv("SHELL").value_or("bash") };
|
std::vector<std::string> command = { getEnv("SHELL").value_or("bash") };
|
||||||
|
|
||||||
CmdShell()
|
CmdShell()
|
||||||
|
@ -144,6 +150,8 @@ static auto rCmdShell = registerCommand<CmdShell>("shell");
|
||||||
|
|
||||||
struct CmdRun : InstallableCommand, RunCommon
|
struct CmdRun : InstallableCommand, RunCommon
|
||||||
{
|
{
|
||||||
|
using InstallableCommand::run;
|
||||||
|
|
||||||
std::vector<std::string> args;
|
std::vector<std::string> args;
|
||||||
|
|
||||||
CmdRun()
|
CmdRun()
|
||||||
|
|
Loading…
Reference in a new issue