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:
Emil Velikov 2017-02-10 20:14:22 +00:00 committed by Daniel Stone
parent 906488790b
commit 8f7201ec5e
5 changed files with 10 additions and 10 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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,

View File

@ -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)

View File

@ -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,