diff options
author | pfg <pfg@FreeBSD.org> | 2017-11-04 14:35:01 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2017-11-04 14:35:01 +0000 |
commit | 82f5d2b57b15a5b32a92f60b020667eeaafd3272 (patch) | |
tree | 243bc38d662ea47f2487661f87b11dae5e8b206a /lib | |
parent | 0519574f8cf9e9258b0499d6f2833990b377c5d7 (diff) | |
download | FreeBSD-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/Makefile | 4 | ||||
-rw-r--r-- | lib/libedit/chartype.c | 1 |
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) |