Cosmetic fix for log.c

Jos Backus josb at cncdsl.com
Fri Jan 25 18:14:21 EST 2002


gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c log.c -o log.o
log.c: In function `log_transfer':
log.c:570: warning: unused parameter `file'

While we pass in this ``file'' parameter, why not use it and thus get rid of
this warning? The comment is kind of unclear though, any idea what the author
is trying to say exactly?

Index: log.c
===================================================================
RCS file: /cvsroot/rsync/log.c,v
retrieving revision 1.56
diff -u -r1.56 log.c
--- log.c       24 Jan 2002 02:41:38 -0000      1.56
+++ log.c       25 Jan 2002 07:14:17 -0000
@@ -559,20 +559,16 @@
    }
 }
 
-
-
-
-/* log the incoming transfer of a file for interactive use, this
-   will be called at the end where the client was run 
-   
-   it i called when a file starts to be transferred
-*/
+/*
+ * Log the incoming transfer of a file for interactive use,
+ * this will be called at the end where the client was run.
+ * Called when a file starts to be transferred.
+ */
 void log_transfer(struct file_struct *file, const char *fname)
 {
    extern int verbose;
 
    if (!verbose) return;
 
-   rprintf(FINFO,"%s\n", fname);
+   rprintf(FINFO, "%s, len %lu\n", fname, (unsigned long)file->length);
 }
-


-- 
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
josb at cncdsl.com     _/_/   _/_/_/            use Std::Disclaimer;




More information about the rsync mailing list