<p></p>
<h3>Description</h3>
<p>Handful of new compile warnings popped up with Kamailio 5.3.5.</p>
<h4>Reproduction</h4>
<p>Compile warnings:</p>
<pre><code>CC (gcc) [M app_sqlang.so]               app_sqlang_mod.o
make --no-print-directory -C ./squirrel/squirrel SQMARCH64="-m64" CC_EXTRA_FLAGS="-fPIC" \
        OUT="../../libsquirrel.a" sq64
gcc -O2 -m64 -D_SQ64 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c sqapi.cpp sqbaselib.cpp sqfuncstate.cpp sqdebug.cpp sqlexer.cpp sqobject.cpp sqcompiler.cpp sqstate.cpp sqtable.cpp sqmem.cpp sqvm.cpp sqclass.cpp -I../include -I. -Iinclude -fPIC
In file included from sqobject.h:5,
                 from sqpcheader.h:17,
                 from sqapi.cpp:4:
squtils.h: In instantiation of 'void sqvector<T>::remove(SQUnsignedInteger) [with T = SQObjectPtr; SQUnsignedInteger = long long unsigned int]':
sqarray.h:83:27:   required from here
squtils.h:97:20: warning: 'void* memmove(void*, const void*, size_t)' writing to an object of type 'struct SQObjectPtr' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
   97 |             memmove(&_vals[idx], &_vals[idx+1], sizeof(T) * (_size - idx - 1));
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from sqpcheader.h:17,
                 from sqapi.cpp:4:
sqobject.h:205:8: note: 'struct SQObjectPtr' declared here
  205 | struct SQObjectPtr : public SQObject
      |        ^~~~~~~~~~~
In file included from sqobject.h:5,
                 from sqpcheader.h:17,
                 from sqbaselib.cpp:4:
squtils.h: In instantiation of 'void sqvector<T>::remove(SQUnsignedInteger) [with T = SQObjectPtr; SQUnsignedInteger = long long unsigned int]':
sqarray.h:83:27:   required from here
squtils.h:97:20: warning: 'void* memmove(void*, const void*, size_t)' writing to an object of type 'struct SQObjectPtr' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
   97 |             memmove(&_vals[idx], &_vals[idx+1], sizeof(T) * (_size - idx - 1));
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from sqpcheader.h:17,
                 from sqbaselib.cpp:4:
sqobject.h:205:8: note: 'struct SQObjectPtr' declared here
  205 | struct SQObjectPtr : public SQObject
      |        ^~~~~~~~~~~
In file included from sqobject.h:5,
                 from sqpcheader.h:17,
                 from sqobject.cpp:4:
squtils.h: In instantiation of 'void sqvector<T>::remove(SQUnsignedInteger) [with T = SQObjectPtr; SQUnsignedInteger = long long unsigned int]':
sqarray.h:83:27:   required from here
squtils.h:97:20: warning: 'void* memmove(void*, const void*, size_t)' writing to an object of type 'struct SQObjectPtr' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
   97 |             memmove(&_vals[idx], &_vals[idx+1], sizeof(T) * (_size - idx - 1));
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from sqpcheader.h:17,
                 from sqobject.cpp:4:
sqobject.h:205:8: note: 'struct SQObjectPtr' declared here
  205 | struct SQObjectPtr : public SQObject
      |        ^~~~~~~~~~~
In file included from sqobject.h:5,
                 from sqpcheader.h:17,
                 from sqstate.cpp:4:
squtils.h: In instantiation of 'void sqvector<T>::remove(SQUnsignedInteger) [with T = SQObjectPtr; SQUnsignedInteger = long long unsigned int]':
sqarray.h:83:27:   required from here
squtils.h:97:20: warning: 'void* memmove(void*, const void*, size_t)' writing to an object of type 'struct SQObjectPtr' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
   97 |             memmove(&_vals[idx], &_vals[idx+1], sizeof(T) * (_size - idx - 1));
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from sqpcheader.h:17,
                 from sqstate.cpp:4:
sqobject.h:205:8: note: 'struct SQObjectPtr' declared here
  205 | struct SQObjectPtr : public SQObject
      |        ^~~~~~~~~~~
In file included from sqobject.h:5,
                 from sqpcheader.h:17,
                 from sqvm.cpp:4:
squtils.h: In instantiation of 'void sqvector<T>::remove(SQUnsignedInteger) [with T = SQObjectPtr; SQUnsignedInteger = long long unsigned int]':
sqarray.h:83:27:   required from here
squtils.h:97:20: warning: 'void* memmove(void*, const void*, size_t)' writing to an object of type 'struct SQObjectPtr' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
   97 |             memmove(&_vals[idx], &_vals[idx+1], sizeof(T) * (_size - idx - 1));
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from sqpcheader.h:17,
                 from sqvm.cpp:4:
sqobject.h:205:8: note: 'struct SQObjectPtr' declared here
  205 | struct SQObjectPtr : public SQObject
      |        ^~~~~~~~~~~
ar rc ../../libsquirrel.a *.o
rm *.o
make --no-print-directory -C ./squirrel/sqstdlib SQMARCH64="-m64" CC_EXTRA_FLAGS="-fPIC" \
        OUT="../../libsqstdlib.a" sq64
gcc -O2 -m64 -fno-exceptions -D_SQ64 -fno-rtti -Wall -fno-strict-aliasing -c sqstdblob.cpp sqstdio.cpp sqstdstream.cpp sqstdmath.cpp sqstdsystem.cpp sqstdstring.cpp sqstdaux.cpp sqstdrex.cpp -I../include -I. -Iinclude -fPIC
ar rc ../../libsqstdlib.a *.o
rm *.o
</code></pre>
<h4>Debugging Data</h4>
<p><strong>Operating System</strong>:</p>
<p>Alpine Linux Latest</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2400">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKJ4QD7GMEKKHQHKC3R3S2I5ANCNFSM4OZ3CTLQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZNIEL5LZQPX5QREINLR3S2I5A5CNFSM4OZ3CTL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JZG5UAA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2400",
"url": "https://github.com/kamailio/kamailio/issues/2400",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>