spice/m4
Frediano Ziglio a32b4b5084 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-client.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@gmail.com>
2022-07-19 10:10:26 +01:00
..
ax_pthread.m4 build: Fix undefined pthread references 2021-05-18 08:30:15 +01:00
ax_valgrind_check.m4 build-sys: Do not abort on warnings 2017-04-22 08:44:21 +01:00
manywarnings.m4 Remove -Wchkp warning, deprecated in GCC 9 2019-05-07 13:00:00 +01:00
spice-compile-warnings.m4 Exclude a warning causing new compiler to fail 2022-07-19 10:10:26 +01:00
virt-linker-no-indirect.m4 Use hardened linker flags if available 2013-10-10 11:17:52 +02:00
virt-linker-relro.m4 Use hardened linker flags if available 2013-10-10 11:17:52 +02:00
warnings.m4 Use latest warnings.m4 from gnulib 2013-10-10 11:20:08 +02:00