tar: remove lint
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.
This commit is contained in:
@@ -713,7 +713,7 @@ static int wdcache[CHDIR_CACHE_SIZE];
|
||||
static size_t wdcache_count;
|
||||
|
||||
int
|
||||
chdir_count ()
|
||||
chdir_count (void)
|
||||
{
|
||||
if (wd_count == 0)
|
||||
return wd_count;
|
||||
@@ -814,11 +814,11 @@ chdir_do (int i)
|
||||
int prev = wdcache[0];
|
||||
for (ci = 1; prev != i; ci++)
|
||||
{
|
||||
int curr = wdcache[ci];
|
||||
int cur = wdcache[ci];
|
||||
wdcache[ci] = prev;
|
||||
if (curr == i)
|
||||
if (cur == i)
|
||||
break;
|
||||
prev = curr;
|
||||
prev = cur;
|
||||
}
|
||||
wdcache[0] = i;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user