1
1

Fixed type mismatches in formatted output arguments in VFS.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
Andrew Borodin 2010-09-22 18:26:55 +04:00 коммит произвёл Slava Zanko
родитель 10949329a7
Коммит 9678ef3b02
3 изменённых файлов: 11 добавлений и 7 удалений

Просмотреть файл

@ -35,6 +35,7 @@
/* includes fcntl.h see IEEE Std 1003.1-2008 */
#include <time.h>
#include <sys/time.h> /* gettimeofday() */
#include <stdint.h> /* uintmax_t */
#include "lib/global.h"
@ -980,9 +981,9 @@ vfs_s_print_stats (const char *fs_name, const char *action,
if (need)
print_vfs_message (i18n_percent_transf_format, fs_name, action,
file_name, (int) ((double) have * 100 / need), have);
file_name, (int) ((double) have * 100 / need), (uintmax_t) have);
else
print_vfs_message (i18n_transf_format, fs_name, action, file_name, have);
print_vfs_message (i18n_transf_format, fs_name, action, file_name, (uintmax_t) have);
}
int

Просмотреть файл

@ -53,6 +53,7 @@
#include <sys/time.h> /* gettimeofday() */
#include <stdlib.h>
#include <string.h>
#include <stdint.h> /* uintmax_t */
#include "lib/global.h"
#include "lib/fs.h"
@ -803,14 +804,14 @@ fish_file_store (struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *lo
{
shell_commands = g_strconcat (SUP.scr_env, "FISH_FILENAME=%s FISH_FILESIZE=%ju;\n",
SUP.scr_append, (char *) NULL);
n = fish_command (me, super, WAIT_REPLY, shell_commands, quoted_name, s.st_size);
n = fish_command (me, super, WAIT_REPLY, shell_commands, quoted_name, (uintmax_t) s.st_size);
g_free (shell_commands);
}
else
{
shell_commands = g_strconcat (SUP.scr_env, "FISH_FILENAME=%s FISH_FILESIZE=%ju;\n",
SUP.scr_send, (char *) NULL);
n = fish_command (me, super, WAIT_REPLY, shell_commands, quoted_name, s.st_size);
n = fish_command (me, super, WAIT_REPLY, shell_commands, quoted_name, (uintmax_t) s.st_size);
g_free (shell_commands);
}
if (n != PRELIM)
@ -848,7 +849,7 @@ fish_file_store (struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *lo
tty_disable_interrupt_key ();
total += n;
print_vfs_message (_("fish: storing %s %d (%ju)"),
was_error ? _("zeros") : _("file"), total, s.st_size);
was_error ? _("zeros") : _("file"), total, (uintmax_t) s.st_size);
}
close (h);
g_free (quoted_name);
@ -886,7 +887,7 @@ fish_linear_start (struct vfs_class *me, struct vfs_s_fh *fh, off_t offset)
shell_commands = g_strconcat (SUP.scr_env, "FISH_FILENAME=%s FISH_START_OFFSET=%ju;\n",
SUP.scr_get, (char *) NULL);
offset = fish_command (me, super, WANT_STRING, shell_commands, quoted_name, offset);
offset = fish_command (me, super, WANT_STRING, shell_commands, quoted_name, (uintmax_t) offset);
g_free (shell_commands);
g_free (quoted_name);
if (offset != PRELIM)

Просмотреть файл

@ -84,6 +84,7 @@ What to do with this?
#include <ctype.h>
#include <fcntl.h>
#include <sys/time.h> /* gettimeofday() */
#include <stdint.h> /* uintmax_t */
#include "lib/global.h"
@ -1738,7 +1739,8 @@ ftpfs_file_store (struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *l
w_buf += n_written;
n_read -= n_written;
}
print_vfs_message (_("ftpfs: storing file %ju (%ju)"), n_stored, s.st_size);
print_vfs_message (_("ftpfs: storing file %ju (%ju)"),
(uintmax_t) n_stored, (uintmax_t) s.st_size);
}
tty_disable_interrupt_key ();
close (sock);