1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

Merge pull request #13490 from Mic92/clang-tidy-simple-warnings

Fix simple clang-tidy warnings
This commit is contained in:
Jörg Thalheim 2025-08-11 18:21:46 +02:00 committed by GitHub
commit b2fb421386
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 3 deletions

View file

@ -22,7 +22,7 @@ struct Attr
way we keep Attr size at two words with no wasted space. */
Symbol name;
PosIdx pos;
Value * value;
Value * value = nullptr;
Attr(Symbol name, Value * value, PosIdx pos = noPos)
: name(name)
, pos(pos)

View file

@ -144,7 +144,7 @@ DerivationOptions::fromStructuredAttrs(const StringMap & env, const StructuredAt
if (auto maxClosureSize = get(output, "maxClosureSize"))
checks.maxClosureSize = maxClosureSize->get<uint64_t>();
auto get_ = [&](const std::string & name) -> std::optional<StringSet> {
auto get_ = [&output = output](const std::string & name) -> std::optional<StringSet> {
if (auto i = get(output, name)) {
StringSet res;
for (auto j = i->begin(); j != i->end(); ++j) {

View file

@ -1,6 +1,6 @@
#pragma once
///@file
#include "store-config-private.hh"
#include "nix/store/config.hh"
#if NIX_WITH_S3_SUPPORT
# include "nix/util/ref.hh"

View file

@ -1,4 +1,5 @@
#include "store-config-private.hh"
#include <cstdint>
/*
* Determine the syscall number for `fchmodat2`.