[Spice-commits] 5 commits - .gitlab-ci.yml m4/spice-compile-warnings.m4 meson.build server/dcc.h server/reds.cpp server/safe-list.hpp subprojects/spice-common

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 19 09:44:26 UTC 2022


 .gitlab-ci.yml               |    3 ++-
 m4/spice-compile-warnings.m4 |    1 +
 meson.build                  |    1 +
 server/dcc.h                 |    2 ++
 server/reds.cpp              |    1 +
 server/safe-list.hpp         |    8 +++++++-
 subprojects/spice-common     |    2 +-
 7 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 3153ce81f8f1c9fd5cd703d9f1d936fdc42678a4
Author: Frediano Ziglio <freddy77 at gmail.com>
Date:   Mon Jul 18 21:17:41 2022 +0100

    ci: Fix Windows
    
    Provides LANG to avoid error detecting encoding.
    Install all Wine package, installing only core is not enough.
    
    Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 844e1691..f9ad4a29 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -150,7 +150,7 @@ makecheck-windows:
   script:
   - >
     dnf install -y
-    wine-core.x86_64 mingw64-gcc-c++
+    wine mingw64-gcc-c++
     mingw64-openssl mingw64-glib2 mingw64-glib-networking mingw64-libjpeg-turbo
     mingw64-pixman mingw64-opus mingw64-winpthreads mingw64-zlib
     mingw64-gstreamer1-plugins-base mingw64-gstreamer1-plugins-good mingw64-orc
@@ -162,6 +162,7 @@ makecheck-windows:
   - mingw64-make
   - export G_TLS_GNUTLS_PRIORITY="NORMAL:%COMPAT"
   - export WINEPATH='Z:\usr\x86_64-w64-mingw32\sys-root\mingw\bin'
+  - export LANG=en_US.UTF-8
   - (cd server && exec mingw64-make LOG_COMPILE=wine check) || (cat server/tests/test-suite.log && exit 1)
 
 websocket-autobahn:
commit acfa6f6bf8f01fe3b589af202ca9ca397ba00721
Author: Frediano Ziglio <freddy77 at gmail.com>
Date:   Mon Jul 18 20:53:25 2022 +0100

    Fix C++ compatibility issue
    
    Remove deprecation warnings like
    
    In file included from ../../server/char-device.cpp:28:
    ../../server/safe-list.hpp:108:43: error: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Werror=deprecated-declarations]
      108 | class safe_list<T>::iterator: public std::iterator<std::forward_iterator_tag, T>
          |                                           ^~~~~~~~
    
    Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>

diff --git a/server/safe-list.hpp b/server/safe-list.hpp
index 960f21a3..77e2807c 100644
--- a/server/safe-list.hpp
+++ b/server/safe-list.hpp
@@ -105,11 +105,17 @@ public:
 };
 
 template <typename T>
-class safe_list<T>::iterator: public std::iterator<std::forward_iterator_tag, T>
+class safe_list<T>::iterator
 {
     typedef typename std::forward_list<T,Mallocator<T>>::iterator wrapped;
     wrapped curr, next;
 public:
+    using iterator_category = std::forward_iterator_tag;
+    using value_type = T;
+    using difference_type = ptrdiff_t;
+    using pointer = const value_type*;
+    using reference = const value_type&;
+
     iterator(wrapped init_curr) :
         curr(init_curr),
         next(init_curr != wrapped() ? ++init_curr : wrapped())
commit a32b4b5084ac95e542e8503188b32dcfa494d44e
Author: Frediano Ziglio <freddy77 at gmail.com>
Date:   Mon Jul 18 20:44:57 2022 +0100

    Exclude a warning causing new compiler to fail
    
    Due to 0-size array you can have warnings like
    
    c++ -Iserver/libspice-server.so.1.14.1.p -Iserver -I../server -I. -I.. -Isubprojects/spice-common -I../subprojects/spice-common -Isubprojects/spice-common/common -I/usr/include/spice-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/pixman-1 -I/usr/include/opus -I/usr/include/cacard -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/PCSC -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -fvisibility=hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -O3 -DSPICE_SERVER_INTERNAL '-DG_LOG_DOMAIN="Spice"' -Wno-sign-compare -Wno-unused-parameter -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_38 -fno-exceptions -Wno-suggest-final-methods -Wno-suggest-final-types -Wno-array-bounds -Wno-narrowing -Wno-missing-field-initializers -Wno-deprecated-declarations -Wshadow -fPIC -pthread -MD -MQ server/libspice-server.so.1.14.1.p/red-channel-c
 lient.cpp.o -MF server/libspice-server.so.1.14.1.p/red-channel-client.cpp.o.d -o server/libspice-server.so.1.14.1.p/red-channel-client.cpp.o -c ../server/red-channel-client.cpp
    In file included from /usr/include/c++/12/bits/shared_ptr_atomic.h:33,
                     from /usr/include/c++/12/memory:78,
                     from ../server/utils.hpp:24,
                     from ../server/red-pipe-item.h:27,
                     from ../server/red-channel-client.h:24,
                     from ../server/red-channel-client.cpp:37:
    In member function 'std::__atomic_base<_IntTp>::__int_type std::__atomic_base<_IntTp>::operator++() [with _ITp = int]',
        inlined from 'void red::shared_ptr_add_ref(shared_ptr_counted*)' at ../server/utils.hpp:280:5,
        inlined from 'red::shared_ptr<T>::shared_ptr(T*) [with T = RedChannelClient]' at ../server/utils.hpp:143:31,
        inlined from 'void RedChannelClient::receive()' at ../server/red-channel-client.cpp:1123:52,
        inlined from 'void red_channel_client_event(int, int, RedChannelClient*)' at ../server/red-channel-client.cpp:739:21:
    /usr/include/c++/12/bits/atomic_base.h:385:34: error: 'unsigned int __atomic_add_fetch_4(volatile void*, unsigned int, int)' writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
      385 |       { return __atomic_add_fetch(&_M_i, 1, int(memory_order_seq_cst)); }
          |                ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>

diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4
index a2fcbabf..abe4a912 100644
--- a/m4/spice-compile-warnings.m4
+++ b/m4/spice-compile-warnings.m4
@@ -157,6 +157,7 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
 
     # -Wno-array-bounds to avoid checks for array with 0 size
     gl_WARN_ADD([-Wno-array-bounds])
+    gl_WARN_ADD([-Wno-stringop-overflow])
 
     # -Wno-narrowing to allow cast from -1 to unsigned (used in some initialization)
     gl_WARN_ADD([-Wno-narrowing])
diff --git a/meson.build b/meson.build
index 36e6337a..333ad44c 100644
--- a/meson.build
+++ b/meson.build
@@ -198,6 +198,7 @@ spice_server_global_cxxflags += [
   '-Wno-suggest-final-methods',
   '-Wno-suggest-final-types',
   '-Wno-array-bounds',
+  '-Wno-stringop-overflow',
   '-Wno-narrowing',
   '-Wno-missing-field-initializers',
   '-Wno-deprecated-declarations',
commit 736d79949ec5708fd418fe0bcc49fb4db6317e06
Author: Frediano Ziglio <freddy77 at gmail.com>
Date:   Mon Jul 18 20:22:03 2022 +0100

    Update spice-common submodule
    
    This brings in the following changes:
    
    Frediano Ziglio (4):
          Find Python3 installation correctly on MacOS
          build: Correctly check for Python modules
          ci: Set WINEPATH during Windows build
          Replace EVP_PKEY_cmp with EVP_PKEY_eq
    
    Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>

diff --git a/subprojects/spice-common b/subprojects/spice-common
index de79bac8..58d375e5 160000
--- a/subprojects/spice-common
+++ b/subprojects/spice-common
@@ -1 +1 @@
-Subproject commit de79bac8e94ce84f4c88719729d59a6f5e3d6bf3
+Subproject commit 58d375e5eadc6fb9e587e99fd81adcb95d01e8d6
commit e8cb1705095a3efaeb9aa16ccd3de697ad6ce6bc
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Mon Jul 18 16:42:58 2022 +0400

    Fix std::array<> has initializer but incomplete type
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>

diff --git a/server/dcc.h b/server/dcc.h
index 47f83a5e..a8dd3bef 100644
--- a/server/dcc.h
+++ b/server/dcc.h
@@ -19,6 +19,8 @@
 #ifndef DCC_H_
 #define DCC_H_
 
+#include <array>
+
 #include "image-encoders.h"
 #include "image-cache.h"
 #include "pixmap-cache.h"
diff --git a/server/reds.cpp b/server/reds.cpp
index 1ada47d8..06702371 100644
--- a/server/reds.cpp
+++ b/server/reds.cpp
@@ -17,6 +17,7 @@
 */
 #include <config.h>
 
+#include <array>
 #include <cctype>
 #include <climits>
 #include <cstdint>


More information about the Spice-commits mailing list