Commit 08a740ff authored by Martin Pool's avatar Martin Pool

Fix casts when some variables are printed out.

parent b67381d0
/* /* -*- c-file-style: "linux" -*-
Weiss 1/1999 Weiss 1/1999
Batch utilities Batch utilities for rsync.
*/ */
...@@ -379,7 +380,6 @@ void write_batch_csum_info(int *flist_entry, int flist_count, struct sum_struct ...@@ -379,7 +380,6 @@ void write_batch_csum_info(int *flist_entry, int flist_count, struct sum_struct
{ {
int i; int i;
int int_zero = 0; int int_zero = 0;
extern int block_size;
extern int csum_length; extern int csum_length;
fdb_open = 1; fdb_open = 1;
...@@ -545,15 +545,15 @@ void show_flist(int index, struct file_struct **fptr) ...@@ -545,15 +545,15 @@ void show_flist(int index, struct file_struct **fptr)
int i; int i;
for (i=0;i<index;i++) { for (i=0;i<index;i++) {
rprintf(FINFO,"flist->flags=%x\n",fptr[i]->flags); rprintf(FINFO, "flist->flags=%#x\n",fptr[i]->flags);
rprintf(FINFO,"flist->modtime=%x\n",fptr[i]->modtime); rprintf(FINFO, "flist->modtime=%#x\n",fptr[i]->modtime);
rprintf(FINFO,"flist->length=%x\n",fptr[i]->length); rprintf(FINFO, "flist->length=%.0f\n", (double) fptr[i]->length);
rprintf(FINFO,"flist->mode=%x\n",fptr[i]->mode); rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode);
rprintf(FINFO,"flist->basename=%s\n",fptr[i]->basename); rprintf(FINFO, "flist->basename=%s\n",fptr[i]->basename);
if (fptr[i]->dirname) if (fptr[i]->dirname)
rprintf(FINFO,"flist->dirname=%s\n",fptr[i]->dirname); rprintf(FINFO, "flist->dirname=%s\n",fptr[i]->dirname);
if (fptr[i]->basedir) if (fptr[i]->basedir)
rprintf(FINFO,"flist->basedir=%s\n",fptr[i]->basedir); rprintf(FINFO, "flist->basedir=%s\n",fptr[i]->basedir);
} }
} }
......
...@@ -261,13 +261,13 @@ static int rsync_module(int fd, int i) ...@@ -261,13 +261,13 @@ static int rsync_module(int fd, int i)
if (am_root) { if (am_root) {
if (setgid(gid)) { if (setgid(gid)) {
rsyserr(FERROR, errno, "setgid %d failed", gid); rsyserr(FERROR, errno, "setgid %d failed", (int) gid);
io_printf(fd,"@ERROR: setgid failed\n"); io_printf(fd,"@ERROR: setgid failed\n");
return -1; return -1;
} }
if (setuid(uid)) { if (setuid(uid)) {
rsyserr(FERROR, errno, "setuid %d failed", uid); rsyserr(FERROR, errno, "setuid %d failed", (int) uid);
io_printf(fd,"@ERROR: setuid failed\n"); io_printf(fd,"@ERROR: setuid failed\n");
return -1; return -1;
} }
......
...@@ -1104,10 +1104,10 @@ static void clean_flist(struct file_list *flist, int strip_root) ...@@ -1104,10 +1104,10 @@ static void clean_flist(struct file_list *flist, int strip_root)
for (i=0;i<flist->count;i++) { for (i=0;i<flist->count;i++) {
rprintf(FINFO,"[%d] i=%d %s %s mode=0%o len=%.0f\n", rprintf(FINFO,"[%d] i=%d %s %s mode=0%o len=%.0f\n",
getpid(), i, (int) getpid(), i,
NS(flist->files[i]->dirname), NS(flist->files[i]->dirname),
NS(flist->files[i]->basename), NS(flist->files[i]->basename),
flist->files[i]->mode, (int) flist->files[i]->mode,
(double)flist->files[i]->length); (double)flist->files[i]->length);
} }
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
Copyright (C) 1996-2001 by Andrew Tridgell <tridge@samba.org> Copyright (C) 1996-2001 by Andrew Tridgell <tridge@samba.org>
Copyright (C) Paul Mackerras 1996 Copyright (C) Paul Mackerras 1996
Copyright (C) 2001 by Martin Pool <mbp@samba.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -528,7 +529,7 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]) ...@@ -528,7 +529,7 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
} }
if (pid != -1) { if (pid != -1) {
if (verbose > 3) if (verbose > 3)
rprintf(FINFO,"client_run waiting on %d\n",pid); rprintf(FINFO,"client_run waiting on %d\n", (int) pid);
io_flush(); io_flush();
wait_process(pid, &status); wait_process(pid, &status);
} }
...@@ -558,7 +559,7 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]) ...@@ -558,7 +559,7 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
if (pid != -1) { if (pid != -1) {
if (verbose > 3) if (verbose > 3)
rprintf(FINFO,"client_run2 waiting on %d\n",pid); rprintf(FINFO,"client_run2 waiting on %d\n", (int) pid);
io_flush(); io_flush();
wait_process(pid, &status); wait_process(pid, &status);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment