Fix casts when some variables are printed out.
authorMartin Pool <mbp@samba.org>
Wed, 15 Aug 2001 06:41:24 +0000 (06:41 +0000)
committerMartin Pool <mbp@samba.org>
Wed, 15 Aug 2001 06:41:24 +0000 (06:41 +0000)
batch.c
clientserver.c
flist.c
main.c

diff --git a/batch.c b/batch.c
index 200ff8b..5f6c851 100644 (file)
--- a/batch.c
+++ b/batch.c
@@ -1,6 +1,7 @@
-/* 
+/* -*- c-file-style: "linux" -*-
+   
    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
 {
     int i;
     int int_zero = 0;
-    extern int block_size;
     extern int csum_length;
 
     fdb_open = 1;
@@ -545,15 +545,15 @@ void show_flist(int index, struct file_struct **fptr)
 
     int i;
     for (i=0;i<index;i++) {
-       rprintf(FINFO,"flist->flags=%x\n",fptr[i]->flags);  
-       rprintf(FINFO,"flist->modtime=%x\n",fptr[i]->modtime);  
-       rprintf(FINFO,"flist->length=%x\n",fptr[i]->length);  
-       rprintf(FINFO,"flist->mode=%x\n",fptr[i]->mode);  
-       rprintf(FINFO,"flist->basename=%s\n",fptr[i]->basename);
+       rprintf(FINFO, "flist->flags=%#x\n",fptr[i]->flags);  
+       rprintf(FINFO, "flist->modtime=%#x\n",fptr[i]->modtime);  
+       rprintf(FINFO, "flist->length=%.0f\n", (double) fptr[i]->length);  
+       rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode);  
+       rprintf(FINFO, "flist->basename=%s\n",fptr[i]->basename);
        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) 
-       rprintf(FINFO,"flist->basedir=%s\n",fptr[i]->basedir);
+              rprintf(FINFO, "flist->basedir=%s\n",fptr[i]->basedir);
     }
 }
 
index 00efea4..dd383d0 100644 (file)
@@ -261,13 +261,13 @@ static int rsync_module(int fd, int i)
 
        if (am_root) {
                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");
                        return -1;
                }
 
                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");
                        return -1;
                }
diff --git a/flist.c b/flist.c
index edd6024..0cc57f2 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -1104,10 +1104,10 @@ static void clean_flist(struct file_list *flist, int strip_root)
 
        for (i=0;i<flist->count;i++) {
                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]->basename),
-                       flist->files[i]->mode,
+                       (int) flist->files[i]->mode,
                        (double)flist->files[i]->length);
        }
 }
diff --git a/main.c b/main.c
index 50005aa..a103ff3 100644 (file)
--- a/main.c
+++ b/main.c
@@ -2,6 +2,7 @@
    
    Copyright (C) 1996-2001 by Andrew Tridgell <tridge@samba.org>
    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
    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[])
                }
                if (pid != -1) {
                        if (verbose > 3)
-                               rprintf(FINFO,"client_run waiting on %d\n",pid);
+                               rprintf(FINFO,"client_run waiting on %d\n", (int) pid);
                        io_flush();
                        wait_process(pid, &status);
                }
@@ -558,7 +559,7 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
        
        if (pid != -1) {
                if (verbose > 3)
-                       rprintf(FINFO,"client_run2 waiting on %d\n",pid);
+                       rprintf(FINFO,"client_run2 waiting on %d\n", (int) pid);
                io_flush();
                wait_process(pid, &status);
        }