0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-15 22:41:12 +01:00

ircd::buffer: Fix warning from dependent type munge (gcc-11).

ircd:Ⓜ️:fetch: Fix non-trivial aggregate (gcc-10).

ircd::ctx::ole: Fix anonymous may be used uninitialized (gcc-11).
This commit is contained in:
Jason Volk 2022-06-25 13:02:37 -07:00
parent 7f2ac27cc5
commit 45effc15d8
4 changed files with 17 additions and 8 deletions

View file

@ -197,7 +197,7 @@ ircd::buffer::consume(buffer<it> &b,
{ {
assert(!null(b)); assert(!null(b));
assert(bytes <= size(b)); assert(bytes <= size(b));
const auto &advance const size_t advance
{ {
std::min(bytes, size(b)) std::min(bytes, size(b))
}; };

View file

@ -151,6 +151,8 @@ struct ircd::m::fetch::result
/// instance go out of scope by making this conversion. /// instance go out of scope by making this conversion.
explicit operator json::object() const; explicit operator json::object() const;
explicit operator json::array() const; explicit operator json::array() const;
result() = default;
}; };
/// Fetch entity state. DO NOT CONSTRUCT. This is an internal structure but we /// Fetch entity state. DO NOT CONSTRUCT. This is an internal structure but we

View file

@ -12,6 +12,7 @@
namespace ircd::ctx::ole namespace ircd::ctx::ole
{ {
static const opts default_opts;
extern conf::item<size_t> thread_max; extern conf::item<size_t> thread_max;
static std::mutex mutex; static std::mutex mutex;
@ -65,8 +66,12 @@ noexcept
}); });
} }
//
// ole::offload
//
ircd::ctx::ole::offload::offload(const function &func) ircd::ctx::ole::offload::offload(const function &func)
:offload{opts{}, func} :offload{default_opts, func}
{ {
} }

View file

@ -831,13 +831,15 @@ ircd::fs::incore(const fd &fd,
const size_t &count, const size_t &count,
const read_opts &opts) const read_opts &opts)
{ {
const fs::opts fs_opts
{
.offset = off_t(align(opts.offset, info::page_size)),
.blocking = false,
};
const fs::map::opts map_opts const fs::map::opts map_opts
{ {
fs::opts { fs_opts },
{
.offset = off_t(align(opts.offset, info::page_size)),
.blocking = false,
},
}; };
const size_t &map_size const size_t &map_size
@ -853,7 +855,7 @@ ircd::fs::incore(const fd &fd,
assert(map_opts.offset % 4096 == 0); assert(map_opts.offset % 4096 == 0);
const fs::map map const fs::map map
{ {
fd, map_opts, map_size fd, map_size, map_opts
}; };
const size_t res const size_t res