History

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=]

Detlef Riekenberg committed 4 years ago

Commit ecf8e5a1 parent fe6b5c01 file · +1 −1Browse files

Unified · Split

tccelf.c+1−1
@@ -3706,7 +3706,7 @@ static int ld_add_file(TCCState *s1, const char filename[]) · 3705 unmodified lines
3706 3706
3707static int ld_add_file_list(TCCState *s1, const char *cmd, int as_needed)3707static int ld_add_file_list(TCCState *s1, const char *cmd, int as_needed)
3708{3708{
3709 char filename[1024], libname[1024];3709 char filename[1024], libname[1016];
3710 int t, group, nblibs = 0, ret = 0;3710 int t, group, nblibs = 0, ret = 0;
3711 char **libs = NULL;3711 char **libs = NULL;
3712 3712

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t