From: Ben Pfaff Date: Mon, 13 Sep 2004 22:57:01 +0000 (+0000) Subject: Use `z' modifier to printf size_t. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62cc6ff58f8b07dea772f8acfdfd9600f9c71ff4;p=pintos-anon Use `z' modifier to printf size_t. --- diff --git a/src/devices/disk.c b/src/devices/disk.c index 234d5a9..5867caa 100644 --- a/src/devices/disk.c +++ b/src/devices/disk.c @@ -103,7 +103,7 @@ disk_init (void) int dev_no; /* Initialize channel. */ - snprintf (c->name, sizeof c->name, "hd%d", chan_no); + snprintf (c->name, sizeof c->name, "hd%zd", chan_no); switch (chan_no) { case 0: diff --git a/src/threads/init.c b/src/threads/init.c index 9ab0447..129d797 100644 --- a/src/threads/init.c +++ b/src/threads/init.c @@ -62,7 +62,7 @@ main (void) console_init (); /* Greet user. */ - printf ("Pintos booting with %'d kB RAM...\n", ram_pages * (PGSIZE / 1024)); + printf ("Pintos booting with %'zd kB RAM...\n", ram_pages * (PGSIZE / 1024)); /* Parse command line. */ argv_init ();