Skip to content

Commit 4752e8c

Browse files
Luo Yifantakaswie
authored andcommitted
tools/firewire: Fix several incorrect format specifiers
Make a minor change to eliminate static checker warnings. Fix several incorrect format specifiers that misused signed and unsigned versions. Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241113023137.291661-1-luoyifan@cmss.chinamobile.com Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
1 parent b7688fc commit 4752e8c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tools/firewire/decode-fcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ decode_avc(struct link_transaction *t)
160160
name = info->name;
161161
}
162162

163-
printf("av/c %s, subunit_type=%s, subunit_id=%d, opcode=%s",
163+
printf("av/c %s, subunit_type=%s, subunit_id=%u, opcode=%s",
164164
ctype_names[frame->ctype], subunit_type_names[frame->subunit_type],
165165
frame->subunit_id, name);
166166

tools/firewire/nosy-dump.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ print_packet(uint32_t *data, size_t length)
771771
if (pp->phy_config.set_root)
772772
printf(" set_root_id=%02x", pp->phy_config.root_id);
773773
if (pp->phy_config.set_gap_count)
774-
printf(" set_gap_count=%d", pp->phy_config.gap_count);
774+
printf(" set_gap_count=%u", pp->phy_config.gap_count);
775775
}
776776
break;
777777

@@ -781,13 +781,13 @@ print_packet(uint32_t *data, size_t length)
781781

782782
case PHY_PACKET_SELF_ID:
783783
if (pp->self_id.extended) {
784-
printf("extended self id: phy_id=%02x, seq=%d",
784+
printf("extended self id: phy_id=%02x, seq=%u",
785785
pp->ext_self_id.phy_id, pp->ext_self_id.sequence);
786786
} else {
787787
static const char * const speed_names[] = {
788788
"S100", "S200", "S400", "BETA"
789789
};
790-
printf("self id: phy_id=%02x, link %s, gap_count=%d, speed=%s%s%s",
790+
printf("self id: phy_id=%02x, link %s, gap_count=%u speed=%s%s%s",
791791
pp->self_id.phy_id,
792792
(pp->self_id.link_active ? "active" : "not active"),
793793
pp->self_id.gap_count,

0 commit comments

Comments
 (0)