mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-04 15:37:05 +00:00
lib, pbrd, zebra: Fix size_t type printf warnings on obscure platforms
Use the correct printf formater for those obscure platforms that we build against. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
fb09579ef7
commit
fa0069c647
@ -93,10 +93,9 @@ static void cpu_record_hash_free(void *a)
|
||||
static void vty_out_cpu_thread_history(struct vty *vty,
|
||||
struct cpu_thread_history *a)
|
||||
{
|
||||
vty_out(vty, "%5"PRIdFAST32" %10lu.%03lu %9"PRIuFAST32
|
||||
" %8lu %9lu %8lu %9lu", a->total_active,
|
||||
a->cpu.total / 1000, a->cpu.total % 1000, a->total_calls,
|
||||
a->cpu.total / a->total_calls, a->cpu.max,
|
||||
vty_out(vty, "%5zu %10zu.%03lu %9zu %8zu %9zu %8lu %9lu",
|
||||
a->total_active, a->cpu.total / 1000, a->cpu.total % 1000,
|
||||
a->total_calls, a->cpu.total / a->total_calls, a->cpu.max,
|
||||
a->real.total / a->total_calls, a->real.max);
|
||||
vty_out(vty, " %c%c%c%c%c %s\n",
|
||||
a->types & (1 << THREAD_READ) ? 'R' : ' ',
|
||||
|
||||
@ -240,18 +240,19 @@ static int rule_notify_owner(int command, struct zclient *zclient,
|
||||
switch (note) {
|
||||
case ZAPI_RULE_FAIL_INSTALL:
|
||||
pbrms->installed &= ~installed;
|
||||
DEBUGD(&pbr_dbg_zebra, "%s: Received RULE_FAIL_INSTALL: %lu",
|
||||
DEBUGD(&pbr_dbg_zebra,
|
||||
"%s: Received RULE_FAIL_INSTALL: %" PRIu64,
|
||||
__PRETTY_FUNCTION__, pbrms->installed);
|
||||
break;
|
||||
case ZAPI_RULE_INSTALLED:
|
||||
pbrms->installed |= installed;
|
||||
DEBUGD(&pbr_dbg_zebra, "%s: Received RULE_INSTALLED: %lu",
|
||||
DEBUGD(&pbr_dbg_zebra, "%s: Received RULE_INSTALLED: %" PRIu64,
|
||||
__PRETTY_FUNCTION__, pbrms->installed);
|
||||
break;
|
||||
case ZAPI_RULE_FAIL_REMOVE:
|
||||
case ZAPI_RULE_REMOVED:
|
||||
pbrms->installed &= ~installed;
|
||||
DEBUGD(&pbr_dbg_zebra, "%s: Received RULE REMOVED: %lu",
|
||||
DEBUGD(&pbr_dbg_zebra, "%s: Received RULE REMOVED: %" PRIu64,
|
||||
__PRETTY_FUNCTION__, pbrms->installed);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -280,8 +280,9 @@ size_t _rta_get(caddr_t sap, void *destp, size_t destlen, bool checkaf)
|
||||
}
|
||||
|
||||
if (copylen > destlen) {
|
||||
zlog_warn("%s: destination buffer too small (%lu vs %lu)",
|
||||
__func__, copylen, destlen);
|
||||
zlog_warn(
|
||||
"%s: destination buffer too small (%zu vs %zu)",
|
||||
__func__, copylen, destlen);
|
||||
memcpy(dest, sap, destlen);
|
||||
} else
|
||||
memcpy(dest, sap, copylen);
|
||||
@ -316,8 +317,9 @@ size_t rta_getsdlname(caddr_t sap, void *destp, short *destlen)
|
||||
|
||||
if (copylen > 0 && dest != NULL && sdl->sdl_family == AF_LINK) {
|
||||
if (copylen > IFNAMSIZ) {
|
||||
zlog_warn("%s: destination buffer too small (%lu vs %d)",
|
||||
__func__, copylen, IFNAMSIZ);
|
||||
zlog_warn(
|
||||
"%s: destination buffer too small (%zu vs %d)",
|
||||
__func__, copylen, IFNAMSIZ);
|
||||
memcpy(dest, sdl->sdl_data, IFNAMSIZ);
|
||||
dest[IFNAMSIZ] = 0;
|
||||
*destlen = IFNAMSIZ;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user