Merge pull request #12857 from NixOS/mergify/bp/2.28-maintenance/pr-12765
Add various clang tidy fixes (backport #12765)
This commit is contained in:
@@ -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. */
|
||||
|
||||
@@ -249,7 +249,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;
|
||||
|
||||
Reference in New Issue
Block a user