Was giving
m_syswrap/syswrap-main.c:370:28: warning: variable 'saved' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]
370 | syscall_mask, &saved, sizeof(vki_sigset_t)
| ^~~~~
Initialising it is probably the safest thing to do, but I suspect that the
argument ought not to be const. Will check on that.
While I'm at it, looking at how Solaris handles the carry flag it's much
better than the global variable used by FreeBSD and Darwin. Will check on
that as well.
{
vki_sigset_t saved;
UWord err;
-# if defined(VGO_freebsd)
- Word real_syscallno;
-# endif
# if defined(VGO_linux)
err = ML_(do_syscall_for_client_WRK)(
syscallno, &tst->arch.vex,
syscall_mask, &saved, sizeof(vki_sigset_t)
);
# elif defined(VGO_freebsd)
+ Word real_syscallno;
+ VG_(sigemptyset)(&saved);
if (tst->arch.vex.guest_SC_CLASS == VG_FREEBSD_SYSCALL0)
real_syscallno = __NR_syscall;
else if (tst->arch.vex.guest_SC_CLASS == VG_FREEBSD_SYSCALL198)