public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: tangmeng <tangmeng@uniontech.com>
To: libabigail@sourceware.org
Cc: tangmeng <tangmeng@uniontech.com>
Subject: [PATCH v2] abicompat: Add prompt message for abnormal operation
Date: Fri, 29 Oct 2021 17:23:43 +0800	[thread overview]
Message-ID: <20211029092343.32219-1-tangmeng@uniontech.com> (raw)

When using abicompat, if the user configures the
lib2 path while using the xxx option, the configuration
of lib2 is not actually processed in the command
execution process, and there is no prompt message.
It will cause lib2 to be considered to have been processed,
so a warning is added here to prompt the user.

            * tools/abicompat.cc (main): Add warning tips for some actions
            (main): Remove extra spaces in the comment code

Signed-off-by: tangmeng <tangmeng@uniontech.com>
---
 tools/abicompat.cc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/abicompat.cc b/tools/abicompat.cc
index 60cd794f..989915f3 100644
--- a/tools/abicompat.cc
+++ b/tools/abicompat.cc
@@ -390,7 +390,7 @@ perform_compat_check_in_normal_mode(options& opts,
   return status;
 }
 
-/// An description of a change of the type of a function.  It contains
+/// An description of a change of the type of a function. It contains
 /// the declaration of the function we are interested in, as well as
 /// the differences found in the type of that function.
 struct fn_change
@@ -638,6 +638,13 @@ main(int argc, char* argv[])
       return 0;
     }
 
+  if (opts.weak_mode && !opts.lib2_path.empty())
+    {
+      emit_prefix(argv[0], cout)
+        << "WARNING: The \'--weak-mode\' option is used. The "
+	<< opts.lib2_path << " will be ignored automatically\n";
+    }
+
   ABG_ASSERT(!opts.app_path.empty());
   if (!abigail::tools_utils::check_file(opts.app_path, cerr, opts.prog_name))
     return abigail::tools_utils::ABIDIFF_ERROR;
-- 
2.20.1




             reply	other threads:[~2021-10-29  9:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  9:23 tangmeng [this message]
2021-11-02  9:18 ` Dodji Seketeli
2021-11-05  9:38 tangmeng
2021-11-09 10:18 ` Dodji Seketeli

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=20211029092343.32219-1-tangmeng@uniontech.com \
    --to=tangmeng@uniontech.com \
    --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).