From: Dodji Seketeli <dodji@seketeli.org>
To: Ben Woodard via Libabigail <libabigail@sourceware.org>
Subject: Re: [PATCH] Remove redundant code from abidiff
Date: Tue, 07 Jun 2022 17:23:38 +0200 [thread overview]
Message-ID: <871qw0mr9h.fsf@seketeli.org> (raw)
In-Reply-To: <20220603131621.315455-1-woodard@redhat.com> (Ben Woodard via Libabigail's message of "Fri, 3 Jun 2022 06:16:21 -0700")
Ben Woodard via Libabigail <libabigail@sourceware.org> a écrit:
> While working on abicompat, I noticed that the following two blocks of
> code are redundant. They perform the same test as in the switch
> statement a few lines below.
>
> * tools/abidiff.cc - remove redundant code.
Thanks! I have applied the patch to the master branch.
I have just updated the ChangeLog part of the log to make it comply with
the standard. Below is the patch that was applied.
From ebf8f98f3dc7b6e4fe2af9c1ccbbfee55ace6c54 Mon Sep 17 00:00:00 2001
From: Ben Woodard <woodard@redhat.com>
Date: Fri, 3 Jun 2022 06:16:21 -0700
Subject: [PATCH] abidiff: Remove redundant code
While working on abicompat, I noticed that the following two blocks of
code are redundant. They perform the same test as in the switch
statement a few lines below.
* tools/abidiff.cc (main): Remove redundant code.
Signed-off-by: Ben Woodard <woodard@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
tools/abidiff.cc | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/tools/abidiff.cc b/tools/abidiff.cc
index 37a273ad..e0f6d5be 100644
--- a/tools/abidiff.cc
+++ b/tools/abidiff.cc
@@ -1127,20 +1127,7 @@ main(int argc, char* argv[])
abigail::tools_utils::file_type t1_type, t2_type;
t1_type = guess_file_type(opts.file1);
- if (t1_type == abigail::tools_utils::FILE_TYPE_UNKNOWN)
- {
- emit_prefix(argv[0], cerr)
- << "Unknown content type for file " << opts.file1 << "\n";
- return abigail::tools_utils::ABIDIFF_ERROR;
- }
-
t2_type = guess_file_type(opts.file2);
- if (t2_type == abigail::tools_utils::FILE_TYPE_UNKNOWN)
- {
- emit_prefix(argv[0], cerr)
- << "Unknown content type for file " << opts.file2 << "\n";
- return abigail::tools_utils::ABIDIFF_ERROR;
- }
environment_sptr env(new environment);
#ifdef WITH_DEBUG_SELF_COMPARISON
--
2.36.1
Cheers,
--
Dodji
prev parent reply other threads:[~2022-06-07 15:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-03 13:16 Ben Woodard
2022-06-07 15:23 ` Dodji Seketeli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qw0mr9h.fsf@seketeli.org \
--to=dodji@seketeli.org \
--cc=libabigail@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).