From 4f514f41d4bc06d4288f44b6fa1e6f7fd2a359e0 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 13 Nov 2020 15:50:47 +0900 Subject: [PATCH] fs/procfs/fs_procfsiobinfo.c: Add a missing entry for can Found by the following compiler warning: procfs/fs_procfsiobinfo.c: In function 'iobinfo_read': procfs/fs_procfsiobinfo.c:344:20: error: '%-16s' directive argument is null [-Werror=format-overflow=] 344 | linesize = snprintf(iobfile->line, IOBINFO_LINELEN, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 345 | "\n%-16s%16lu%16lu\n", | ~~~~~~~~~~~~~~~~~~~~~~ 346 | g_iob_user_names[IOBUSER_GLOBAL], | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 347 | (unsigned long)userstats->totalconsumed, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 348 | (unsigned long)userstats->totalproduced); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors --- fs/procfs/fs_procfsiobinfo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/procfs/fs_procfsiobinfo.c b/fs/procfs/fs_procfsiobinfo.c index 72fe6977e7..dad8fdc4a4 100644 --- a/fs/procfs/fs_procfsiobinfo.c +++ b/fs/procfs/fs_procfsiobinfo.c @@ -168,6 +168,9 @@ static FAR const char *g_iob_user_names[] = #endif #ifdef CONFIG_WIRELESS_BLUETOOTH "bluetooth", +#endif +#ifdef CONFIG_NET_CAN + "can", #endif "global", };