0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 00:02:34 +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(bytes <= size(b));
const auto &advance
const size_t advance
{
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.
explicit operator json::object() const;
explicit operator json::array() const;
result() = default;
};
/// Fetch entity state. DO NOT CONSTRUCT. This is an internal structure but we

View file

@ -12,6 +12,7 @@
namespace ircd::ctx::ole
{
static const opts default_opts;
extern conf::item<size_t> thread_max;
static std::mutex mutex;
@ -65,8 +66,12 @@ noexcept
});
}
//
// ole::offload
//
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 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
{
fs::opts
{
.offset = off_t(align(opts.offset, info::page_size)),
.blocking = false,
},
{ fs_opts },
};
const size_t &map_size
@ -853,7 +855,7 @@ ircd::fs::incore(const fd &fd,
assert(map_opts.offset % 4096 == 0);
const fs::map map
{
fd, map_opts, map_size
fd, map_size, map_opts
};
const size_t res