]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
coverity: unreachable and unused
authorPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 22 Nov 2023 07:19:47 +0000 (08:19 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 22 Nov 2023 07:19:47 +0000 (08:19 +0100)
VEX/priv/guest_s390_toIR.c
VEX/priv/host_ppc_defs.c
coregrind/m_aspacemgr/aspacemgr-linux.c

index d9d746c38ab007297d24f05416acb8e6e412405d..81cce9fb48e98c82c3f38e72dcb947745a66f0dd 100644 (file)
@@ -14405,7 +14405,6 @@ static const HChar *
 s390_irgen_KEB(UChar r1, IRTemp op2addr)
 {
    return s390_irgen_CxB("keb", r1, op2addr, Ity_F32, Iop_CmpF32);
-   return "keb";
 }
 
 static const HChar *
index ea140621e217b1c355de94a2c5a93cbbccb8ca84..d4d948a3ba69417ad2c00651410fee07ea32c27d 100644 (file)
@@ -4938,6 +4938,9 @@ Int emit_PPCInstr ( /*MB_MOD*/Bool* is_profInc,
       default:
          goto bad;
       }
+      // PJF Coverity may be right but I'd reather keep the unreachable code
+      // "just in case" that conditions above ever change
+      // coverity[UNREACHABLE:FALSE]
       goto done;
    }
 
index 232401e60ebc56b9d2e31a7e96e4a129fd7d127d..b38755106e7cc4626a8ee51dd5c8982f3336f183 100644 (file)
@@ -860,11 +860,19 @@ static void sync_check_mapping_callback ( Addr addr, SizeT len, UInt prot,
       if (nsegments[i].hasW) seg_prot |= VKI_PROT_WRITE;
       if (nsegments[i].hasX) seg_prot |= VKI_PROT_EXEC;
 
+#if defined(VGO_darwin) || defined(VGO_freebsd)
+      // GrP fixme kernel info doesn't have dev/inode
+      cmp_devino = False;
+
+      // GrP fixme V and kernel don't agree on offsets
+      cmp_offsets = False;
+#else
       cmp_offsets
          = nsegments[i].kind == SkFileC || nsegments[i].kind == SkFileV;
 
       cmp_devino
          = nsegments[i].dev != 0 || nsegments[i].ino != 0;
+#endif
 
       /* Consider other reasons to not compare dev/inode */
 #if defined(VGO_linux)
@@ -877,14 +885,6 @@ static void sync_check_mapping_callback ( Addr addr, SizeT len, UInt prot,
       if (filename && VG_(strstr)(filename, "/.lib-ro/"))
          cmp_devino = False;
 #endif
-
-#if defined(VGO_darwin) || defined(VGO_freebsd)
-      // GrP fixme kernel info doesn't have dev/inode
-      cmp_devino = False;
-      
-      // GrP fixme V and kernel don't agree on offsets
-      cmp_offsets = False;
-#endif
       
       /* If we are doing sloppy execute permission checks then we
          allow segment to have X permission when we weren't expecting