aboutsummaryrefslogtreecommitdiffstats
path: root/tests/data/small-client-core.h
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2020-04-21 12:47:56 +0200
committerGuido Günther <agx@sigxcpu.org>2020-04-23 10:17:18 +0200
commitcc8b6aa3d937dda055cb25fdbec55d0afb6be2a0 (patch)
tree3420a62dc21d15e8675cb2a765f4c2c5886d36d8 /tests/data/small-client-core.h
parentdoc/man: remove manually written man pages (diff)
downloadwayland-cc8b6aa3d937dda055cb25fdbec55d0afb6be2a0.tar
wayland-cc8b6aa3d937dda055cb25fdbec55d0afb6be2a0.tar.gz
wayland-cc8b6aa3d937dda055cb25fdbec55d0afb6be2a0.tar.bz2
wayland-cc8b6aa3d937dda055cb25fdbec55d0afb6be2a0.tar.lz
wayland-cc8b6aa3d937dda055cb25fdbec55d0afb6be2a0.tar.xz
wayland-cc8b6aa3d937dda055cb25fdbec55d0afb6be2a0.tar.zst
wayland-cc8b6aa3d937dda055cb25fdbec55d0afb6be2a0.zip
scanner: Guard interface declarations
This allows to include client and server headers in the same file fixing warnings like In file included from ../subprojects/wlroots/include/wlr/types/wlr_layer_shell_v1.h:16, from ../src/desktop.h:16, from ../src/server.h:13, from ../tests/testlib.c:8: tests/59830eb@@footest@sta/wlr-layer-shell-unstable-v1-protocol.h:80:34: warning: redundant redeclaration of ‘zwlr_layer_shell_v1_interface’ [-Wredundant-decls] 80 | extern const struct wl_interface zwlr_layer_shell_v1_interface; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../tests/testlib.h:8, from ../tests/testlib.c:7: tests/59830eb@@footest@sta/wlr-layer-shell-unstable-v1-client-protocol.h:77:34: note: previous declaration of ‘zwlr_layer_shell_v1_interface’ was here 77 | extern const struct wl_interface zwlr_layer_shell_v1_interface; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../subprojects/wlroots/include/wlr/types/wlr_layer_shell_v1.h:16, from ../src/desktop.h:16, from ../src/server.h:13, from ../tests/testlib.c:8: tests/59830eb@@footest@sta/wlr-layer-shell-unstable-v1-protocol.h:106:34: warning: redundant redeclaration of ‘zwlr_layer_surface_v1_interface’ [-Wredundant-decls] 106 | extern const struct wl_interface zwlr_layer_surface_v1_interface; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../tests/testlib.h:8, from ../tests/testlib.c:7: tests/59830eb@@footest@sta/wlr-layer-shell-unstable-v1-client-protocol.h:103:34: note: previous declaration of ‘zwlr_layer_surface_v1_interface’ was here 103 | extern const struct wl_interface zwlr_layer_surface_v1_interface; Signed-off-by: Guido Günther <agx@sigxcpu.org> Closes: #158
Diffstat (limited to 'tests/data/small-client-core.h')
-rw-r--r--tests/data/small-client-core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/data/small-client-core.h b/tests/data/small-client-core.h
index c85cca6..d424757 100644
--- a/tests/data/small-client-core.h
+++ b/tests/data/small-client-core.h
@@ -46,6 +46,8 @@ struct another_intf;
struct intf_A;
struct intf_not_here;
+#ifndef INTF_A_INTERFACE
+#define INTF_A_INTERFACE
/**
* @page page_iface_intf_A intf_A
* @section page_iface_intf_A_desc Description
@@ -60,6 +62,7 @@ struct intf_not_here;
* A useless example trying to tickle the scanner.
*/
extern const struct wl_interface intf_A_interface;
+#endif
#ifndef INTF_A_FOO_ENUM
#define INTF_A_FOO_ENUM