diff --git a/IncSet.c b/IncSet.c index cee3565b..56f9c32f 100644 --- a/IncSet.c +++ b/IncSet.c @@ -156,7 +156,7 @@ bool IncSet_handleKey(IncSet* this, int ch, Panel* panel, IncMode_GetPanelValue doSearch = false; } else if (0 < ch && ch < 255 && isprint((unsigned char)ch)) { if (mode->index < INCMODE_MAX) { - mode->buffer[mode->index] = ch; + mode->buffer[mode->index] = (char) ch; mode->index++; mode->buffer[mode->index] = 0; if (mode->isFilter) { diff --git a/Panel.c b/Panel.c index 64e6d4e6..a5773d52 100644 --- a/Panel.c +++ b/Panel.c @@ -453,7 +453,7 @@ HandlerResult Panel_selectByTyping(Panel* this, int ch) { } if (len < 99) { - buffer[len] = ch; + buffer[len] = (char) ch; buffer[len + 1] = '\0'; } @@ -470,7 +470,7 @@ HandlerResult Panel_selectByTyping(Panel* this, int ch) { // if current word did not match, // retry considering the character the start of a new word. - buffer[0] = ch; + buffer[0] = (char) ch; buffer[1] = '\0'; } diff --git a/Panel.h b/Panel.h index cf110c90..9bb4c77e 100644 --- a/Panel.h +++ b/Panel.h @@ -67,7 +67,7 @@ struct Panel_ { int selectedLen; void* eventHandlerState; int scrollV; - short scrollH; + int scrollH; bool needsRedraw; bool wasFocus; FunctionBar* currentBar; diff --git a/configure.ac b/configure.ac index 0824d2e3..2a4880ba 100644 --- a/configure.ac +++ b/configure.ac @@ -668,7 +668,8 @@ AS_VAR_IF(CACHEVAR,yes, AS_VAR_POPDEF([CACHEVAR])dnl ])dnl AX_CHECK_COMPILE_FLAGS -AX_CHECK_COMPILE_FLAG([-Wnull-dereference], [AM_CFLAGS="$AM_CFLAGS -Wnull-dereference"], , [-Werror]) +AX_CHECK_COMPILE_FLAG([-Wimplicit-int-conversion], [AM_CFLAGS="$AM_CFLAGS -Wimplicit-int-conversion"], , [-Werror]) +AX_CHECK_COMPILE_FLAG([-Wnull-dereference], [AM_CFLAGS="$AM_CFLAGS -Wnull-dereference"], , [-Werror]) AC_ARG_ENABLE([werror], [AS_HELP_STRING([--enable-werror],