aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-11-20 00:45:19 +0100
committerScott Anderson <scott@anderso.nz>2019-11-20 02:05:03 +0000
commit16e5e9541b3de49e397a3d2caa3212db25487648 (patch)
tree9d1cc82dc037db865181a6742eade6d866803cd9 /backend/drm
parent685a5a11a9f6305f7479550247b333ffdf036d73 (diff)
Add -Wmissing-prototypes
This requires functions without a prototype definition to be static. This allows to detect dead code, export less symbols and put shared functions in headers.
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/atomic.c6
-rw-r--r--backend/drm/legacy.c4
2 files changed, 2 insertions, 8 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c
index 023307fc..71b18f98 100644
--- a/backend/drm/atomic.c
+++ b/backend/drm/atomic.c
@@ -154,9 +154,6 @@ static bool atomic_conn_enable(struct wlr_drm_backend *drm,
true);
}
-bool legacy_crtc_set_cursor(struct wlr_drm_backend *drm,
- struct wlr_drm_crtc *crtc, struct gbm_bo *bo);
-
static bool atomic_crtc_set_cursor(struct wlr_drm_backend *drm,
struct wlr_drm_crtc *crtc, struct gbm_bo *bo) {
if (!crtc || !crtc->cursor) {
@@ -185,9 +182,6 @@ static bool atomic_crtc_set_cursor(struct wlr_drm_backend *drm,
return atomic_end(drm->fd, &atom);
}
-bool legacy_crtc_move_cursor(struct wlr_drm_backend *drm,
- struct wlr_drm_crtc *crtc, int x, int y);
-
static bool atomic_crtc_move_cursor(struct wlr_drm_backend *drm,
struct wlr_drm_crtc *crtc, int x, int y) {
if (!crtc || !crtc->cursor) {
diff --git a/backend/drm/legacy.c b/backend/drm/legacy.c
index 79cd05b9..32d68814 100644
--- a/backend/drm/legacy.c
+++ b/backend/drm/legacy.c
@@ -68,13 +68,13 @@ bool legacy_crtc_move_cursor(struct wlr_drm_backend *drm,
return !drmModeMoveCursor(drm->fd, crtc->id, x, y);
}
-bool legacy_crtc_set_gamma(struct wlr_drm_backend *drm,
+static bool legacy_crtc_set_gamma(struct wlr_drm_backend *drm,
struct wlr_drm_crtc *crtc, size_t size,
uint16_t *r, uint16_t *g, uint16_t *b) {
return !drmModeCrtcSetGamma(drm->fd, crtc->id, (uint32_t)size, r, g, b);
}
-size_t legacy_crtc_get_gamma_size(struct wlr_drm_backend *drm,
+static size_t legacy_crtc_get_gamma_size(struct wlr_drm_backend *drm,
struct wlr_drm_crtc *crtc) {
return (size_t)crtc->legacy_crtc->gamma_size;
}