]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Solaris: fix a few compiler warnings
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 2 Sep 2023 11:52:12 +0000 (13:52 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 2 Sep 2023 11:52:12 +0000 (13:52 +0200)
coregrind/m_coredump/coredump-solaris.c
coregrind/m_debuginfo/readelf.c
coregrind/m_initimg/initimg-solaris.c
coregrind/m_syswrap/syswrap-solaris.c

index 8e84dba51fea8aab6fc34f7f05e707ffe2a734e1..00d131b370fafef5598b3abde75ce2faa93dc0f9 100644 (file)
@@ -886,7 +886,7 @@ void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si,
         VG_(snprintf)(filename, filename_size, "%s%s.%d",
                      basename, coreext, VG_(getpid)());
       else
-        VG_(snprintf)(filename, filename_size, "%s%s.%d.%d",
+        VG_(snprintf)(filename, filename_size, "%s%s.%d.%u",
                      basename, coreext, VG_(getpid)(), seq);
       seq++;
 
index a4c79efd0f0020cfaef6392e2139337867f5aa89..ef9a722ad9b241ae1d146234f51a2a33ec463bd0 100644 (file)
@@ -1343,7 +1343,7 @@ DiImage* open_debug_file( const HChar* name, const HChar* buildid, UInt crc,
          if (VG_(clo_verbosity) > 1)
             VG_(message)(Vg_DebugMsg, 
                "  .. build-id mismatch (found %s wanted %s)\n", 
-               debug_buildid, buildid);
+               (debug_buildid ? debug_buildid : "(null)"), buildid);
          ML_(dinfo_free)(debug_buildid);
          return NULL;
       }
index 3e473c8803c081da648122b97d1f5673d86ece36..1e9e3fd061ea51939282bcadcda0780c726faeae 100644 (file)
@@ -920,7 +920,7 @@ IIFinaliseImageInfo VG_(ii_create_image)(IICreateImageInfo iicii,
 
       szB = VG_PGROUNDUP(szB);
       VG_(debugLog)(1, "initimg",
-                       "Setup client stack: size will be %ld\n", szB);
+                       "Setup client stack: size will be %lu\n", szB);
 
       iifii.clstack_max_size = szB;
       iifii.initial_client_SP = setup_client_stack(init_sp, env, &info,
index ed3cb4a55180a3555754d87657eebfe1157ce0a0..b5489644c126ba8575ad86bbfb669a745bd5849c 100644 (file)
@@ -639,10 +639,11 @@ void VG_(restore_context)(ThreadId tid, vki_ucontext_t *uc, CorePart part,
       if (tst->os_state.ustack
           && VG_(am_is_valid_for_client)((Addr)tst->os_state.ustack,
                                          sizeof(*tst->os_state.ustack),
-                                         VKI_PROT_WRITE))
+                                         VKI_PROT_WRITE)) {
          *tst->os_state.ustack = uc->uc_stack;
          VG_TRACK(post_mem_write, part, tid, (Addr)&tst->os_state.ustack,
                   sizeof(tst->os_state.ustack));
+      }
    }
 
    /* Restore the architecture-specific part of the context. */