mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix signed-unsigned comparison.
We compared the return value of `sizeof` which returns a `std::size_t` with an `int` which GCC warned about. This patch changes the `int` to a `size_t`.
This commit is contained in:
parent
e33528ec5b
commit
7ad0255274
1 changed files with 1 additions and 1 deletions
|
@ -851,7 +851,7 @@ inline ValPtr to_val(const hilti::rt::Bitfield<Ts...>& v, TypePtr target) {
|
|||
throw TypeMismatch("bitfield", target);
|
||||
|
||||
auto rval = make_intrusive<RecordVal>(rtype);
|
||||
int idx = 0;
|
||||
size_t idx = 0;
|
||||
hilti::rt::tuple_for_each(v.value, [&](const auto& x) {
|
||||
if ( idx < sizeof...(Ts) - 1 ) // last element is original integer value, with no record equivalent
|
||||
set_record_field(rval.get(), rtype, idx++, x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue