aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2010-08-31 20:51:10 -0500
committerPeter Seebach <peter.seebach@windriver.com>2010-08-31 20:51:10 -0500
commit853dc2e73b1fda93e4b3e2c0641c7ad7a4253936 (patch)
treed17806ebf72988729aec750410fd7269758c44e9
parentecab857a8a1bd332d6539370c0f183c2b4f004f6 (diff)
downloadpseudo-853dc2e73b1fda93e4b3e2c0641c7ad7a4253936.tar.gz
pseudo-853dc2e73b1fda93e4b3e2c0641c7ad7a4253936.tar.bz2
pseudo-853dc2e73b1fda93e4b3e2c0641c7ad7a4253936.zip
Fix an error message which was mostly-harmless but still clearly a
flaw in the code. Yes, Virginia, your printf arguments must match their format strings, and size_t is not the same thing as int.
-rw-r--r--ChangeLog.txt4
-rw-r--r--guts/getcwd.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index b20096a..ab3f4cb 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,7 @@
+2010-08-31:
+ * (seebs) add missing casts to printf arguments, after being warned
+ about them a mere twenty or thirty thousand times.
+
2010-08-27:
* (seebs) fix a bug caused by memcmp with wrong length
* (seebs) stop hand-coding lengths of memcmp (torek was right...)
diff --git a/guts/getcwd.c b/guts/getcwd.c
index 18c4748..2537e94 100644
--- a/guts/getcwd.c
+++ b/guts/getcwd.c
@@ -55,7 +55,7 @@
rc = buf;
pseudo_debug(3, "getcwd: copying %d (%d + 1 - %d) characters from <%s>.\n",
(int) ((pseudo_cwd_len + 1) - pseudo_chroot_len),
- pseudo_cwd_len, pseudo_chroot_len,
+ (int) pseudo_cwd_len, (int) pseudo_chroot_len,
pseudo_cwd_rel);
memcpy(buf, pseudo_cwd_rel, (pseudo_cwd_len + 1) - (pseudo_cwd_rel - pseudo_cwd));
if (!*buf) {