From 68b4a5305e8dfca2056d0b49d947e8df831c6961 Mon Sep 17 00:00:00 2001 From: Antonin Décimo Date: Fri, 9 Aug 2019 15:36:35 +0200 Subject: backend/session: non-void function should return a value With assertions disabled, it should make sense to return NULL. --- backend/session/logind.c | 1 + backend/session/session.c | 1 + 2 files changed, 2 insertions(+) (limited to 'backend/session') diff --git a/backend/session/logind.c b/backend/session/logind.c index 066003d9..393924e8 100644 --- a/backend/session/logind.c +++ b/backend/session/logind.c @@ -258,6 +258,7 @@ static struct wlr_device *find_device(struct wlr_session *session, wlr_log(WLR_ERROR, "Tried to use dev_t %lu not opened by session", (unsigned long)devnum); assert(0); + return NULL; } static int pause_device(sd_bus_message *msg, void *userdata, diff --git a/backend/session/session.c b/backend/session/session.c index 70b4a567..a98093c7 100644 --- a/backend/session/session.c +++ b/backend/session/session.c @@ -197,6 +197,7 @@ static struct wlr_device *find_device(struct wlr_session *session, int fd) { wlr_log(WLR_ERROR, "Tried to use fd %d not opened by session", fd); assert(0); + return NULL; } void wlr_session_close_file(struct wlr_session *session, int fd) { -- cgit v1.2.3