Merge pull request #4297 from tweag/fix-clang-warnings

shut up clang warnings
This commit is contained in:
Eelco Dolstra 2020-12-01 15:48:52 +01:00 committed by GitHub
commit 5a6ddb3de1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 5 deletions

View file

@ -12,6 +12,8 @@
%{
#pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
#include <boost/lexical_cast.hpp>
#include "nixexpr.hh"

View file

@ -7,7 +7,7 @@ namespace nix {
/* Forward definition. */
struct Goal;
struct Worker;
class Worker;
/* A pointer to a goal. */
typedef std::shared_ptr<Goal> GoalPtr;

View file

@ -8,8 +8,8 @@
namespace nix {
/* Forward definition. */
class DerivationGoal;
class SubstitutionGoal;
struct DerivationGoal;
struct SubstitutionGoal;
/* Workaround for not being able to declare a something like

View file

@ -296,8 +296,8 @@ private:
void createUser(const std::string & userName, uid_t userId) override;
friend class DerivationGoal;
friend class SubstitutionGoal;
friend struct DerivationGoal;
friend struct SubstitutionGoal;
};

View file

@ -22,6 +22,9 @@ std::string chrootHelperName = "__run_in_chroot";
struct RunCommon : virtual Command
{
using Command::run;
void runProgram(ref<Store> store,
const std::string & program,
const Strings & args)
@ -59,6 +62,9 @@ struct RunCommon : virtual Command
struct CmdShell : InstallablesCommand, RunCommon, MixEnvironment
{
using InstallablesCommand::run;
std::vector<std::string> command = { getEnv("SHELL").value_or("bash") };
CmdShell()
@ -144,6 +150,8 @@ static auto rCmdShell = registerCommand<CmdShell>("shell");
struct CmdRun : InstallableCommand, RunCommon
{
using InstallableCommand::run;
std::vector<std::string> args;
CmdRun()