libweston/launcher: annotate iface(s) as constant data
Already considered and handled as such. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
906488790b
commit
8f7201ec5e
|
@ -319,7 +319,7 @@ launcher_direct_get_vt(struct weston_launcher *base)
|
|||
return minor(s.st_rdev);
|
||||
}
|
||||
|
||||
struct launcher_interface launcher_direct_iface = {
|
||||
const struct launcher_interface launcher_direct_iface = {
|
||||
launcher_direct_connect,
|
||||
launcher_direct_destroy,
|
||||
launcher_direct_open,
|
||||
|
|
|
@ -42,9 +42,9 @@ struct launcher_interface {
|
|||
};
|
||||
|
||||
struct weston_launcher {
|
||||
struct launcher_interface *iface;
|
||||
const struct launcher_interface *iface;
|
||||
};
|
||||
|
||||
extern struct launcher_interface launcher_logind_iface;
|
||||
extern struct launcher_interface launcher_weston_launch_iface;
|
||||
extern struct launcher_interface launcher_direct_iface;
|
||||
extern const struct launcher_interface launcher_logind_iface;
|
||||
extern const struct launcher_interface launcher_weston_launch_iface;
|
||||
extern const struct launcher_interface launcher_direct_iface;
|
||||
|
|
|
@ -837,7 +837,7 @@ launcher_logind_get_vt(struct weston_launcher *launcher)
|
|||
return wl->vtnr;
|
||||
}
|
||||
|
||||
struct launcher_interface launcher_logind_iface = {
|
||||
const struct launcher_interface launcher_logind_iface = {
|
||||
launcher_logind_connect,
|
||||
launcher_logind_destroy,
|
||||
launcher_logind_open,
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <unistd.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
static struct launcher_interface *ifaces[] = {
|
||||
static const struct launcher_interface *ifaces[] = {
|
||||
#ifdef HAVE_SYSTEMD_LOGIN
|
||||
&launcher_logind_iface,
|
||||
#endif
|
||||
|
@ -48,10 +48,10 @@ WL_EXPORT struct weston_launcher *
|
|||
weston_launcher_connect(struct weston_compositor *compositor, int tty,
|
||||
const char *seat_id, bool sync_drm)
|
||||
{
|
||||
struct launcher_interface **it;
|
||||
const struct launcher_interface **it;
|
||||
|
||||
for (it = ifaces; *it != NULL; it++) {
|
||||
struct launcher_interface *iface = *it;
|
||||
const struct launcher_interface *iface = *it;
|
||||
struct weston_launcher *launcher;
|
||||
|
||||
if (iface->connect(&launcher, compositor, tty, seat_id, sync_drm) == 0)
|
||||
|
|
|
@ -290,7 +290,7 @@ launcher_weston_launch_get_vt(struct weston_launcher *base)
|
|||
return minor(s.st_rdev);
|
||||
}
|
||||
|
||||
struct launcher_interface launcher_weston_launch_iface = {
|
||||
const struct launcher_interface launcher_weston_launch_iface = {
|
||||
launcher_weston_launch_connect,
|
||||
launcher_weston_launch_destroy,
|
||||
launcher_weston_launch_open,
|
||||
|
|
Loading…
Reference in New Issue