diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-12-13 10:13:24 -0500 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-12-13 10:26:35 -0500 |
commit | a337bf319c9cb1dc9a9f10aa43626efdc6f6171d (patch) | |
tree | 48fea139fbf6d90fe11c44779ce2a9dc895c57f0 /src/panfrost/midgard/disassemble.c | |
parent | f204791cd6cf5998b04ea9df2d8de37c89adda56 (diff) |
pan/midgard: Handle misc. cppcheck warnings
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/disassemble.c')
-rw-r--r-- | src/panfrost/midgard/disassemble.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/panfrost/midgard/disassemble.c b/src/panfrost/midgard/disassemble.c index 784dba9a9c9..0b4dc72be9f 100644 --- a/src/panfrost/midgard/disassemble.c +++ b/src/panfrost/midgard/disassemble.c @@ -487,10 +487,8 @@ print_mask(uint8_t mask, unsigned bits, midgard_dest_override override) const char *alphabet = components; - if (override == midgard_dest_override_upper) { - unsigned components = 128 / bits; - alphabet += components; - } + if (override == midgard_dest_override_upper) + alphabet += (128 / bits); for (unsigned i = 0; i < 8; i += skip) { bool a = (mask & (1 << i)) != 0; @@ -1310,7 +1308,7 @@ print_texture_word(uint32_t *word, unsigned tabs, unsigned in_reg_base, unsigned /* Output modifiers are always interpreted floatly */ print_outmod(texture->outmod, false); - printf(" %sr%d", texture->out_full ? "" : "h", + printf(" %sr%u", texture->out_full ? "" : "h", out_reg_base + texture->out_reg_select); print_mask_4(texture->mask, texture->out_upper); assert(!(texture->out_full && texture->out_upper)); @@ -1346,7 +1344,7 @@ print_texture_word(uint32_t *word, unsigned tabs, unsigned in_reg_base, unsigned } print_swizzle_vec4(texture->swizzle, false, false); - printf(", %sr%d", texture->in_reg_full ? "" : "h", in_reg_base + texture->in_reg_select); + printf(", %sr%u", texture->in_reg_full ? "" : "h", in_reg_base + texture->in_reg_select); assert(!(texture->in_reg_full && texture->in_reg_upper)); /* TODO: integrate with swizzle */ @@ -1372,7 +1370,7 @@ print_texture_word(uint32_t *word, unsigned tabs, unsigned in_reg_base, unsigned bool select = texture->offset_x & 2; bool upper = texture->offset_x & 4; - printf("%sr%d", full ? "" : "h", in_reg_base + select); + printf("%sr%u", full ? "" : "h", in_reg_base + select); assert(!(texture->out_full && texture->out_upper)); /* TODO: integrate with swizzle */ |