src: remove unused #includes (via include-what-you-use)

This commit is contained in:
John Lindgren 2025-09-02 23:19:38 -04:00 committed by Hiroaki Yamamoto
parent 7c185c1a85
commit b00873a988
52 changed files with 5 additions and 114 deletions

View file

@ -16,17 +16,14 @@
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <strings.h>
#ifdef __FreeBSD__
#include <sys/event.h> /* For signalfd() */
#endif
#include <sys/signalfd.h>
#include <sys/stat.h>
#include <sys/timerfd.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
#include <wayland-client.h>
#include <wayland-cursor.h>
#include <wlr/util/log.h>
#include "action-prompt-codes.h"
@ -62,8 +59,6 @@ struct conf {
ssize_t button_padding;
};
struct nag;
struct pointer {
struct wl_pointer *pointer;
uint32_t serial;

View file

@ -5,18 +5,14 @@
* Copyright (C) 2016-2017 Drew DeVault
*/
#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <cairo.h>
#include <errno.h>
#include <fcntl.h>
#include <pango/pangocairo.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <time.h>
#include <unistd.h>
#include <wayland-client.h>
#include "pool-buffer.h"
static int anonymous_shm_open(void)

View file

@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "common/box.h"
#include <assert.h>
#include "common/macros.h"
bool

View file

@ -7,16 +7,13 @@
#include "common/dir.h"
#include <assert.h>
#include <glib.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include "common/buf.h"
#include "common/list.h"
#include "common/mem.h"
#include "common/string-helpers.h"
#include "config/rcxml.h"
#include "labwc.h"
struct dir {
const char *prefix;

View file

@ -1,14 +1,10 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "common/font.h"
#include <cairo.h>
#include <drm_fourcc.h>
#include <pango/pangocairo.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/util/box.h>
#include <wlr/util/log.h>
#include "common/graphic-helpers.h"
#include "common/string-helpers.h"
#include "labwc.h"
#include "buffer.h"
PangoFontDescription *

View file

@ -3,7 +3,7 @@
#include "common/graphic-helpers.h"
#include <cairo.h>
#include <glib.h> /* g_ascii_strcasecmp */
#include <wlr/types/wlr_scene.h>
#include <wlr/util/box.h>
#include "common/macros.h"
#include "xcolor-table.h"

View file

@ -2,7 +2,6 @@
#include "common/parse-double.h"
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <wlr/util/log.h>
#include "common/mem.h"

View file

@ -5,12 +5,8 @@
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/util/log.h>
#include <wlr/util/region.h>
#include <wlr/util/transform.h>
#include "labwc.h"
#include "magnifier.h"
#include "output.h"
#include "output-state.h"
struct wlr_surface *
lab_wlr_surface_from_node(struct wlr_scene_node *node)

View file

@ -6,7 +6,6 @@
#include <glib.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
#include <wlr/util/log.h>

View file

@ -3,7 +3,6 @@
#include "config/keybind.h"
#include <assert.h>
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wlr/types/wlr_keyboard_group.h>

View file

@ -4,7 +4,6 @@
#include <assert.h>
#include <linux/input-event-codes.h>
#include <strings.h>
#include <unistd.h>
#include <wlr/util/log.h>
#include "common/list.h"
#include "common/mem.h"

View file

@ -2,17 +2,13 @@
#define _POSIX_C_SOURCE 200809L
#include "config/rcxml.h"
#include <assert.h>
#include <fcntl.h>
#include <glib.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <wayland-server-core.h>
#include <wlr/util/box.h>
#include <wlr/util/log.h>
#include "action.h"

View file

@ -8,14 +8,12 @@
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <wlr/backend/drm.h>
#include <wlr/backend/multi.h>
#include <wlr/util/log.h>
#include "common/buf.h"
#include "common/dir.h"
#include "common/file-helpers.h"
#include "common/mem.h"
#include "common/parse-bool.h"
#include "common/spawn.h"
#include "common/string-helpers.h"

View file

@ -3,7 +3,6 @@
#include "config/touch.h"
#include <strings.h>
#include <wlr/util/log.h>
#include "common/list.h"
#include "config/rcxml.h"
static struct touch_config_entry *

View file

@ -7,12 +7,10 @@
#include <string.h>
#include <strings.h>
#include <wlr/util/log.h>
#include "common/macros.h"
#include "common/mem.h"
#include "common/string-helpers.h"
#include "config/rcxml.h"
#include "img/img.h"
#include "labwc.h"
static const char *debug_libsfdo;

View file

@ -10,13 +10,10 @@
#include "labwc.h"
#include "layers.h"
#include "node.h"
#include "osd.h"
#include "output.h"
#include "ssd.h"
#include "view.h"
#include "window-rules.h"
#include "workspaces.h"
#include "xwayland.h"
#if HAVE_XWAYLAND
#include <wlr/xwayland.h>

View file

@ -3,7 +3,6 @@
#include <assert.h>
#include <limits.h>
#include <pixman.h>
#include <wlr/util/edges.h>
#include <wlr/util/box.h>
#include "common/border.h"
#include "common/box.h"

View file

@ -4,12 +4,10 @@
*/
#define _POSIX_C_SOURCE 200809L
#include "img/img-png.h"
#include <assert.h>
#include <cairo.h>
#include <png.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <wlr/util/log.h>
#include "buffer.h"
#include "common/string-helpers.h"

View file

@ -6,13 +6,10 @@
#include "img/img-svg.h"
#include <cairo.h>
#include <librsvg/rsvg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <wlr/util/log.h>
#include "buffer.h"
#include "common/string-helpers.h"
#include "labwc.h"
RsvgHandle *
img_svg_load(const char *filename)

View file

@ -8,13 +8,10 @@
#define _POSIX_C_SOURCE 200809L
#include "img/img-xbm.h"
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <drm_fourcc.h>
#include "img/img.h"
#include "common/grab-file.h"
#include "common/mem.h"
#include "common/string-helpers.h"

View file

@ -2,7 +2,6 @@
#include "img/img.h"
#include <assert.h>
#include <wlr/util/log.h>
#include "buffer.h"
#include "config.h"
#include "common/box.h"

View file

@ -2,8 +2,6 @@
#define _POSIX_C_SOURCE 200809L
#include "input/cursor.h"
#include <assert.h>
#include <linux/input-event-codes.h>
#include <sys/time.h>
#include <time.h>
#include <wlr/backend/libinput.h>
#include <wlr/types/wlr_cursor_shape_v1.h>
@ -19,7 +17,6 @@
#include "action.h"
#include "common/macros.h"
#include "common/mem.h"
#include "common/scene-helpers.h"
#include "common/surface-helpers.h"
#include "config/mousebind.h"
#include "config/rcxml.h"
@ -33,7 +30,6 @@
#include "layers.h"
#include "menu/menu.h"
#include "output.h"
#include "regions.h"
#include "resistance.h"
#include "resize-outlines.h"
#include "ssd.h"

View file

@ -11,7 +11,6 @@
#include "labwc.h"
#include "node.h"
#include "output.h"
#include "view.h"
#define SAME_CLIENT(wlr_obj1, wlr_obj2) \
(wl_resource_get_client((wlr_obj1)->resource) \

View file

@ -4,8 +4,6 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wlr/util/log.h>
#include "common/set.h"
static struct lab_set pressed, bound, pressed_sent;

View file

@ -3,7 +3,6 @@
#include "input/keyboard.h"
#include <assert.h>
#include <stdlib.h>
#include <wlr/backend/multi.h>
#include <wlr/backend/session.h>
#include <wlr/interfaces/wlr_keyboard.h>
#include <wlr/types/wlr_keyboard_group.h>
@ -17,7 +16,6 @@
#include "labwc.h"
#include "menu/menu.h"
#include "osd.h"
#include "regions.h"
#include "session-lock.h"
#include "view.h"
#include "workspaces.h"

View file

@ -1,11 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "input/tablet-pad.h"
#include <assert.h>
#include <stdlib.h>
#include <wlr/backend/libinput.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_tablet_pad.h>
#include <wlr/types/wlr_tablet_tool.h>
#include <wlr/util/log.h>
#include "common/macros.h"
#include "common/mem.h"

View file

@ -1,9 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "input/tablet.h"
#include <assert.h>
#include <stdlib.h>
#include <linux/input-event-codes.h>
#include <wlr/types/wlr_tablet_pad.h>
#include <wlr/types/wlr_tablet_tool.h>
#include <wlr/util/log.h>
#include <wlr/types/wlr_scene.h>

View file

@ -7,7 +7,6 @@
#include "output.h"
#include "regions.h"
#include "resize-indicator.h"
#include "snap.h"
#include "view.h"
#include "window-rules.h"

View file

@ -10,9 +10,7 @@
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <wayland-server.h>
#include <wlr/types/wlr_fractional_scale_v1.h>
#include <wlr/types/wlr_layer_shell_v1.h>
#include <wlr/types/wlr_xdg_shell.h>

View file

@ -3,7 +3,6 @@
#include "menu/menu.h"
#include <assert.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@ -20,7 +19,6 @@
#include "common/lab-scene-rect.h"
#include "common/list.h"
#include "common/mem.h"
#include "common/scene-helpers.h"
#include "common/spawn.h"
#include "common/string-helpers.h"
#include "common/xml.h"

View file

@ -1,24 +1,20 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <assert.h>
#include <cairo.h>
#include <wlr/util/log.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/util/box.h>
#include <wlr/util/log.h>
#include "common/array.h"
#include "common/buf.h"
#include "common/font.h"
#include "common/lab-scene-rect.h"
#include "common/scene-helpers.h"
#include "common/string-helpers.h"
#include "config/rcxml.h"
#include "labwc.h"
#include "node.h"
#include "osd.h"
#include "output.h"
#include "scaled-buffer/scaled-font-buffer.h"
#include "scaled-buffer/scaled-icon-buffer.h"
#include "theme.h"
#include "view.h"
#include "window-rules.h"
#include "workspaces.h"
struct osd_classic_scene_item {

View file

@ -2,7 +2,6 @@
#include <assert.h>
#include <wlr/render/swapchain.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/render/allocator.h>
#include "config/rcxml.h"
#include "common/array.h"

View file

@ -1,23 +1,19 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "osd.h"
#include <assert.h>
#include <cairo.h>
#include <wlr/util/log.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/util/box.h>
#include "common/array.h"
#include "common/lab-scene-rect.h"
#include "common/scene-helpers.h"
#include "config/rcxml.h"
#include "labwc.h"
#include "node.h"
#include "output.h"
#include "scaled-buffer/scaled-font-buffer.h"
#include "scaled-buffer/scaled-icon-buffer.h"
#include "ssd.h"
#include "theme.h"
#include "view.h"
#include "window-rules.h"
#include "workspaces.h"
static void update_osd(struct server *server);

View file

@ -12,8 +12,6 @@
#include <strings.h>
#include <wlr/backend/drm.h>
#include <wlr/backend/wayland.h>
#include <wlr/types/wlr_buffer.h>
#include <wlr/types/wlr_drm_lease_v1.h>
#include <wlr/types/wlr_gamma_control_v1.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_management_v1.h>
@ -21,7 +19,6 @@
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/types/wlr_xdg_output_v1.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/util/region.h>
#include <wlr/util/log.h>
#include "common/macros.h"
#include "common/mem.h"

View file

@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <assert.h>
#include <wlr/types/wlr_output.h>
#include <wlr/util/log.h>
#include "common/array.h"
#include "common/mem.h"

View file

@ -1,8 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <assert.h>
#include <wlr/types/wlr_output.h>
#include <wlr/util/log.h>
#include "common/array.h"
#include "common/mem.h"
#include "common/list.h"
#include "ext-workspace-v1-protocol.h"

View file

@ -6,9 +6,7 @@
#include <float.h>
#include <math.h>
#include <string.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/util/box.h>
#include <wlr/util/log.h>
#include "common/list.h"
#include "common/mem.h"
#include "config/rcxml.h"

View file

@ -1,9 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "resistance.h"
#include <assert.h>
#include <limits.h>
#include "common/border.h"
#include "common/macros.h"
#include "config/rcxml.h"
#include "edges.h"
#include "labwc.h"

View file

@ -4,9 +4,7 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <wayland-server-core.h>
#include <wlr/util/log.h>
#include "buffer.h"
#include "common/font.h"
#include "common/graphic-helpers.h"
#include "common/mem.h"

View file

@ -5,7 +5,6 @@
#include <string.h>
#include <wlr/util/log.h>
#include "buffer.h"
#include "common/macros.h"
#include "common/mem.h"
#include "common/string-helpers.h"
#include "config.h"

View file

@ -2,9 +2,6 @@
#define _POSIX_C_SOURCE 200809L
#include "scaled-buffer/scaled-img-buffer.h"
#include <assert.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_scene.h>
#include "buffer.h"
#include "common/mem.h"
#include "img/img.h"
#include "node.h"

View file

@ -19,7 +19,6 @@
#include <wlr/types/wlr_ext_image_copy_capture_v1.h>
#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
#include <wlr/types/wlr_fractional_scale_v1.h>
#include <wlr/types/wlr_gamma_control_v1.h>
#include <wlr/types/wlr_input_method_v2.h>
#include <wlr/types/wlr_linux_drm_syncobj_v1.h>
#include <wlr/types/wlr_output_power_management_v1.h>
@ -45,7 +44,6 @@
#include "xwayland-shell-v1-protocol.h"
#endif
#include "drm-lease-v1-protocol.h"
#include "action.h"
#include "common/macros.h"
#include "config/rcxml.h"
@ -59,7 +57,6 @@
#include "magnifier.h"
#include "menu/menu.h"
#include "output.h"
#include "output-state.h"
#include "output-virtual.h"
#include "regions.h"
#include "resize-indicator.h"

View file

@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "snap-constraints.h"
#include <assert.h>
#include <string.h>
#include <wlr/util/box.h>
#include "common/macros.h"
#include "labwc.h"
#include "view.h"
/*

View file

@ -3,7 +3,6 @@
#include <assert.h>
#include <wlr/types/wlr_scene.h>
#include "common/macros.h"
#include "common/scene-helpers.h"
#include "labwc.h"
#include "ssd.h"
#include "ssd-internal.h"

View file

@ -1,9 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <assert.h>
#include <pixman.h>
#include <wlr/types/wlr_scene.h>
#include "common/scene-helpers.h"
#include "config/rcxml.h"
#include "labwc.h"
#include "output.h"

View file

@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <assert.h>
#include <cairo.h>
#include <wlr/types/wlr_scene.h>
#include "buffer.h"
#include "config/rcxml.h"

View file

@ -6,11 +6,8 @@
#include <wlr/render/pixman.h>
#include "buffer.h"
#include "common/mem.h"
#include "common/scene-helpers.h"
#include "common/string-helpers.h"
#include "config/rcxml.h"
#include "desktop-entry.h"
#include "img/img.h"
#include "labwc.h"
#include "node.h"
#include "scaled-buffer/scaled-font-buffer.h"

View file

@ -11,7 +11,6 @@
#include <strings.h>
#include <wlr/types/wlr_scene.h>
#include "common/mem.h"
#include "common/scene-helpers.h"
#include "config/rcxml.h"
#include "labwc.h"
#include "node.h"

View file

@ -7,7 +7,6 @@
#define _POSIX_C_SOURCE 200809L
#include "theme.h"
#include "config.h"
#include <assert.h>
#include <cairo.h>
#include <drm_fourcc.h>

View file

@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/* view-impl-common.c: common code for shell view->impl functions */
#include "view-impl-common.h"
#include <strings.h>
#include "foreign-toplevel/foreign.h"
#include "labwc.h"
#include "view.h"

View file

@ -13,7 +13,6 @@
#include "common/list.h"
#include "common/match.h"
#include "common/mem.h"
#include "common/scene-helpers.h"
#include "config/rcxml.h"
#include "foreign-toplevel/foreign.h"
#include "input/keyboard.h"
@ -33,7 +32,6 @@
#include "window-rules.h"
#include "wlr/util/log.h"
#include "workspaces.h"
#include "xwayland.h"
#if HAVE_XWAYLAND
#include <wlr/xwayland.h>

View file

@ -3,12 +3,8 @@
#include "window-rules.h"
#include <assert.h>
#include <stdbool.h>
#include <cairo.h>
#include <glib.h>
#include <strings.h>
#include <wlr/util/log.h>
#include "action.h"
#include "common/match.h"
#include "config/rcxml.h"
#include "labwc.h"
#include "view.h"