phkaeser / wlmaker

Wayland Maker - A Wayland compositor inspired by Window Maker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to build with Clang + -Werror

jbeich opened this issue · comments

Applying phkaeser/libbase@349d02e9cabb to wlmaker produces:

$ export CC=clang CXX=clang++
$ cmake -B /tmp/wlmaker_build
$ cmake --build /tmp/wlmaker_build
[...]
src/clip.c:330:14: error: explicitly assigning value of variable of type 'wlmaker_clip_t *' (aka 'struct _wlmaker_clip_t *') to itself [-Werror,-Wself-assign]
  330 |     clip_ptr = clip_ptr;  // unused.
      |     ~~~~~~~~ ^ ~~~~~~~~
src/clip.c:377:21: error: explicitly assigning value of variable of type 'wlmaker_interactive_t *' (aka 'struct _wlmaker_interactive_t *') to itself [-Werror,-Wself-assign]
  377 |     interactive_ptr = interactive_ptr;  // unused.
      |     ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
src/clip.c:393:21: error: explicitly assigning value of variable of type 'wlmaker_interactive_t *' (aka 'struct _wlmaker_interactive_t *') to itself [-Werror,-Wself-assign]
  393 |     interactive_ptr = interactive_ptr;  // unused.
      |     ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
src/dock_app.c:312:27: error: explicitly assigning value of variable of type 'wlmaker_subprocess_handle_t *' (aka 'struct _wlmaker_subprocess_handle_t *') to itself [-Werror,-Wself-assign]
  312 |     subprocess_handle_ptr = subprocess_handle_ptr;
      |     ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~
src/iconified.c:204:27: error: explicitly assigning value of variable of type 'struct wlr_scene_surface *' to itself [-Werror,-Wself-assign]
  204 |     wlr_scene_surface_ptr = wlr_scene_surface_ptr;
      |     ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~
src/menu_item.c:95:19: error: explicitly assigning value of variable of type 'const wlmaker_menu_item_t *' (aka 'const struct _wlmaker_menu_item_t *') to itself [-Werror,-Wself-assign]
   95 |     menu_item_ptr = menu_item_ptr;  // currently unused.
      |     ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
src/layer_shell.c:135:23: error: explicitly assigning value of variable of type 'wlmaker_layer_surface_t *' (aka 'struct _wlmaker_layer_surface_t *') to itself [-Werror,-Wself-assign]
  135 |     layer_surface_ptr = layer_surface_ptr;
      |     ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
src/menu.c:238:14: error: explicitly assigning value of variable of type 'wlmaker_menu_t *' to itself [-Werror,-Wself-assign]
  238 |     menu_ptr = menu_ptr;
      |     ~~~~~~~~ ^ ~~~~~~~~
src/menu.c:259:14: error: explicitly assigning value of variable of type 'wlmaker_menu_t *' to itself [-Werror,-Wself-assign]
  259 |     menu_ptr = menu_ptr;
      |     ~~~~~~~~ ^ ~~~~~~~~
src/menu.c:260:7: error: explicitly assigning value of variable of type 'double' to itself [-Werror,-Wself-assign]
  260 |     x = x; y = y;
      |     ~ ^ ~
src/menu.c:260:14: error: explicitly assigning value of variable of type 'double' to itself [-Werror,-Wself-assign]
  260 |     x = x; y = y;
      |            ~ ^ ~
src/clip.c:330:14: error: explicitly assigning value of variable of type 'wlmaker_clip_t *' (aka 'struct _wlmaker_clip_t *') to itself [-Werror,-Wself-assign]
  330 |     clip_ptr = clip_ptr;  // unused.
      |     ~~~~~~~~ ^ ~~~~~~~~
src/clip.c:377:21: error: explicitly assigning value of variable of type 'wlmaker_interactive_t *' (aka 'struct _wlmaker_interactive_t *') to itself [-Werror,-Wself-assign]
  377 |     interactive_ptr = interactive_ptr;  // unused.
      |     ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
src/clip.c:393:21: error: explicitly assigning value of variable of type 'wlmaker_interactive_t *' (aka 'struct _wlmaker_interactive_t *') to itself [-Werror,-Wself-assign]
  393 |     interactive_ptr = interactive_ptr;  // unused.
      |     ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
src/dock_app.c:312:27: error: explicitly assigning value of variable of type 'wlmaker_subprocess_handle_t *' (aka 'struct _wlmaker_subprocess_handle_t *') to itself [-Werror,-Wself-assign]
  312 |     subprocess_handle_ptr = subprocess_handle_ptr;
      |     ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~
src/iconified.c:204:27: error: explicitly assigning value of variable of type 'struct wlr_scene_surface *' to itself [-Werror,-Wself-assign]
  204 |     wlr_scene_surface_ptr = wlr_scene_surface_ptr;
      |     ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~
src/menu_item.c:95:19: error: explicitly assigning value of variable of type 'const wlmaker_menu_item_t *' (aka 'const struct _wlmaker_menu_item_t *') to itself [-Werror,-Wself-assign]
   95 |     menu_item_ptr = menu_item_ptr;  // currently unused.
      |     ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
src/layer_shell.c:135:23: error: explicitly assigning value of variable of type 'wlmaker_layer_surface_t *' (aka 'struct _wlmaker_layer_surface_t *') to itself [-Werror,-Wself-assign]
  135 |     layer_surface_ptr = layer_surface_ptr;
      |     ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
src/menu.c:238:14: error: explicitly assigning value of variable of type 'wlmaker_menu_t *' to itself [-Werror,-Wself-assign]
  238 |     menu_ptr = menu_ptr;
      |     ~~~~~~~~ ^ ~~~~~~~~
src/menu.c:259:14: error: explicitly assigning value of variable of type 'wlmaker_menu_t *' to itself [-Werror,-Wself-assign]
  259 |     menu_ptr = menu_ptr;
      |     ~~~~~~~~ ^ ~~~~~~~~
src/menu.c:260:7: error: explicitly assigning value of variable of type 'double' to itself [-Werror,-Wself-assign]
  260 |     x = x; y = y;
      |     ~ ^ ~
src/menu.c:260:14: error: explicitly assigning value of variable of type 'double' to itself [-Werror,-Wself-assign]
  260 |     x = x; y = y;
      |            ~ ^ ~

Heh, that's surprising => Clang on wlmaker should not (yet) have -Werror applied.

But good to fix that nonetheless. PR in progress.