This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Failed to compile after dabd71bb2bf with gcc 4.8.3


On Wed, 2016-01-27 at 12:18 +0900, Masanari Iida wrote:
> rpm_finder.cxx:242:5: error: unused parameter âfilenameâ
> [-Werror=unused-parameter]
> cc1plus: all warnings being treated as errors
> make[2]: *** [stap-rpm_finder.o] Error 1

Thanks for the report. Fixed as attached.

Cheers,

Mark
From 3bd2d41c7f67ad28b0e2af3e95935c5d63edfcaa Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw@redhat.com>
Date: Wed, 27 Jan 2016 12:58:49 +0100
Subject: [PATCH] Fix build issue with --without-rpm in rpm_finder.cxx

	* rpm_finder.cxx: Provide full dummy functions if HAVE_LIBRPM
	is not set.
---
 rpm_finder.cxx | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/rpm_finder.cxx b/rpm_finder.cxx
index f09cebf..7ad9738 100644
--- a/rpm_finder.cxx
+++ b/rpm_finder.cxx
@@ -201,10 +201,10 @@ missing_rpm_enlist (systemtap_session& sess, const char *filename, const char *r
 }
 #endif	/* HAVE_LIBRPM */
 
+#ifdef HAVE_LIBRPM
 void
 missing_rpm_list_print (systemtap_session &sess, const char* rpm_type)
 {
-#ifdef HAVE_LIBRPM
   if (sess.rpms_to_install.size() > 0 && ! sess.suppress_warnings) {
 
     if(strcmp(rpm_type,"-devel")==0)
@@ -225,26 +225,39 @@ missing_rpm_list_print (systemtap_session &sess, const char* rpm_type)
     }
     cerr << endl;
   }
-#endif
 }
+#else
+void
+missing_rpm_list_print (systemtap_session &, const char *)
+{
+}
+#endif
 
+#ifdef HAVE_LIBRPM
 int
 find_debug_rpms (systemtap_session &sess, const char * filename)
 {
-#ifdef HAVE_LIBRPM
   const char *rpm_type = "-debuginfo";
   return missing_rpm_enlist(sess, filename, rpm_type);
+}
 #else
+int
+find_debug_rpms (systemtap_session &, const char *)
+{
   return 0;
-#endif
 }
+#endif
+
 
+#ifdef HAVE_LIBRPM
 int find_devel_rpms(systemtap_session &sess, const char * filename)
 {
-#ifdef HAVE_LIBRPM
   const char *rpm_type = "-devel";
   return missing_rpm_enlist(sess, filename, rpm_type);
+}
 #else
+int find_devel_rpms(systemtap_session &, const char *)
+{
   return 0;
-#endif
 }
+#endif
-- 
1.8.3.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]