From 8de6e3253b614f2b751cb760b489f487b927d1c5 Mon Sep 17 00:00:00 2001 From: Oxore Date: Mon, 22 May 2023 21:37:47 +0300 Subject: Fix Clang errors and warnings --- disasm.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'disasm.cpp') diff --git a/disasm.cpp b/disasm.cpp index a878c92..09a5149 100644 --- a/disasm.cpp +++ b/disasm.cpp @@ -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(ret) >= strlen("%d0")); - assert(static_cast(ret) <= strlen("-%d0")); + assert(static_cast(ret) >= sizeof("%d0")-1); + assert(static_cast(ret) <= sizeof("-%d0")-1); written += Min(remaining, ret); first_printed = true; } -- cgit v1.2.3