mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Merge pull request #12765 from Mic92/clan-tidy-cleanups
Add various clang tidy fixes
This commit is contained in:
commit
4de73df8bf
5 changed files with 5 additions and 3 deletions
|
@ -1025,6 +1025,7 @@ void processConnection(
|
|||
{
|
||||
#ifndef _WIN32 // TODO need graceful async exit support on Windows?
|
||||
auto monitor = !recursive ? std::make_unique<MonitorFdHup>(from.fd) : nullptr;
|
||||
(void) monitor; // suppress warning
|
||||
#endif
|
||||
|
||||
/* Exchange the greeting. */
|
||||
|
|
|
@ -245,7 +245,7 @@ LocalStore::LocalStore(
|
|||
else if (curSchema == 0) { /* new store */
|
||||
curSchema = nixSchemaVersion;
|
||||
openDB(*state, true);
|
||||
writeFile(schemaPath, fmt("%1%", nixSchemaVersion), 0666, true);
|
||||
writeFile(schemaPath, fmt("%1%", curSchema), 0666, true);
|
||||
}
|
||||
|
||||
else if (curSchema < nixSchemaVersion) {
|
||||
|
|
|
@ -33,7 +33,7 @@ std::optional<Mode> decodeMode(RawMode m) {
|
|||
static std::string getStringUntil(Source & source, char byte)
|
||||
{
|
||||
std::string s;
|
||||
char n[1];
|
||||
char n[1] = { 0 };
|
||||
source(std::string_view { n, 1 });
|
||||
while (*n != byte) {
|
||||
s += *n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue