Merge pull request #119764 from danielfullmer/looking-glass-B3

looking-glass-client: B2 -> B3

authored by Sandro and committed by GitHub 5b2aabc6 c6cd7e32

+59 -5
+45
pkgs/applications/virtualization/looking-glass-client/0001-client-all-fix-more-maybe-uninitialized-when-O3-is-i.patch
··· 1 + From 95a7293b30ff7b89d615daea00269ed32f4b70a2 Mon Sep 17 00:00:00 2001 2 + From: Geoffrey McRae <geoff@hostfission.com> 3 + Date: Tue, 23 Feb 2021 20:25:30 +1100 4 + Subject: [PATCH] [client] all: fix more `maybe-uninitialized` when `-O3` is in 5 + use 6 + 7 + Closes #475 8 + --- 9 + client/renderers/EGL/egl.c | 3 ++- 10 + client/src/main.c | 5 +++-- 11 + 2 files changed, 5 insertions(+), 3 deletions(-) 12 + 13 + diff --git a/client/renderers/EGL/egl.c b/client/renderers/EGL/egl.c 14 + index b7a5644..72ce50d 100644 15 + --- a/client/renderers/EGL/egl.c 16 + +++ b/client/renderers/EGL/egl.c 17 + @@ -271,7 +271,8 @@ static void egl_calc_mouse_size(struct Inst * this) 18 + if (!this->formatValid) 19 + return; 20 + 21 + - int w, h; 22 + + int w = 0, h = 0; 23 + + 24 + switch(this->format.rotate) 25 + { 26 + case LG_ROTATE_0: 27 + diff --git a/client/src/main.c b/client/src/main.c 28 + index f05e929..f5d6fad 100644 29 + --- a/client/src/main.c 30 + +++ b/client/src/main.c 31 + @@ -186,8 +186,9 @@ static void updatePositionInfo(void) 32 + if (!g_state.haveSrcSize) 33 + goto done; 34 + 35 + - float srcW; 36 + - float srcH; 37 + + float srcW = 0.0f; 38 + + float srcH = 0.0f; 39 + + 40 + switch(params.winRotate) 41 + { 42 + case LG_ROTATE_0: 43 + -- 44 + 2.30.1 45 +
+14 -5
pkgs/applications/virtualization/looking-glass-client/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, cmake, pkg-config, SDL2, SDL2_ttf, spice-protocol 2 2 , fontconfig, libX11, freefont_ttf, nettle, libpthreadstubs, libXau, libXdmcp 3 - , libXi, libXext, wayland, libffi, libGLU, expat, libbfd 3 + , libXi, libXext, wayland, wayland-protocols, libffi, libGLU, libXScrnSaver 4 + , expat, libbfd 4 5 }: 5 6 6 7 stdenv.mkDerivation rec { 7 8 pname = "looking-glass-client"; 8 - version = "B2"; 9 + version = "B3"; 9 10 10 11 src = fetchFromGitHub { 11 12 owner = "gnif"; 12 13 repo = "LookingGlass"; 13 14 rev = version; 14 - sha256 = "100b5kzh8gr81kzw5fdqz2jsms25hv3815d31vy3qd6lrlm5gs3d"; 15 + sha256 = "1vmabjzn85p0brdian9lbpjq39agzn8k0limn8zjm713lh3n3c0f"; 15 16 fetchSubmodules = true; 16 17 }; 17 18 ··· 19 20 20 21 buildInputs = [ 21 22 SDL2 SDL2_ttf spice-protocol fontconfig libX11 freefont_ttf nettle 22 - libpthreadstubs libXau libXdmcp libXi libXext wayland libffi libGLU expat 23 - libbfd 23 + libpthreadstubs libXau libXdmcp libXi libXext wayland wayland-protocols 24 + libffi libGLU libXScrnSaver expat libbfd 25 + ]; 26 + 27 + patches = [ 28 + # error: ‘h’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 29 + # Fixed upstream in master in 8771103abbfd04da9787dea760405364af0d82de, but not in B3. 30 + # Including our own patch here since upstream commit patch doesnt apply cleanly on B3 31 + ./0001-client-all-fix-more-maybe-uninitialized-when-O3-is-i.patch 24 32 ]; 33 + patchFlags = "-p2"; 25 34 26 35 sourceRoot = "source/client"; 27 36 NIX_CFLAGS_COMPILE = "-mavx"; # Fix some sort of AVX compiler problem.