Fix some clang warnings
This commit is contained in:
parent
a26307b281
commit
94f9c14d52
6 changed files with 12 additions and 18 deletions
|
@ -82,8 +82,6 @@ void copyContext(const Value & v, PathSet & context);
|
||||||
paths. */
|
paths. */
|
||||||
typedef std::map<Path, Path> SrcToStore;
|
typedef std::map<Path, Path> SrcToStore;
|
||||||
|
|
||||||
struct EvalState;
|
|
||||||
|
|
||||||
|
|
||||||
std::ostream & operator << (std::ostream & str, const Value & v);
|
std::ostream & operator << (std::ostream & str, const Value & v);
|
||||||
|
|
||||||
|
@ -216,9 +214,9 @@ private:
|
||||||
|
|
||||||
inline Value * lookupVar(Env * env, const ExprVar & var, bool noEval);
|
inline Value * lookupVar(Env * env, const ExprVar & var, bool noEval);
|
||||||
|
|
||||||
friend class ExprVar;
|
friend struct ExprVar;
|
||||||
friend class ExprAttrs;
|
friend struct ExprAttrs;
|
||||||
friend class ExprLet;
|
friend struct ExprLet;
|
||||||
|
|
||||||
Expr * parse(const char * text, const Path & path,
|
Expr * parse(const char * text, const Path & path,
|
||||||
const Path & basePath, StaticEnv & staticEnv);
|
const Path & basePath, StaticEnv & staticEnv);
|
||||||
|
@ -278,9 +276,9 @@ private:
|
||||||
typedef std::map<Pos, unsigned int> AttrSelects;
|
typedef std::map<Pos, unsigned int> AttrSelects;
|
||||||
AttrSelects attrSelects;
|
AttrSelects attrSelects;
|
||||||
|
|
||||||
friend class ExprOpUpdate;
|
friend struct ExprOpUpdate;
|
||||||
friend class ExprOpConcatLists;
|
friend struct ExprOpConcatLists;
|
||||||
friend class ExprSelect;
|
friend struct ExprSelect;
|
||||||
friend void prim_getAttr(EvalState & state, Value * * args, Value & v);
|
friend void prim_getAttr(EvalState & state, Value * * args, Value & v);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ std::ostream & operator << (std::ostream & str, const Pos & pos);
|
||||||
|
|
||||||
struct Env;
|
struct Env;
|
||||||
struct Value;
|
struct Value;
|
||||||
struct EvalState;
|
class EvalState;
|
||||||
struct StaticEnv;
|
struct StaticEnv;
|
||||||
struct Expr;
|
struct Expr;
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ string showAttrPath(const AttrPath & attrPath);
|
||||||
|
|
||||||
struct Expr
|
struct Expr
|
||||||
{
|
{
|
||||||
|
virtual ~Expr() { };
|
||||||
virtual void show(std::ostream & str);
|
virtual void show(std::ostream & str);
|
||||||
virtual void bindVars(const StaticEnv & env);
|
virtual void bindVars(const StaticEnv & env);
|
||||||
virtual void eval(EvalState & state, Env & env, Value & v);
|
virtual void eval(EvalState & state, Env & env, Value & v);
|
||||||
|
|
|
@ -252,7 +252,7 @@ void yyerror(YYLTYPE * loc, yyscan_t scanner, ParseData * data, const char * err
|
||||||
nix::Formals * formals;
|
nix::Formals * formals;
|
||||||
nix::Formal * formal;
|
nix::Formal * formal;
|
||||||
nix::NixInt n;
|
nix::NixInt n;
|
||||||
char * id; // !!! -> Symbol
|
const char * id; // !!! -> Symbol
|
||||||
char * path;
|
char * path;
|
||||||
char * uri;
|
char * uri;
|
||||||
std::vector<nix::AttrName> * attrNames;
|
std::vector<nix::AttrName> * attrNames;
|
||||||
|
|
|
@ -22,13 +22,13 @@ typedef enum {
|
||||||
} ValueType;
|
} ValueType;
|
||||||
|
|
||||||
|
|
||||||
struct Bindings;
|
class Bindings;
|
||||||
struct Env;
|
struct Env;
|
||||||
struct Expr;
|
struct Expr;
|
||||||
struct ExprLambda;
|
struct ExprLambda;
|
||||||
struct PrimOp;
|
struct PrimOp;
|
||||||
struct PrimOp;
|
struct PrimOp;
|
||||||
struct Symbol;
|
class Symbol;
|
||||||
|
|
||||||
|
|
||||||
typedef long NixInt;
|
typedef long NixInt;
|
||||||
|
|
|
@ -75,12 +75,9 @@ using std::map;
|
||||||
static string pathNullDevice = "/dev/null";
|
static string pathNullDevice = "/dev/null";
|
||||||
|
|
||||||
|
|
||||||
static const uid_t rootUserId = 0;
|
|
||||||
|
|
||||||
|
|
||||||
/* Forward definition. */
|
/* Forward definition. */
|
||||||
class Worker;
|
class Worker;
|
||||||
class HookInstance;
|
struct HookInstance;
|
||||||
|
|
||||||
|
|
||||||
/* A pointer to a goal. */
|
/* A pointer to a goal. */
|
||||||
|
|
|
@ -22,8 +22,6 @@ static string gcLockName = "gc.lock";
|
||||||
static string tempRootsDir = "temproots";
|
static string tempRootsDir = "temproots";
|
||||||
static string gcRootsDir = "gcroots";
|
static string gcRootsDir = "gcroots";
|
||||||
|
|
||||||
static const int defaultGcLevel = 1000;
|
|
||||||
|
|
||||||
|
|
||||||
/* Acquire the global GC lock. This is used to prevent new Nix
|
/* Acquire the global GC lock. This is used to prevent new Nix
|
||||||
processes from starting after the temporary root files have been
|
processes from starting after the temporary root files have been
|
||||||
|
|
Loading…
Reference in a new issue