mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
Fix compiler warning from menu.c
The patch fixes the compiler warning below
menu.c: In function 'restoreMenuRecurs':
menu.c:2450:47: warning: '%s' directive output may be truncated writing up to 510 bytes into a region of size between 509 and 1019 [-Wformat-truncation=]
2450 | snprintf(buffer, sizeof(buffer), "%s\\%s", path, menu->frame->title);
| ^~
The code is taking care of checking properly the string passed to the buffer,
so there is no issue, the change is just to make the compiler happy.
This commit is contained in:
committed by
Carlos R. Mafra
parent
62405fbb75
commit
492b22d975
@@ -2440,7 +2440,7 @@ static int restoreMenu(WScreen *scr, WMPropList *menu)
|
||||
static int restoreMenuRecurs(WScreen *scr, WMPropList *menus, WMenu *menu, const char *path)
|
||||
{
|
||||
WMPropList *key, *entry;
|
||||
char buffer[512];
|
||||
char buffer[1024];
|
||||
int i, x, y, res;
|
||||
Bool lowered;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user