This lint was found by GCC 4.6.2 on Fedora 15 x86-64.
* src/buffer.c (buffer_write_global_xheader, mv_end, set_start_time)
(compute_duration, print_total_stats, flush_read, flush_write):
* src/checkpoint.c (checkpoint_finish_compile):
* src/list.c (test_archive_label):
* src/misc.c (chdir_count):
* src/names.c (const):
* src/unlink.c (finish_deferred_unlinks):
Define with (void) instead of with (), for slightly-better C type
checking and to avoid a GCC warning.
* src/compare.c (diff_dumpdir):
* src/tar.c (parse_owner_group): Remove unused local.
* src/misc.c (chdir_do):
* src/tar.c (add_exclude_array): Rename local to avoid shadowing.
(LOW_DENSITY_NUM, MID_DENSITY_NUM, HIGH_DENSITY_NUM):
Define only if needed.
* src/update.c (update_archive): Initialize a local; this fixes
what appears to be a real bug.
static struct tar_stat_info dummy;
void
static struct tar_stat_info dummy;
void
-buffer_write_global_xheader ()
+buffer_write_global_xheader (void)
{
xheader_write_global (&dummy.xhdr);
}
{
xheader_write_global (&dummy.xhdr);
}
{
if (multi_volume_option)
bufmap_free (NULL);
{
if (multi_volume_option)
bufmap_free (NULL);
{
gettime (&start_time);
volume_start_time = start_time;
{
gettime (&start_time);
volume_start_time = start_time;
{
struct timespec now;
gettime (&now);
{
struct timespec now;
gettime (&now);
+print_total_stats (void)
{
switch (subcommand_option)
{
{
switch (subcommand_option)
{
{
flush_read_ptr ();
}
void
{
flush_read_ptr ();
}
void
{
flush_write_ptr (record_size);
}
{
flush_write_ptr (record_size);
}
-checkpoint_finish_compile ()
+checkpoint_finish_compile (void)
{
if (checkpoint_option)
{
{
if (checkpoint_option)
{
diff_dumpdir (struct tar_stat_info *dir)
{
const char *dumpdir_buffer;
diff_dumpdir (struct tar_stat_info *dir)
{
const char *dumpdir_buffer;
struct stat stat_data;
if (deref_stat (dir->file_name, &stat_data) != 0)
struct stat stat_data;
if (deref_stat (dir->file_name, &stat_data) != 0)
else
stat_error (dir->file_name);
}
else
stat_error (dir->file_name);
}
- else
- dev = stat_data.st_dev;
+test_archive_label (void)
{
base64_init ();
name_gather ();
{
base64_init ();
name_gather ();
static size_t wdcache_count;
int
static size_t wdcache_count;
int
{
if (wd_count == 0)
return wd_count;
{
if (wd_count == 0)
return wd_count;
int prev = wdcache[0];
for (ci = 1; prev != i; ci++)
{
int prev = wdcache[0];
for (ci = 1; prev != i; ci++)
{
- int curr = wdcache[ci];
struct name *gnu_list_name;
struct name const *
struct name *gnu_list_name;
struct name const *
{
if (!gnu_list_name)
gnu_list_name = namelist;
{
if (!gnu_list_name)
gnu_list_name = namelist;
-add_exclude_array (char const * const * fv, int options)
+add_exclude_array (char const * const * fv, int opts)
{
int i;
for (i = 0; fv[i]; i++)
{
int i;
for (i = 0; fv[i]; i++)
- add_exclude (excluded, fv[i], options);
+ add_exclude (excluded, fv[i], opts);
/* Default density numbers for [0-9][lmh] device specifications */
/* Default density numbers for [0-9][lmh] device specifications */
-#ifndef LOW_DENSITY_NUM
-# define LOW_DENSITY_NUM 0
-#endif
+#if defined DEVICE_PREFIX && !defined DENSITY_LETTER
+# ifndef LOW_DENSITY_NUM
+# define LOW_DENSITY_NUM 0
+# endif
-#ifndef MID_DENSITY_NUM
-# define MID_DENSITY_NUM 8
-#endif
+# ifndef MID_DENSITY_NUM
+# define MID_DENSITY_NUM 8
+# endif
-#ifndef HIGH_DENSITY_NUM
-# define HIGH_DENSITY_NUM 16
+# ifndef HIGH_DENSITY_NUM
+# define HIGH_DENSITY_NUM 16
+# endif
static uintmax_t
parse_owner_group (char *arg, uintmax_t field_max, char const **name_option)
{
static uintmax_t
parse_owner_group (char *arg, uintmax_t field_max, char const **name_option)
{
uintmax_t u = UINTMAX_MAX;
char *end;
char const *name = 0;
uintmax_t u = UINTMAX_MAX;
char *end;
char const *name = 0;
-finish_deferred_unlinks ()
+finish_deferred_unlinks (void)
{
flush_deferred_unlinks (true);
while (dunlink_avail)
{
flush_deferred_unlinks (true);
while (dunlink_avail)
if (S_ISDIR (s.st_mode))
{
char *p, *dirp;
if (S_ISDIR (s.st_mode))
{
char *p, *dirp;
int fd = openat (chdir_fd, name->name,
open_read_flags | O_DIRECTORY);
if (fd < 0)
int fd = openat (chdir_fd, name->name,
open_read_flags | O_DIRECTORY);
if (fd < 0)