Allow various unsigned conversions.
construct: Fix comparison signedness warning.
This commit is contained in:
parent
899b2bbef5
commit
b677eeb4b7
|
@ -295,7 +295,7 @@ noexcept try
|
|||
// The smoketest is enabled if the first value is true; then all of the
|
||||
// values must be true for the smoketest to pass.
|
||||
if(smoketest[0])
|
||||
return std::count(begin(smoketest), end(smoketest), true) == smoketest.size()?
|
||||
return std::all_of(begin(smoketest), end(smoketest), ircd::identity())?
|
||||
EXIT_SUCCESS:
|
||||
EXIT_FAILURE;
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ namespace ircd::db
|
|||
void for_each(database &d, const uint64_t &seq, const seq_closure &);
|
||||
void get(database &d, const uint64_t &seq, const seq_closure &);
|
||||
|
||||
string_view debug(const mutable_buffer &out, const txn &, const ulong &fmt = 0);
|
||||
string_view debug(const mutable_buffer &out, database &, const rocksdb::WriteBatch &, const ulong &fmt = 0);
|
||||
string_view debug(const mutable_buffer &out, const txn &, const long &fmt = 0);
|
||||
string_view debug(const mutable_buffer &out, database &, const rocksdb::WriteBatch &, const long &fmt = 0);
|
||||
}
|
||||
|
||||
struct ircd::db::txn
|
||||
|
|
|
@ -504,12 +504,12 @@ ircd::conf::make_env_name(const mutable_buffer &buf,
|
|||
|
||||
return string_view
|
||||
{
|
||||
data(buf), ::snprintf
|
||||
data(buf), unsigned(::snprintf
|
||||
(
|
||||
data(buf), size(buf), "%s__%s",
|
||||
name.c_str(),
|
||||
feature.c_str()
|
||||
)
|
||||
))
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1098,7 +1098,7 @@ ircd::string_view
|
|||
ircd::db::debug(const mutable_buffer &buf,
|
||||
database &d,
|
||||
const rocksdb::WriteBatch &wb_,
|
||||
const ulong &fmt)
|
||||
const long &fmt)
|
||||
{
|
||||
auto &wb
|
||||
{
|
||||
|
@ -1121,7 +1121,7 @@ ircd::db::debug(const mutable_buffer &buf,
|
|||
ircd::string_view
|
||||
ircd::db::debug(const mutable_buffer &buf,
|
||||
const txn &t,
|
||||
const ulong &fmt)
|
||||
const long &fmt)
|
||||
{
|
||||
size_t len(0);
|
||||
|
||||
|
@ -4540,8 +4540,8 @@ ircd::string_view
|
|||
ircd::db::debug(const mutable_buffer &buf,
|
||||
const rocksdb::WriteBatch &batch)
|
||||
{
|
||||
char pbuf[48] {0};
|
||||
const auto len(snprintf
|
||||
char pbuf[64] {0};
|
||||
const size_t len(::snprintf
|
||||
(
|
||||
data(buf), size(buf),
|
||||
"%d deltas; %s %s+%s+%s+%s+%s+%s+%s+%s+%s"
|
||||
|
|
|
@ -350,13 +350,13 @@ ircd::ios::stats_name(const descriptor &d,
|
|||
{
|
||||
return string_view
|
||||
{
|
||||
stats_name_buf, ::snprintf
|
||||
stats_name_buf, unsigned(::snprintf
|
||||
(
|
||||
stats_name_buf, sizeof(stats_name_buf),
|
||||
"ircd.ios.%s.%s",
|
||||
d.name.c_str(),
|
||||
key.c_str()
|
||||
)
|
||||
))
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ try
|
|||
|
||||
string_view ret
|
||||
{
|
||||
data(out), sys::call(::read, fd, data(out), size(out))
|
||||
data(out), size_t(sys::call(::read, fd, data(out), size(out)))
|
||||
};
|
||||
|
||||
ret = rstrip(ret, '\n');
|
||||
|
|
|
@ -461,7 +461,7 @@ const
|
|||
{
|
||||
room::events it
|
||||
{
|
||||
room, depth.first
|
||||
room, uint64_t(depth.first)
|
||||
};
|
||||
|
||||
bool ret{true};
|
||||
|
|
|
@ -61,14 +61,13 @@ ircd::stats::get_stats(client &client,
|
|||
|
||||
const string_view line
|
||||
{
|
||||
buf,
|
||||
::snprintf
|
||||
buf, size_t(::snprintf
|
||||
(
|
||||
buf, sizeof(buf), "%s %s %lu\n",
|
||||
data(strlcpy(name[1], _name)),
|
||||
data(string(val, *item)),
|
||||
ts
|
||||
)
|
||||
))
|
||||
};
|
||||
|
||||
response.write(line);
|
||||
|
|
Loading…
Reference in New Issue