mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
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.
This commit is contained in:
parent
685a5a11a9
commit
16e5e9541b
24 changed files with 66 additions and 123 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include "backend/libinput.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
struct wlr_libinput_input_device *get_libinput_device_from_device(
|
||||
static struct wlr_libinput_input_device *get_libinput_device_from_device(
|
||||
struct wlr_input_device *wlr_dev) {
|
||||
assert(wlr_input_device_is_libinput(wlr_dev));
|
||||
return (struct wlr_libinput_input_device *)wlr_dev;
|
||||
|
|
|
|||
|
|
@ -447,7 +447,7 @@ static struct zwp_pointer_gesture_pinch_v1_listener gesture_pinch_impl = {
|
|||
};
|
||||
|
||||
|
||||
void relative_pointer_handle_relative_motion(void *data,
|
||||
static void relative_pointer_handle_relative_motion(void *data,
|
||||
struct zwp_relative_pointer_v1 *relative_pointer, uint32_t utime_hi,
|
||||
uint32_t utime_lo, wl_fixed_t dx, wl_fixed_t dy, wl_fixed_t dx_unaccel,
|
||||
wl_fixed_t dy_unaccel) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue