aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2010-09-01 12:21:11 -0500
committerPeter Seebach <peter.seebach@windriver.com>2010-09-01 12:21:43 -0500
commit03e3352b66bd02d802d74e0e5c556ac26d87a04c (patch)
tree1fba6b9c23b1cd012997aa56945bc6f814b52aea
parent853dc2e73b1fda93e4b3e2c0641c7ad7a4253936 (diff)
downloadpseudo-03e3352b66bd02d802d74e0e5c556ac26d87a04c.tar.gz
pseudo-03e3352b66bd02d802d74e0e5c556ac26d87a04c.tar.bz2
pseudo-03e3352b66bd02d802d74e0e5c556ac26d87a04c.zip
A couple more int/size_t mismatch fixes.
-rw-r--r--ChangeLog.txt3
-rw-r--r--pseudo_client.c2
-rw-r--r--pseudo_util.c6
-rw-r--r--pseudolog.c2
4 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index ab3f4cb..42424cd 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,6 @@
+2010-09-01:
+ * (seebs) add missing casts to even more printf arguments
+
2010-08-31:
* (seebs) add missing casts to printf arguments, after being warned
about them a mere twenty or thirty thousand times.
diff --git a/pseudo_client.c b/pseudo_client.c
index 842b0c3..a599da4 100644
--- a/pseudo_client.c
+++ b/pseudo_client.c
@@ -843,7 +843,7 @@ pseudo_client_op(op_id_t op, int access, int fd, int dirfd, const char *path, co
return 0;
}
snprintf(both_paths, full_len, "%.*s%c%s",
- pathlen - 1 - strip_slash,
+ (int) (pathlen - 1 - strip_slash),
path, 0, oldpath);
pseudo_debug(2, "rename: %s -> %s [%d]\n",
both_paths + pathlen, both_paths, (int) full_len);
diff --git a/pseudo_util.c b/pseudo_util.c
index e2cabfe..2e75e69 100644
--- a/pseudo_util.c
+++ b/pseudo_util.c
@@ -73,18 +73,20 @@ int _in_init = -1; /* Not yet run */
static void _libpseudo_init(void) __attribute__ ((constructor));
+#if 0
static void dump_env(char **envp) {
size_t i = 0;
for (i = 0; envp[i]; i++) {
- pseudo_debug(0,"dump_envp: [%d]%s\n", i,envp[i]);
+ pseudo_debug(0,"dump_envp: [%d]%s\n", (int) i, envp[i]);
}
for (i = 0; pseudo_env[i].key; i++) {
- pseudo_debug(0,"dump_envp: {%d}%s=%s\n", i, pseudo_env[i].key, pseudo_env[i].value);
+ pseudo_debug(0,"dump_envp: {%d}%s=%s\n", (int) i, pseudo_env[i].key, pseudo_env[i].value);
}
pseudo_debug(0, "dump_envp: _in_init %d\n", _in_init);
}
+#endif
/* Caller must free memory! */
char * pseudo_get_value(const char * key) {
diff --git a/pseudolog.c b/pseudolog.c
index 903c161..b2b0686 100644
--- a/pseudolog.c
+++ b/pseudolog.c
@@ -681,7 +681,7 @@ format_one(log_entry *e, char *format) {
pseudo_diag("invalid log entry or format specifier.\n");
return 0;
}
- real_len = snprintf(fmtbuf, sizeof(fmtbuf), "%.*s", len + 1, format);
+ real_len = snprintf(fmtbuf, sizeof(fmtbuf), "%.*s", (int) len + 1, format);
if (real_len >= sizeof(fmtbuf) - 1) {
pseudo_diag("Format string way too long starting at %.10s",
format - 1);