Skip to content

tango.h: Ignore GCC warning from idl file

  • Figure out why this is not found with current CI -> debian12 release mode with PCH
  • Add CI to check that this warning is now ignored.

Since GCC 12 from debian bookworm we get the warning

In file included from /home/tango/include/omniORB4/omniInternal.h:44,
                 from /home/tango/include/omniORB4/CORBA.h:63,
                 from /builds/[MASKED]/TangoSourceDistribution/tango-dev/build/lib/cpp/src/include/tango/idl/tango.h:12,
                 from /builds/[MASKED]/TangoSourceDistribution/tango-dev/lib/cpp/src/include/tango/tango.h:55,
                 from /builds/[MASKED]/TangoSourceDistribution/tango-dev/build/lib/cpp/src/common/CMakeFiles/common_objects.dir/cmake_pch.hxx:5,
                 from <command-line>:
In member function 'void _CORBA_Sequence<T>::copybuffer(_CORBA_ULong) [with T = unsigned char]',
    inlined from 'void _CORBA_Sequence<T>::length(_CORBA_ULong) [with T = unsigned char]' at /home/tango/include/omniORB4/seqTemplatedecls.h:55:12,
    inlined from 'void Tango::DeviceAttribute::operator<<(unsigned char)' at /builds/[MASKED]/TangoSourceDistribution/tango-dev/lib/cpp/src/client/devapi_attr.cpp:1931:20:
/home/tango/include/omniORB4/seqTemplatedecls.h:211:17: warning: writing 8 bytes into a region of size 1 [-Wstringop-overflow=]
  211 |       newbuf[i] = pd_buf[i];
      |       ~~~~~~~~~~^~~~~~~~~
In static member function 'static T* _CORBA_Sequence<T>::allocbuf(_CORBA_ULong) [with T = unsigned char]',
    inlined from 'void _CORBA_Sequence<T>::copybuffer(_CORBA_ULong) [with T = unsigned char]' at /home/tango/include/omniORB4/seqTemplatedecls.h:205:25,
    inlined from 'void _CORBA_Sequence<T>::length(_CORBA_ULong) [with T = unsigned char]' at /home/tango/include/omniORB4/seqTemplatedecls.h:55:12,
    inlined from 'void Tango::DeviceAttribute::operator<<(unsigned char)' at /builds/[MASKED]/TangoSourceDistribution/tango-dev/lib/cpp/src/client/devapi_attr.cpp:1931:20:
/home/tango/include/omniORB4/seqTemplatedecls.h:84:13: note: destination object of size 1 allocated by 'operator new []'
   84 |       tmp = new T[nelems];
      |             ^~~~~~~~~~~~~

when compiling. According to the omniORB maintainer 1 this is a false positive, so let's ignore it to avoid confusion.

Close #1046 (closed)

Edited by Thomas Braun

Merge request reports