* info.c (info_show_info): Cast nlink_t to int to avoid a

warning if nlink_t is short.
* screen.c (string_file_nlinks): Likewise.
This commit is contained in:
Pavel Roskin 2003-01-28 21:15:59 +00:00
parent b3d0da2a30
commit 5cecc135e1
3 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2003-01-28 Pavel Roskin <proski@gnu.org>
* info.c (info_show_info): Cast nlink_t to int to avoid a
warning if nlink_t is short.
* screen.c (string_file_nlinks): Likewise.
2003-01-27 Arpi <arpi@mplayerhq.hu>
* key.c (is_idle): Correct maximal file descriptor and return

View File

@ -181,7 +181,7 @@ info_show_info (WInfo *info)
case 6:
widget_move (&info->widget, 6, 3);
printw (_("Links: %d"), buf.st_nlink);
printw (_("Links: %d"), (int) buf.st_nlink);
case 5:
widget_move (&info->widget, 5, 3);

View File

@ -317,9 +317,9 @@ string_file_perm_octal (file_entry *fe, int len)
static const char *
string_file_nlinks (file_entry *fe, int len)
{
static char buffer [BUF_TINY];
static char buffer[BUF_TINY];
g_snprintf (buffer, sizeof (buffer), "%16d", fe->buf.st_nlink);
g_snprintf (buffer, sizeof (buffer), "%16d", (int) fe->buf.st_nlink);
return buffer;
}