Remove some lint, found by gcc -W etc.
* src/common.h (label_notfound): New decl. * src/buffer.c (set_volume_start_time, compress_type): (guess_seekable_archive, open_compressed_archive, init_buffer): (_flush_write, archive_is-dev, increase_volume_number): (change_tape_menu, try_new_volume, add_chunk_header): (multi_volume_sync): Declare as 'static' if it's not exported. Use function prototype (void) rather than old-style (). * src/checkpoint.c (expand_checkpoint_string): Likewise. * src/incremen.c (dirlist_replace_prefix, makedumpdir, read_incr_db_2): Likewise. * src/list.c (print_volume_label): Likewise. * src/misc.c (normalize_filename_x): Likewise. * src/names.c (make_name, free_name, check_name_alloc, name_next_elt): Likewise. * src/tar.c (tar_list_quoting_style, add_exclude_array): (set_stat_signal): Likewise. * src/transform.c (new_transform, _single_transform_name_to_obstack): (_transform_name_to_obstack): Likewise. * src/unlink.c (dunlink_alloc): Likewise. * src/buffer.c (struct zip_magic): Use const when appropriate. * src/incremen.c (obstack_code_rename, write_directory_file_entry): Likewise. * src/sparse.c (COPY_STRING): Likewise. * src/system.c (dec_to_env, time_to_env, oct_to_env, str_to_env): (chr_to_env): Likewise. * src/tar.c (tar_list_quoting_style, set_stat_signal): Likewise. * src/extract.c (extract_node): Don't return garbage. * src/names.c: Remove old-style declarations of getgrnam etc. All modern systems declare these, and it's not worth the hassle of ignoring the warnings on modern systems for old-style decls.
This commit is contained in:
10
src/unlink.c
10
src/unlink.c
@@ -1,4 +1,4 @@
|
||||
/* This file is part of GNU tar.
|
||||
/* This file is part of GNU tar.
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
@@ -42,7 +42,7 @@ static struct deferred_unlink *dunlink_avail;
|
||||
size_t deferred_unlink_delay = 0;
|
||||
|
||||
static struct deferred_unlink *
|
||||
dunlink_alloc ()
|
||||
dunlink_alloc (void)
|
||||
{
|
||||
struct deferred_unlink *p;
|
||||
if (dunlink_avail)
|
||||
@@ -116,7 +116,7 @@ flush_deferred_unlinks (bool force)
|
||||
{
|
||||
prev = p;
|
||||
p = next;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!dunlink_head)
|
||||
dunlink_tail = NULL;
|
||||
@@ -142,13 +142,13 @@ queue_deferred_unlink (const char *name, bool is_dir)
|
||||
if (dunlink_head
|
||||
&& records_written > dunlink_head->records_written + deferred_unlink_delay)
|
||||
flush_deferred_unlinks (false);
|
||||
|
||||
|
||||
p = dunlink_alloc ();
|
||||
p->next = NULL;
|
||||
p->file_name = normalize_filename (name);
|
||||
p->is_dir = is_dir;
|
||||
p->records_written = records_written;
|
||||
|
||||
|
||||
if (dunlink_tail)
|
||||
dunlink_tail->next = p;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user