tccelf: Avoid a compiler warning with snprintf

Target buffer must be larger as the format string + the replacement for %s
to avoid a warning [-Wformat-truncation=]

Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
This commit is contained in:
Detlef Riekenberg 2022-04-12 01:06:10 +02:00
parent fe6b5c08dc
commit ecf8e5a00e

View file

@ -3706,7 +3706,7 @@ static int ld_add_file(TCCState *s1, const char filename[])
static int ld_add_file_list(TCCState *s1, const char *cmd, int as_needed) static int ld_add_file_list(TCCState *s1, const char *cmd, int as_needed)
{ {
char filename[1024], libname[1024]; char filename[1024], libname[1016];
int t, group, nblibs = 0, ret = 0; int t, group, nblibs = 0, ret = 0;
char **libs = NULL; char **libs = NULL;