]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Warning cleanup
authorPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 29 Jan 2026 12:45:21 +0000 (13:45 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 29 Jan 2026 12:45:21 +0000 (13:45 +0100)
coregrind/m_syswrap/syswrap-freebsd.c
coregrind/vgdb-invoker-freebsd.c
memcheck/tests/amd64-freebsd/scalar_arg_check.c
memcheck/tests/freebsd/Makefile.am
memcheck/tests/x86-freebsd/scalar_arg_check.c

index a69fb4fb28bcad251319159d32896642b43f35a4..20e46fb5edd377ac956e7dad7ae8184847282565 100644 (file)
@@ -6854,16 +6854,10 @@ PRE(sys_aio_writev)
          // by the members of the iocb->aio_iov array
          // FreeBSD headers #define define this to aio_iovcnt
          SizeT vec_count = (SizeT)iocb->aio_nbytes;
-#if defined(__clang__)
-#pragma clang diagnostic push
-         // yes, I know it is volatile
-#pragma clang diagnostic ignored "-Wcast-qual"
-#endif
-         struct vki_iovec* p_iovec  = (struct vki_iovec*)iocb->aio_buf;
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-         PRE_MEM_READ("aio_writev(iocb->aio_iov)", (Addr)p_iovec, vec_count*sizeof(struct vki_iovec));
+         uintptr_t uint_aio_buf  = (uintptr_t)iocb->aio_buf;
+         struct vki_iovec* p_iovec = (struct vki_iovec*)uint_aio_buf;
+
+         PRE_MEM_READ("aio_writev(iocb->aio_iov)", uint_aio_buf, vec_count*sizeof(struct vki_iovec));
          // and this to aio_iov
 
          if (ML_(safe_to_deref)(p_iovec, vec_count*sizeof(struct vki_iovec))) {
index ec42ab23adaaaf02fd106f8e3a6d2dc27fe8dcdc..129d10a5cc9fcf43e1abed461066992fc99f3248 100644 (file)
@@ -203,10 +203,10 @@ Bool waitstopped (pid_t pid, int signal_expected, const char *msg)
             msg, signal_expected);
       p = waitpid(pid, &status, 0); /* PJF options was __WALL */
       DEBUG(1, "after waitpid pid %d p %d status 0x%x %s\n", pid, p,
-            status, status_image (status));
+            (unsigned)status, status_image (status));
       if (p != pid) {
          ERROR(errno, "%s waitpid pid %d in waitstopped %d status 0x%x %s\n",
-               msg, pid, p, status, status_image (status));
+               msg, pid, p, (unsigned)status, status_image (status));
          return False;
       }
 
@@ -468,7 +468,7 @@ Bool invoker_invoke_gdbserver (pid_t pid)
         e.g. http://sourceware.org/ml/gdb-patches/2009-11/msg00592.html */
      *(long *)&reg_save.r_rax = *(int*)&reg_save.r_rax;
      DEBUG(1, "Sign extending %8.8lx to %8.8lx\n",
-           reg_mod.r_rax, reg_save.r_rax);
+           (unsigned long)reg_mod.r_rax, (unsigned long)reg_save.r_rax);
    }
 #elif defined(VGA_arm64)
    sp = reg_mod.sp;
index cfa6d4ea080f664c6a84dea0f41312a00f103b92..0a847d64f083fae22b41af2bd07fe8109f53eaa3 100644 (file)
@@ -4,5 +4,6 @@ int main(void)
 {
    /* sendfile uses 7 args */
    SY(SYS_sendfile, 101, 102, 103, 104, 105, 106, 107);
+   x0 = 0;
 }
 
index ba17000c48a82fa0b053fd8f862af2fd98b0147f..96c57e21eedd37d9851c9415efe3bcdda8bc0f9c 100644 (file)
@@ -249,7 +249,7 @@ openpty_LDFLAGS                     = ${AM_LDFLAGS} -lutil
 pdfork_pdkill_CFLAGS           = ${AM_CFLAGS} @FLAG_W_NO_MAYBE_UNINITIALIZED@ @FLAG_W_NO_USE_AFTER_FREE@
 realpathat_CFLAGS              = ${AM_CFLAGS} @FLAG_W_NO_USE_AFTER_FREE@ @FLAG_W_NO_ALLOC_SIZE@
 revoke_CFLAGS                  = ${AM_CFLAGS} @FLAG_W_NO_USE_AFTER_FREE@
-scalar_CFLAGS                  = ${AM_CFLAGS} -g @FLAG_W_NO_UNINITIALIZED@
+scalar_CFLAGS                  = ${AM_CFLAGS} -g @FLAG_W_NO_UNINITIALIZED@ @FLAG_W_NO_USE_AFTER_FREE@
 scalar_abort2_CFLAGS           = ${AM_CFLAGS} @FLAG_W_NO_UNINITIALIZED@
 scalar_fork_CFLAGS             = ${AM_CFLAGS} @FLAG_W_NO_UNUSED_VARIABLE@
 scalar_pdfork_CFLAGS           = ${AM_CFLAGS} @FLAG_W_NO_UNINITIALIZED@
index c608150f2de3385217183488921a52aaa527f103..74cacd29990dcd4b11d26b529e4bf0076e0b78d3 100644 (file)
@@ -4,5 +4,6 @@ int main(void)
 {
    /* sendfile uses 8 args */
    SY(SYS_sendfile, 101, 102, 103, 104, 105, 106, 107, 108);
+   x0 = 0;
 }