]> sourceware.org Git - valgrind.git/commitdiff
Fix some compiler warnings on FreeBSD
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 12 Jun 2022 13:48:32 +0000 (15:48 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 12 Jun 2022 13:48:32 +0000 (15:48 +0200)
Includes one serious issue of a switch case fallthrough

coregrind/m_syswrap/syswrap-freebsd.c
coregrind/m_syswrap/syswrap-x86-freebsd.c

index 20718badd6556d0de48949a4bba85a7f0f20b274..0481b1c51272f6d08acf7fb8d814850f661b7cf5 100644 (file)
@@ -1335,6 +1335,7 @@ PRE(sys_fcntl)
          struct vki_kinfo_file* p_kinfo_file = (struct vki_kinfo_file*)ARG3;
          PRE_MEM_WRITE("fcntl(ARG3=='kinfo_file)", ARG3, p_kinfo_file->vki_kf_structsize);
       }
+      break;
 
    default:
       PRINT("sys_fcntl[UNKNOWN] ( %lu, %lu, %lu )", ARG1,ARG2,ARG3);
index fe46e1eabda3e354960f1c11d4174ddccc36fb15..4a2c35d58c4d0b4eaefc2b0058af584e5ffe5ce1 100644 (file)
@@ -704,7 +704,7 @@ PRE(sys_freebsd6_ftruncate)
 PRE(sys_clock_getcpuclockid2)
 {
    PRINT("sys_clock_getcpuclockid2( %lld, %" FMT_REGWORD "d, %#" FMT_REGWORD "x )",
-         MERGE64(ARG1,ARG2),SARG3,ARG4);
+         (vki_id_t)MERGE64(ARG1,ARG2),SARG3,ARG4);
    PRE_REG_READ4(int, "clock_getcpuclockid2",
                  vki_uint32_t, MERGE64_FIRST(offset),
                  vki_uint32_t, MERGE64_SECOND(offset),
@@ -1290,7 +1290,7 @@ POST(sys_cpuset_getid)
 PRE(sys_cpuset_getaffinity)
 {
    PRINT("sys_cpuset_getaffinity ( %" FMT_REGWORD "u, %" FMT_REGWORD "u, %lld, %" FMT_REGWORD "u, %#" FMT_REGWORD "x )",
-         ARG1, ARG2, MERGE64(ARG3, ARG4), ARG5, ARG6);
+         ARG1, ARG2, (vki_id_t)MERGE64(ARG3, ARG4), ARG5, ARG6);
    PRE_REG_READ6(int, "cpuset_getaffinity",
                  vki_cpulevel_t, level, vki_cpuwhich_t, which,
                  vki_uint32_t, MERGE64_FIRST(id),
This page took 0.080148 seconds and 5 git commands to generate.