summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-08-27 04:43:46 +0000
committerJim Meyering <jim@meyering.net>1993-08-27 04:43:46 +0000
commit27049d3bfc5acc53cc84a91a356441746b5608d6 (patch)
tree33e5ab1dc7246a3a549f4211ff6a6673daca1d2d /src/ls.c
parent429043125e1842b92f1cdbc6c0a2772316c9d34e (diff)
downloadcoreutils-27049d3bfc5acc53cc84a91a356441746b5608d6.tar.xz
merge with 3.8.3
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ls.c b/src/ls.c
index 1b562be8c..b20b21177 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -1218,6 +1218,8 @@ sort_files ()
case time_atime:
func = sort_reverse ? rev_cmp_atime : compare_atime;
break;
+ default:
+ abort ();
}
break;
case sort_name:
@@ -1229,6 +1231,8 @@ sort_files ()
case sort_size:
func = sort_reverse ? rev_cmp_size : compare_size;
break;
+ default:
+ abort ();
}
qsort (files, files_index, sizeof (struct file), func);
@@ -1435,11 +1439,12 @@ print_long_format (f)
}
if (print_inode)
- printf ("%6u ", f->stat.st_ino);
+ printf ("%6lu ", (unsigned long) f->stat.st_ino);
if (print_block_size)
printf ("%*u ", block_size_size,
- convert_blocks (ST_NBLOCKS (f->stat), kilobyte_blocks));
+ (unsigned) convert_blocks (ST_NBLOCKS (f->stat),
+ kilobyte_blocks));
/* The space between the mode and the number of links is the POSIX
"optional alternate access method flag". */
@@ -1560,11 +1565,12 @@ print_file_name_and_frills (f)
struct file *f;
{
if (print_inode)
- printf ("%6u ", f->stat.st_ino);
+ printf ("%6lu ", (unsigned long) f->stat.st_ino);
if (print_block_size)
printf ("%*u ", block_size_size,
- convert_blocks (ST_NBLOCKS (f->stat), kilobyte_blocks));
+ (unsigned) convert_blocks (ST_NBLOCKS (f->stat),
+ kilobyte_blocks));
print_name_with_quoting (f->name);