diff --git a/Makefile b/Makefile
index e0bf2a8d..e31c8688 100644
--- a/Makefile
+++ b/Makefile
@@ -262,6 +262,7 @@ CFLAGS += -Wstack-protector
#CFLAGS += -Werror (OBS build might have different compiler)
CFLAGS += -Wno-declaration-after-statement
CFLAGS += -Wno-missing-field-initializers
+CFLAGS += -Wimplicit-fallthrough=2
# Linker
LDLIBS += -Wl,--as-needed
diff --git a/evdev.c b/evdev.c
index f6da15a4..3ac5f7c9 100644
--- a/evdev.c
+++ b/evdev.c
@@ -2,7 +2,8 @@
* @file evdev.c
* Mode Control Entity - evdev input device handling
*
- * Copyright (C) 2012-2019 Jolla Ltd.
+ * Copyright (c) 2012 - 2020 Jolla Ltd.
+ * Copyright (c) 2020 Open Mobile Platform LLC.
*
* @author Simo Piiroinen
*
@@ -262,7 +263,8 @@ int evdev_identify_device(int fd)
unsigned long bmap_type[BMAP_SIZE(EV_CNT)];
unsigned long bmap_code[BMAP_SIZE(KEY_CNT)];
unsigned long bmap_stat[BMAP_SIZE(KEY_CNT)];
- char path[256];
+ char linkpath[PATH_MAX];
+ char path[PATH_MAX];
int n;
if( fd < 0 )
@@ -270,8 +272,8 @@ int evdev_identify_device(int fd)
goto cleanup;
}
- snprintf(path, sizeof path, "/proc/self/fd/%d", fd);
- if( (n = readlink(path, path, sizeof path - 1)) <= 0 )
+ snprintf(linkpath, sizeof linkpath, "/proc/self/fd/%d", fd);
+ if( (n = readlink(linkpath, path, sizeof path - 1)) <= 0 )
{
strcpy(path, "unknown");
}
diff --git a/event-input.c b/event-input.c
index f05c1424..96159f21 100644
--- a/event-input.c
+++ b/event-input.c
@@ -2,8 +2,9 @@
* @file event-input.c
* /dev/input event provider for the Mode Control Entity
*
- * Copyright © 2004-2011 Nokia Corporation and/or its subsidiary(-ies).
- * Copyright (C) 2013-2019 Jolla Ltd.
+ * Copyright (c) 2004 - 2011 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2013 - 2020 Jolla Ltd.
+ * Copyright (c) 2020 Open Mobile Platform LLC.
*
* @author David Weinehall
* @author Ismo Laitinen
@@ -3542,6 +3543,7 @@ evin_datapipe_display_state_curr_cb(gconstpointer data)
evin_input_grab_set_touching(&evin_ts_grab_state, true);
evin_input_grab_set_touching(&evin_ts_grab_state, false);
}
+ /* Fall through */
case MCE_DISPLAY_ON:
case MCE_DISPLAY_DIM: