X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain.cpp;h=5eb211cb41b7d4a976e7d55cc3ae2780d2d45816;hb=b166f3512f5e426e60a4ff610a9f07239ac18ea1;hp=6de8597ebcb83851710b87a7d2c1fd9e88faf07a;hpb=7678bfc942bd501f8e121ff153d1852d73578257;p=staging%2Fwindowmanager.git diff --git a/src/main.cpp b/src/main.cpp index 6de8597..5eb211c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,7 @@ +#include "app.hpp" #include "json_helper.hpp" #include "util.hpp" #include "wayland.hpp" -#include "app.hpp" #include #include @@ -31,8 +31,8 @@ int afb_instance::init() { return this->app.init(); } -int display_event_callback(sd_event_source *evs, int fd, uint32_t events, - void *data) { +int display_event_callback(sd_event_source *evs, int /*fd*/, uint32_t events, + void * /*data*/) { if ((events & EPOLLHUP) != 0) { logerror("The compositor hung up, dying now."); delete g_afb_instance; @@ -40,10 +40,10 @@ int display_event_callback(sd_event_source *evs, int fd, uint32_t events, goto error; } - if (events & EPOLLIN) { - if (g_afb_instance->app.dispatch_events() == -1) { - goto error; - } + if ((events & EPOLLIN) != 0u) { + if (g_afb_instance->app.dispatch_events() == -1) { + goto error; + } } return 0; @@ -107,9 +107,9 @@ int binding_init() noexcept { return -1; } -} // namespace +} // namespace -#include "afb_binding.inl" +#include "afb_binding_glue.inl" extern "C" const struct afb_binding_v2 afbBindingV2 = { - "winman", NULL, NULL, winman_verbs, NULL, binding_init, NULL, 1}; + "winman", nullptr, nullptr, winman_verbs, nullptr, binding_init, nullptr, 1};