--- a/bin/mem.c
+++ b/bin/mem.c
@@ -406,7 +406,7 @@
    // Address of first byte that is beyond the argv strings.
    beyond_argv = argv[argc-1] + strlen(argv[argc-1]) + 2;
    cmdline_sz = beyond_argv - cmdline;
-   DEBUG("argv: %zd bytes [%p, %p)", (long)cmdline_sz, cmdline, beyond_argv);
+   DEBUG("argv: %zd bytes [%p, %p)", cmdline_sz, cmdline, beyond_argv);
 }
 
 /** Set process names.
@@ -431,7 +431,7 @@
 
    if (longname_sz > cmdline_sz - 2) {
       longname_trunc[cmdline_sz - 1] = '\0';  // truncate
-      WARNING("truncated long process name from %ld to %ld",
+      WARNING("truncated long process name from %zd to %zd",
               longname_sz, strlen(longname_trunc));
    }
 
