aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/storage
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-11-01 14:04:35 +0100
committerGitHub Enterprise <[email protected]>2025-11-01 14:04:35 +0100
commita58da97f98697580bf128ed5723ba720cc30f0dc (patch)
tree798e392ddf76128a506293dc0803aaf852203dcd /src/zenserver/storage
parentfix use-after-free in TEST_CASE("compactcas.threadedinsert") (#620) (diff)
downloadzen-a58da97f98697580bf128ed5723ba720cc30f0dc.tar.xz
zen-a58da97f98697580bf128ed5723ba720cc30f0dc.zip
Various fixes to address issues flagged by gcc / non-UE toolchain build (#621)
* gcc: avoid using memset on nontrivial struct * redundant `return std::move` * fixed various compilation issues flagged by gcc * fix issue in xmake.lua detecting whether we are building with the UE toolchain or not * add GCC ignore -Wundef (comment is inaccurate) * remove redundant std::move * don't catch exceptions by value * unreferenced variables * initialize "by the book" instead of memset * remove unused exception reference * add #include <cstring> to fix gcc build * explicitly poulate KeyValueMap by traversing input spans fixes gcc compilation * remove unreferenced variable * eliminate redundant `std::move` which gcc complains about * fix gcc compilation by including <cstring> * tag unreferenced variable to fix gcc compilation * fixes for various cases of naming members the same as their type
Diffstat (limited to 'src/zenserver/storage')
-rw-r--r--src/zenserver/storage/admin/admin.cpp10
-rw-r--r--src/zenserver/storage/buildstore/httpbuildstore.cpp2
-rw-r--r--src/zenserver/storage/storageconfig.cpp4
3 files changed, 9 insertions, 7 deletions
diff --git a/src/zenserver/storage/admin/admin.cpp b/src/zenserver/storage/admin/admin.cpp
index 68b91825d..04f43d33a 100644
--- a/src/zenserver/storage/admin/admin.cpp
+++ b/src/zenserver/storage/admin/admin.cpp
@@ -164,7 +164,7 @@ HttpAdminService::HttpAdminService(GcScheduler& Scheduler,
return Req.ServerRequest().WriteResponse(HttpResponseCode::NotFound);
}
- auto WriteState = [](CbObjectWriter& Obj, const JobQueue::State& State) {
+ auto WriteState = [](CbObjectWriter& Obj, const JobQueue::JobState& State) {
if (!State.CurrentOp.empty())
{
Obj.AddString(
@@ -207,7 +207,7 @@ HttpAdminService::HttpAdminService(GcScheduler& Scheduler,
switch (CurrentState->Status)
{
- case JobQueue::Status::Queued:
+ case JobQueue::JobStatus::Queued:
{
CbObjectWriter Obj;
Obj.AddString("Name"sv, CurrentState->Name);
@@ -217,7 +217,7 @@ HttpAdminService::HttpAdminService(GcScheduler& Scheduler,
Req.ServerRequest().WriteResponse(HttpResponseCode::OK, Obj.Save());
}
break;
- case JobQueue::Status::Running:
+ case JobQueue::JobStatus::Running:
{
CbObjectWriter Obj;
Obj.AddString("Name"sv, CurrentState->Name);
@@ -229,7 +229,7 @@ HttpAdminService::HttpAdminService(GcScheduler& Scheduler,
Req.ServerRequest().WriteResponse(HttpResponseCode::OK, Obj.Save());
}
break;
- case JobQueue::Status::Aborted:
+ case JobQueue::JobStatus::Aborted:
{
CbObjectWriter Obj;
Obj.AddString("Name"sv, CurrentState->Name);
@@ -243,7 +243,7 @@ HttpAdminService::HttpAdminService(GcScheduler& Scheduler,
Req.ServerRequest().WriteResponse(HttpResponseCode::OK, Obj.Save());
}
break;
- case JobQueue::Status::Completed:
+ case JobQueue::JobStatus::Completed:
{
CbObjectWriter Obj;
Obj.AddString("Name"sv, CurrentState->Name);
diff --git a/src/zenserver/storage/buildstore/httpbuildstore.cpp b/src/zenserver/storage/buildstore/httpbuildstore.cpp
index e5ea23acc..18fae7027 100644
--- a/src/zenserver/storage/buildstore/httpbuildstore.cpp
+++ b/src/zenserver/storage/buildstore/httpbuildstore.cpp
@@ -199,6 +199,8 @@ HttpBuildStoreService::PutMetadataRequest(HttpRouterRequest& Req)
std::string_view Bucket = Req.GetCapture(2);
std::string_view BuildId = Req.GetCapture(3);
+ ZEN_UNUSED(Namespace, Bucket, BuildId);
+
IoBuffer MetaPayload = ServerRequest.ReadPayload();
if (MetaPayload.GetContentType() != ZenContentType::kCbPackage)
{
diff --git a/src/zenserver/storage/storageconfig.cpp b/src/zenserver/storage/storageconfig.cpp
index 61844140e..3a41ad003 100644
--- a/src/zenserver/storage/storageconfig.cpp
+++ b/src/zenserver/storage/storageconfig.cpp
@@ -41,7 +41,7 @@ ZenStorageServerConfigurator::ValidateOptions()
throw OptionParseException(fmt::format("'--encryption-aes-iv' ('{}') is malformed", ServerOptions.EncryptionIV), {});
}
}
- if (ServerOptions.HttpServerConfig.ForceLoopback && ServerOptions.IsDedicated)
+ if (ServerOptions.HttpConfig.ForceLoopback && ServerOptions.IsDedicated)
{
throw OptionParseException("'--dedicated' conflicts with '--http-forceloopback'", {});
}
@@ -602,7 +602,7 @@ ZenStorageServerConfigurator::ParsePluginsConfigFile(const std::filesystem::path
Config.PluginOptions.push_back({"port", std::to_string(m_ServerOptions.BasePort)});
}
- m_ServerOptions.HttpServerConfig.PluginConfigs.push_back(Config);
+ m_ServerOptions.HttpConfig.PluginConfigs.push_back(Config);
}
}