Skip to content

Commit 6789202

Browse files
authored
Merge pull request #12962 from DeterminateSystems/clang-tidy-warnings
Fix some clang-tidy warnings
2 parents 3bcc70b + c0ad5d3 commit 6789202

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libexpr/include/nix/expr/nixexpr.hh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct DocComment {
6565
struct AttrName
6666
{
6767
Symbol symbol;
68-
Expr * expr;
68+
Expr * expr = nullptr;
6969
AttrName(Symbol s) : symbol(s) {};
7070
AttrName(Expr * e) : expr(e) {};
7171
};
@@ -159,15 +159,15 @@ struct ExprVar : Expr
159159
160160
`nullptr`: Not from a `with`.
161161
Valid pointer: the nearest, innermost `with` expression to query first. */
162-
ExprWith * fromWith;
162+
ExprWith * fromWith = nullptr;
163163

164164
/* In the former case, the value is obtained by going `level`
165165
levels up from the current environment and getting the
166166
`displ`th value in that environment. In the latter case, the
167167
value is obtained by getting the attribute named `name` from
168168
the set stored in the environment that is `level` levels up
169169
from the current one.*/
170-
Level level;
170+
Level level = 0;
171171
Displacement displ = 0;
172172

173173
ExprVar(Symbol name) : name(name) { };

0 commit comments

Comments
 (0)