public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Ben Woodard <woodard@redhat.com>
To: Mark Wielaard <mjw@redhat.com>
Cc: libabigail@sourceware.org
Subject: Re: [PATCH] Remove defined but not used functions pointed out by GCC6.
Date: Fri, 01 Jan 2016 00:00:00 -0000	[thread overview]
Message-ID: <B77147E0-8FB9-44BB-A52B-C2EEF2549256@redhat.com> (raw)
In-Reply-To: <1453805186-28282-1-git-send-email-mjw@redhat.com>

I don’t know if these are the kinds of functions that I would get rid of. They don’t look like much but even though they aren’t being used now, they are the kinds of data access and type conversion functions that C++ is known for. Dodji is the final arbiter in this but I think that removing these functions just to silence a warning isn’t the right approach in this case.

Other opinions?

-ben

> On Jan 26, 2016, at 2:46 AM, Mark Wielaard <mjw@redhat.com> wrote:
> 
> abg-ir.cc:6041:1: warning: ‘abigail::ir::decl_base_sptr abigail::ir::convert_node_to_decl(std::tr1::shared_ptr<_Tp>) [with NodeKind = abigail::ir::decl_base]’ defined but not used [-Wunused-function]
> convert_node_to_decl(decl_base_sptr node)
> ^~~~~~~~~~~~~~~~~~~~
> 
> abg-ir.cc:5990:1: warning: ‘const string& abigail::ir::get_node_name(std::tr1::shared_ptr<_Tp>) [with NodeKind = abigail::ir::decl_base]’ defined but not used -Wunused-function]
> get_node_name(decl_base_sptr node)
> ^~~~~~~~~~~~~
> 
> 	* src/abg-ir.cc (convert_node_to_decl(decl_base_sptr)): Remove
> 	definition.
> 	(get_node_name(decl_base_sptr)): Likewise.
> 
> Signed-off-by: Mark Wielaard <mjw@redhat.com>
> ---
> src/abg-ir.cc | 20 --------------------
> 1 file changed, 20 deletions(-)
> 
> diff --git a/src/abg-ir.cc b/src/abg-ir.cc
> index 8a959f7..4b34916 100644
> --- a/src/abg-ir.cc
> +++ b/src/abg-ir.cc
> @@ -5980,16 +5980,6 @@ template<typename NodeKind>
> static const string&
> get_node_name(shared_ptr<NodeKind> node);
> 
> -/// Gets the name of a decl_base node.
> -///
> -/// @param node the decl_base node to get the name from.
> -///
> -/// @return the name of the node.
> -template<>
> -const string&
> -get_node_name(decl_base_sptr node)
> -{return node->get_name();}
> -
> /// Gets the name of a class_decl node.
> ///
> /// @param node the decl_base node to get the name from.
> @@ -6031,16 +6021,6 @@ template<typename NodeKind>
> static decl_base_sptr
> convert_node_to_decl(shared_ptr<NodeKind> node);
> 
> -/// Get the declaration of a given decl_base node
> -///
> -/// @param node the decl_base node to consider.
> -///
> -/// @return the declaration of the node.
> -template<>
> -decl_base_sptr
> -convert_node_to_decl(decl_base_sptr node)
> -{return node;}
> -
> /// Get the declaration of a given class_decl node
> ///
> /// @param node the class_decl node to consider.
> -- 
> 2.5.0
> 

  reply	other threads:[~2016-01-26 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-01  0:00 Mark Wielaard
2016-01-01  0:00 ` Ben Woodard [this message]
2016-01-01  0:00   ` Dodji Seketeli
2016-01-01  0:00 ` 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=B77147E0-8FB9-44BB-A52B-C2EEF2549256@redhat.com \
    --to=woodard@redhat.com \
    --cc=libabigail@sourceware.org \
    --cc=mjw@redhat.com \
    /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).