Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Fails to build #2740

Closed
gnzlbg opened this issue Feb 12, 2021 · 2 comments
Closed

Fails to build #2740

gnzlbg opened this issue Feb 12, 2021 · 2 comments
Labels

Comments

@gnzlbg
Copy link

gnzlbg commented Feb 12, 2021

My toolchain is gcc --version: gcc (GCC) 10.2.0 , and meson --version: 0.56.2

[240/242] Compiling C object libwlroots.so.7.p/types_wlr_surface.c.o
FAILED: libwlroots.so.7.p/types_wlr_surface.c.o
cc -Ilibwlroots.so.7.p -I. -I.. -Iinclude -I../include -Iprotocol -I../protocol -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/uuid -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -g -DWLR_USE_UNSTABLE -Wundef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wstrict-prototypes -Wimplicit-fallthrough=2 -Wendif-labels -Wstrict-aliasing=2 -Woverflow -Wmissing-prototypes -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-parameter -fmacro-prefix-map=../= -DHAS_LIBUUID=1 '-DICONDIR="/usr/share/icons"' -march=native -O3 -fno-plt -g0 -g -fvar-tracking-assignments -fdebug-prefix-map=$HOME/.cache/rua/build/wlroots-git/src=/usr/src/debug -D_FORTIFY_SOURCE=2 -fPIC -MD -MQ libwlroots.so.7.p/types_wlr_surface.c.o -MF libwlroots.so.7.p/types_wlr_surface.c.o.d -o libwlroots.so.7.p/types_wlr_surface.c.o -c ../types/wlr_surface.c

./types/wlr_surface.c: In function ‘surface_commit_pending’:
../types/wlr_surface.c:235:55: error: ‘src_width’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  235 |    float scale_x = (float)pending->viewport.dst_width / src_width;
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../types/wlr_surface.c:233:8: note: ‘src_width’ was declared here
  233 |    int src_width, src_height;
      |        ^~~~~~~~~
../types/wlr_surface.c:236:56: error: ‘src_height’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  236 |    float scale_y = (float)pending->viewport.dst_height / src_height;
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
../types/wlr_surface.c:233:19: note: ‘src_height’ was declared here
  233 |    int src_width, src_height;
      |                   ^~~~~~~~~~
../types/wlr_surface.c: In function ‘wlr_surface_get_effective_damage’:
../types/wlr_surface.c:1293:62: error: ‘src_width’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1293 |   float scale_x = (float)surface->current.viewport.dst_width / src_width;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../types/wlr_surface.c:1294:63: error: ‘src_height’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1294 |   float scale_y = (float)surface->current.viewport.dst_height / src_height;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
cc1: all warnings being treated as errors
@emersion
Copy link
Member

See #2736

@gnzlbg
Copy link
Author

gnzlbg commented Feb 12, 2021

Thanks.

What caused this error? (shouldn't CI have caught it?)

emersion added a commit to emersion/wlroots that referenced this issue Feb 15, 2021
This fixes some build warnings.

Closes: swaywm#2740
References: swaywm#2736
@emersion emersion added the bug label Feb 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants