mirror of
https://github.com/moparisthebest/imapfilter
synced 2024-11-14 13:25:25 -05:00
Enable extra compiler checks and correct warnings.
This commit is contained in:
parent
69b650137a
commit
7dec2a8ec7
@ -16,7 +16,7 @@ LIBPCRE = -lpcre
|
||||
LIBSSL = -lssl
|
||||
LIBCRYPTO = -lcrypto
|
||||
|
||||
CFLAGS = -Wall -O -DCONFIG_SHAREDIR='"$(SHAREDIR)"' $(INCDIRS) $(MYCFLAGS)
|
||||
CFLAGS = -Wall -Wextra -O -DCONFIG_SHAREDIR='"$(SHAREDIR)"' $(INCDIRS) $(MYCFLAGS)
|
||||
LDFLAGS = $(LIBDIRS) $(MYLDFLAGS)
|
||||
LIBS = -lm $(LIBLUA) $(LIBPCRE) $(LIBSSL) $(LIBCRYPTO) $(MYLIBS)
|
||||
|
||||
|
@ -51,7 +51,7 @@ debug(const char *fmt,...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
if (opts.debug <= 0 || !debugfp)
|
||||
if (!opts.debug || !debugfp)
|
||||
return;
|
||||
|
||||
va_start(args, fmt);
|
||||
@ -68,7 +68,7 @@ void
|
||||
debugc(char c)
|
||||
{
|
||||
|
||||
if (opts.debug <= 0 || !debugfp)
|
||||
if (!opts.debug || !debugfp)
|
||||
return;
|
||||
|
||||
fputc(c, debugfp);
|
||||
|
@ -308,12 +308,12 @@ reverse_conversion(const char *mbox)
|
||||
}
|
||||
|
||||
/* Convert from Unicode to UTF-8. */
|
||||
if (ucp[0] >= 0x00 && ucp[0] <= 0x07) {
|
||||
if (ucp[0] <= 0x07) {
|
||||
*out++ = 0xC0 | (ucp[0] << 2 & 0x1C) |
|
||||
(ucp[1] >> 6 & 0x03);
|
||||
*out++ = 0x80 | (ucp[1] & 0x3F);
|
||||
} else if ((ucp[0] >= 0x08 && ucp[0] <= 0xD7) ||
|
||||
(ucp[0] >= 0xE0 && ucp[0] <= 0xFF)) {
|
||||
ucp[0] >= 0xE0) {
|
||||
*out++ = 0xE0 | (ucp[0] >> 4 & 0x0F);
|
||||
*out++ = 0x80 | (ucp[0] << 2 & 0x1C) |
|
||||
(ucp[1] >> 6 & 0x03);
|
||||
|
@ -168,7 +168,7 @@ int
|
||||
check_preauth(char *buf)
|
||||
{
|
||||
|
||||
if (xstrcasestr(ibuf.data, "* PREAUTH"))
|
||||
if (xstrcasestr(buf, "* PREAUTH"))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user