diff options
author | Oxore <oxore@protonmail.com> | 2023-05-22 21:37:47 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2023-05-22 21:40:56 +0300 |
commit | 8de6e3253b614f2b751cb760b489f487b927d1c5 (patch) | |
tree | 07b3db01ec39cdc72f83d8206d05ff47551f8da8 /disasm.cpp | |
parent | cdabbbcfa0717b2253f79e04eb6ac14996cf9dca (diff) |
Fix Clang errors and warnings
Diffstat (limited to 'disasm.cpp')
-rw-r--r-- | disasm.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -738,7 +738,7 @@ static size_t disasm_move_to( case AddrMode::kImmediate: break; } - node.op = Op::Typical(OpCode::kMOVE, opsize, src, Arg{reg, 0}); + node.op = Op::Typical(OpCode::kMOVE, opsize, src, Arg{{reg}, {0}}); return node.size = kInstructionSizeStepBytes + src.Size(opsize); } @@ -1806,8 +1806,8 @@ static size_t snprint_reg_mask( const size_t remaining = bufsz - written; const int ret = snprintf(buf + written, remaining, "%s%%%c%d", delimiter, regtype, id); assert(ret > 0); - assert(static_cast<unsigned>(ret) >= strlen("%d0")); - assert(static_cast<unsigned>(ret) <= strlen("-%d0")); + assert(static_cast<unsigned>(ret) >= sizeof("%d0")-1); + assert(static_cast<unsigned>(ret) <= sizeof("-%d0")-1); written += Min(remaining, ret); first_printed = true; } |