[CRIU] [PATCH cr] crtools: remove unused variables
Andrew Vagin
avagin at parallels.com
Fri May 18 07:39:49 EDT 2012
drop this one, I resent it.
On Fri, May 18, 2012 at 02:16:55AM +0400, Andrey Vagin wrote:
>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> cr-dump.c | 5 +----
> cr-show.c | 10 +---------
> ipc_ns.c | 14 ++++++--------
> parasite-syscall.c | 1 -
> parasite.c | 8 +-------
> restorer.c | 3 ---
> sk-queue.c | 2 --
> sk-tcp.c | 2 +-
> 8 files changed, 10 insertions(+), 35 deletions(-)
>
> diff --git a/cr-dump.c b/cr-dump.c
> index aa8ce88..ec0d049 100644
> --- a/cr-dump.c
> +++ b/cr-dump.c
> @@ -866,8 +866,6 @@ err:
>
> static int dump_task_core(struct core_entry *core, int fd_core)
> {
> - int ret;
> -
> pr_info("Dumping header ... ");
>
> core->header.version = HEADER_VERSION;
> @@ -1378,7 +1376,6 @@ static int dump_pstree(pid_t pid, const struct list_head *pstree_list)
> {
> const struct pstree_item *item;
> struct pstree_entry e;
> - unsigned long i;
> int ret = -1;
> int pstree_fd;
>
> @@ -1653,7 +1650,7 @@ int cr_dump_tasks(pid_t pid, const struct cr_options *opts)
> {
> LIST_HEAD(pstree_list);
> struct pstree_item *item;
> - int i, ret = -1;
> + int ret = -1;
>
> pr_info("========================================\n");
> pr_info("Dumping process %s(pid: %d)\n", !opts->leader_only ? "group " : "", pid);
> diff --git a/cr-show.c b/cr-show.c
> index b384ca9..1c766a0 100644
> --- a/cr-show.c
> +++ b/cr-show.c
> @@ -182,9 +182,6 @@ void show_pipes_data(int fd_pipes, struct cr_options *o)
> pr_img_head(CR_FD_PIPES_DATA);
>
> while (1) {
> - int ret;
> - off_t off;
> -
> ret = read_img_eof(fd_pipes, &e);
> if (ret <= 0)
> goto out;
> @@ -206,8 +203,6 @@ void show_pipes(int fd_pipes, struct cr_options *o)
> pr_img_head(CR_FD_PIPES);
>
> while (1) {
> - int ret;
> -
> ret = read_img_eof(fd_pipes, &e);
> if (ret <= 0)
> goto out;
> @@ -311,7 +306,7 @@ void show_pages(int fd_pages, struct cr_options *o)
> } else {
> while (1) {
> struct page_entry e;
> - int i, j;
> + int i;
>
> pr_msg("\t");
> for (i = 0; i < DEF_PAGES_PER_LINE; i++) {
> @@ -483,8 +478,6 @@ void show_pstree(int fd_pstree, struct cr_options *o)
> static void show_core_regs(int fd_core)
> {
> struct user_regs_entry regs;
> - struct desc_struct tls;
> - int i;
>
> pr_msg("\n\t---[GP registers set]---\n");
>
> @@ -521,7 +514,6 @@ static inline char *task_state_str(int state)
> static void show_core_rest(int fd_core)
> {
> struct task_core_entry tc;
> - int i;
>
> lseek(fd_core, GET_FILE_OFF(struct core_entry, tc), SEEK_SET);
> if (read_img(fd_core, &tc) < 0)
> diff --git a/ipc_ns.c b/ipc_ns.c
> index bdc3c34..6dfe8f0 100644
> --- a/ipc_ns.c
> +++ b/ipc_ns.c
> @@ -141,7 +141,7 @@ static int dump_ipc_sem(int fd)
> {
> int i, maxid;
> struct seminfo info;
> - int err, slot;
> + int slot;
>
> maxid = semctl(0, 0, SEM_INFO, &info);
> if (maxid < 0) {
> @@ -264,7 +264,7 @@ static int dump_ipc_msg(int fd)
> {
> int i, maxid;
> struct msginfo info;
> - int err, slot;
> + int slot;
>
> maxid = msgctl(0, MSG_INFO, (struct msqid_ds *)&info);
> if (maxid < 0) {
> @@ -445,7 +445,7 @@ static int dump_ipc_data(const struct cr_fdset *fdset)
>
> int dump_ipc_ns(int ns_pid, const struct cr_fdset *fdset)
> {
> - int fd, ret;
> + int ret;
>
> ret = switch_ns(ns_pid, CLONE_NEWIPC, "ipc");
> if (ret < 0)
> @@ -648,9 +648,8 @@ static int prepare_ipc_sem(int pid)
> return -1;
>
> while (1) {
> - int ret, id;
> + int ret;
> struct ipc_sem_entry entry;
> - struct semid_ds ds;
>
> ret = read_img_eof(fd, &entry);
> if (ret < 0)
> @@ -759,9 +758,8 @@ static int prepare_ipc_msg(int pid)
> return -1;
>
> while (1) {
> - int ret, id;
> + int ret;
> struct ipc_msg_entry entry;
> - struct msqid_ds ds;
>
> ret = read_img_eof(fd, &entry);
> if (ret < 0) {
> @@ -852,7 +850,7 @@ static int prepare_ipc_shm(int pid)
> return -1;
>
> while (1) {
> - int ret, id;
> + int ret;
> struct ipc_shm_entry shm;
>
> ret = read_img_eof(fd, &shm);
> diff --git a/parasite-syscall.c b/parasite-syscall.c
> index 68fd383..5eaff27 100644
> --- a/parasite-syscall.c
> +++ b/parasite-syscall.c
> @@ -604,7 +604,6 @@ out:
>
> int parasite_cure_seized(struct parasite_ctl *ctl)
> {
> - parasite_status_t args = { };
> int ret = 0;
>
> if (ctl->parasite_ip) {
> diff --git a/parasite.c b/parasite.c
> index 07d9b53..7e8c43e 100644
> --- a/parasite.c
> +++ b/parasite.c
> @@ -32,8 +32,6 @@
>
> static void *brk_start, *brk_end, *brk_tail;
>
> -static struct page_entry page;
> -static struct vma_entry vma;
> static int logfd = -1;
> static int tsock = -1;
>
> @@ -331,9 +329,7 @@ static int dump_itimer(int which, int fd, parasite_status_t *st)
>
> static int dump_itimers(parasite_status_t *st)
> {
> - rt_sigaction_t act;
> - struct sa_entry e;
> - int fd, sig;
> + int fd;
> int ret = -1;
>
> fd = recv_fd(tsock);
> @@ -364,8 +360,6 @@ static int reset_blocked = 0;
>
> static int dump_misc(struct parasite_dump_misc *args)
> {
> - parasite_status_t *st = &args->status;
> -
> args->secbits = sys_prctl(PR_GET_SECUREBITS, 0, 0, 0, 0);
> args->brk = sys_brk(0);
> args->blocked = old_blocked;
> diff --git a/restorer.c b/restorer.c
> index b0de5ea..2fa049a 100644
> --- a/restorer.c
> +++ b/restorer.c
> @@ -37,8 +37,6 @@ static struct task_entries *task_entries;
>
> static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
> {
> - int status, pid;
> -
> write_num(siginfo->si_pid);
> if (siginfo->si_code & CLD_EXITED)
> write_string(" exited, status=");
> @@ -294,7 +292,6 @@ static u64 restore_mapping(const struct vma_entry *vma_entry)
> long __export_restore_task(struct task_restore_core_args *args)
> {
> long ret = -1;
> - struct task_entry *task_entry;
> struct core_entry *core_entry;
> struct vma_entry *vma_entry;
> u64 va;
> diff --git a/sk-queue.c b/sk-queue.c
> index a63ea02..7c29037 100644
> --- a/sk-queue.c
> +++ b/sk-queue.c
> @@ -33,8 +33,6 @@ int read_sk_queues(void)
> return -1;
>
> while (1) {
> - struct sk_packet_entry tmp;
> -
> pkt = xmalloc(sizeof(*pkt));
> if (!pkt) {
> pr_err("Failed to allocate packet header\n");
> diff --git a/sk-tcp.c b/sk-tcp.c
> index 8b7977d..c2e3f5a 100644
> --- a/sk-tcp.c
> +++ b/sk-tcp.c
> @@ -96,7 +96,7 @@ err1:
>
> static void tcp_unlock_one(struct inet_sk_desc *sk)
> {
> - int ret, aux = 0;
> + int ret;
>
> list_del(&sk->rlist);
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list