Permalink
Browse files

A couple more int/size_t mismatch fixes.

  • Loading branch information...
1 parent 853dc2e commit 03e3352b66bd02d802d74e0e5c556ac26d87a04c @wr-seebs wr-seebs committed Sep 1, 2010
Showing with 9 additions and 4 deletions.
  1. +3 −0 ChangeLog.txt
  2. +1 −1 pseudo_client.c
  3. +4 −2 pseudo_util.c
  4. +1 −1 pseudolog.c
View
@@ -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.
View
@@ -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);
View
@@ -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) {
View
@@ -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);

0 comments on commit 03e3352

Please sign in to comment.