(svn r1616) Introduce ttd_strlcat() and use it to de-uglify some piece of code in misc_cmd.
While here rename the len parameter of ttd_strlcpy() to size, because it is a buffer size and not a string length. Also add -Wwrite-strings to the Makefile, because the above mentioned piece of code was the only part which triggered this warning.
This commit is contained in:
1
Makefile
1
Makefile
@@ -300,6 +300,7 @@ CC_VERSION = $(shell $(CC) -dumpversion | cut -c 1,3)
|
||||
# this is a workaround to test for >=
|
||||
ifeq ($(shell if test $(CC_VERSION) -ge 29; then echo true; fi), true)
|
||||
CFLAGS += -O -Wall -Wno-multichar -Wsign-compare -Wstrict-prototypes
|
||||
CFLAGS += -Wwrite-strings
|
||||
endif
|
||||
ifeq ($(shell if test $(CC_VERSION) -ge 30; then echo true; fi), true)
|
||||
CFLAGS += -W -Wno-unused-parameter
|
||||
|
||||
Reference in New Issue
Block a user