[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Remove defined but not used functions pointed out by GCC6.



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