aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/worker.cc
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-08-04 20:19:58 -0700
committerJade Lovelace <lix@jade.fyi>2024-08-08 14:53:17 -0700
commite34833c0253340f47dc0add8609eb86cf9cba19b (patch)
tree83e196e01ed4197e8f413f21d16b93cdd60f3d63 /src/libstore/build/worker.cc
parent370ac940dd7816ad4052fafa4e0f8d17784fa16b (diff)
tree-wide: fix a pile of lints
This: - Converts a bunch of C style casts into C++ casts. - Removes some very silly pointer subtraction code (which is no more or less busted on i686 than it began) - Fixes some "technically UB" that never had to be UB in the first place. - Makes finally follow the noexcept status of the inner function. Maybe in the future we should ban the function from not being noexcept, but that is not today. - Makes various locally-used exceptions inherit from std::exception. Change-Id: I22e66972602604989b5e494fd940b93e0e6e9297
Diffstat (limited to 'src/libstore/build/worker.cc')
-rw-r--r--src/libstore/build/worker.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc
index 04f0575b1..135cfecf5 100644
--- a/src/libstore/build/worker.cc
+++ b/src/libstore/build/worker.cc
@@ -4,7 +4,7 @@
#include "drv-output-substitution-goal.hh"
#include "local-derivation-goal.hh"
#include "signals.hh"
-#include "hook-instance.hh"
+#include "hook-instance.hh" // IWYU pragma: keep
#include <poll.h>
@@ -529,7 +529,7 @@ void Worker::waitForInput()
} else {
printMsg(lvlVomit, "%1%: read %2% bytes",
goal->getName(), rd);
- std::string_view data((char *) buffer.data(), rd);
+ std::string_view data(reinterpret_cast<char *>(buffer.data()), rd);
j->lastOutput = after;
handleWorkResult(goal, goal->handleChildOutput(k, data));
}