summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2017-11-04 14:35:01 +0000
committerpfg <pfg@FreeBSD.org>2017-11-04 14:35:01 +0000
commit82f5d2b57b15a5b32a92f60b020667eeaafd3272 (patch)
tree243bc38d662ea47f2487661f87b11dae5e8b206a /lib
parent0519574f8cf9e9258b0499d6f2833990b377c5d7 (diff)
downloadFreeBSD-src-82f5d2b57b15a5b32a92f60b020667eeaafd3272.zip
FreeBSD-src-82f5d2b57b15a5b32a92f60b020667eeaafd3272.tar.gz
MFC r323547, r323598:
libedit: add missing bracket. We never hit this because we always build with widechar support. Raise the warning level to 3.
Diffstat (limited to 'lib')
-rw-r--r--lib/libedit/Makefile4
-rw-r--r--lib/libedit/chartype.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/libedit/Makefile b/lib/libedit/Makefile
index 81ba647..a11d89d 100644
--- a/lib/libedit/Makefile
+++ b/lib/libedit/Makefile
@@ -7,6 +7,8 @@ LIB= edit
SHLIB_MAJOR= 7
SHLIBDIR?= /lib
+WARNS?= 3
+
OSRCS= chared.c common.c el.c eln.c emacs.c fcns.c filecomplete.c help.c \
hist.c keymacro.c map.c chartype.c \
parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c
@@ -41,8 +43,6 @@ CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit -DWIDECHAR
#CFLAGS+= -DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
#CFLAGS+= -DDEBUG_PASTE -DDEBUG_EDIT
-WARNS?= 1
-
SUBDIR= edit/readline
AHDR= vi.h emacs.h common.h
diff --git a/lib/libedit/chartype.c b/lib/libedit/chartype.c
index 9cb54ac..44fb953 100644
--- a/lib/libedit/chartype.c
+++ b/lib/libedit/chartype.c
@@ -223,6 +223,7 @@ ct_mbrtowc(wchar_t *wc, const char *s, size_t n)
size_t
ct_mbrtowc(wchar_t *wc, const char *s, size_t n)
+{
if (s == NULL)
return 0;
if (n == 0)
OpenPOWER on IntegriCloud