Skip to content

Commit 8887f57

Browse files
rawdev: fix build with clang 21
Fix 16-bits formatting issues reported by clang 21 on Fedora 43: ../lib/rawdev/rte_rawdev.c:429:41: error: format specifies type 'unsigned char' but the argument has type 'uint16_t' (aka 'unsigned short') [-Werror,-Wformat] 429 | RTE_RDEV_DEBUG("Start dev_id=%" PRIu8, dev_id); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ../lib/rawdev/rte_rawdev.c:435:9: error: format specifies type 'unsigned char' but the argument has type 'uint16_t' (aka 'unsigned short') [-Werror,-Wformat] 434 | RTE_RDEV_ERR("Device with dev_id=%" PRIu8 "already started", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 435 | dev_id); | ^~~~~~~ ../lib/rawdev/rte_rawdev.c:457:40: error: format specifies type 'unsigned char' but the argument has type 'uint16_t' (aka 'unsigned short') [-Werror,-Wformat] 457 | RTE_RDEV_DEBUG("Stop dev_id=%" PRIu8, dev_id); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ../lib/rawdev/rte_rawdev.c:464:4: error: format specifies type 'unsigned char' but the argument has type 'uint16_t' (aka 'unsigned short') [-Werror,-Wformat] 463 | RTE_RDEV_ERR("Device with dev_id=%" PRIu8 "already stopped", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 464 | dev_id); | ^~~~~~~ Fixes: c88b3f2 ("rawdev: introduce raw device library") Cc: [email protected] Signed-off-by: David Marchand <[email protected]>
1 parent 9726ac9 commit 8887f57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/rawdev/rte_rawdev.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,12 +426,12 @@ rte_rawdev_start(uint16_t dev_id)
426426
struct rte_rawdev *dev;
427427
int diag;
428428

429-
RTE_RDEV_DEBUG("Start dev_id=%" PRIu8, dev_id);
429+
RTE_RDEV_DEBUG("Start dev_id=%" PRIu16, dev_id);
430430

431431
RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
432432
dev = &rte_rawdevs[dev_id];
433433
if (dev->started != 0) {
434-
RTE_RDEV_ERR("Device with dev_id=%" PRIu8 "already started",
434+
RTE_RDEV_ERR("Device with dev_id=%" PRIu16 "already started",
435435
dev_id);
436436
return 0;
437437
}
@@ -454,13 +454,13 @@ rte_rawdev_stop(uint16_t dev_id)
454454
{
455455
struct rte_rawdev *dev;
456456

457-
RTE_RDEV_DEBUG("Stop dev_id=%" PRIu8, dev_id);
457+
RTE_RDEV_DEBUG("Stop dev_id=%" PRIu16, dev_id);
458458

459459
RTE_RAWDEV_VALID_DEVID_OR_RET(dev_id);
460460
dev = &rte_rawdevs[dev_id];
461461

462462
if (dev->started == 0) {
463-
RTE_RDEV_ERR("Device with dev_id=%" PRIu8 "already stopped",
463+
RTE_RDEV_ERR("Device with dev_id=%" PRIu16 "already stopped",
464464
dev_id);
465465
return;
466466
}

0 commit comments

Comments
 (0)