[PATCH v1 1/2] notmuch: Silence compiler warnings.

David Edmondson dme at dme.org
Thu Oct 4 02:45:44 PDT 2018


---
 debugger.c           | 7 ++++---
 gmime-filter-reply.c | 4 ++--
 lib/index.cc         | 3 ++-
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/debugger.c b/debugger.c
index 5cb38ac4..db258c33 100644
--- a/debugger.c
+++ b/debugger.c
@@ -31,13 +31,14 @@
 bool
 debugger_is_active (void)
 {
-    char buf[1024];
+    char proc[PATH_MAX];
+    char buf[PATH_MAX];
 
     if (RUNNING_ON_VALGRIND)
 	return true;
 
-    sprintf (buf, "/proc/%d/exe", getppid ());
-    if (readlink (buf, buf, sizeof (buf)) != -1 &&
+    sprintf (proc, "/proc/%d/exe", getppid ());
+    if (readlink (proc, buf, sizeof (buf)) != -1 &&
 	strncmp (basename (buf), "gdb", 3) == 0)
     {
 	return true;
diff --git a/gmime-filter-reply.c b/gmime-filter-reply.c
index f673c0a2..5a956395 100644
--- a/gmime-filter-reply.c
+++ b/gmime-filter-reply.c
@@ -29,7 +29,7 @@
  **/
 
 
-static void g_mime_filter_reply_class_init (GMimeFilterReplyClass *klass);
+static void g_mime_filter_reply_class_init (GMimeFilterReplyClass *klass, gpointer klass_data);
 static void g_mime_filter_reply_init (GMimeFilterReply *filter, GMimeFilterReplyClass *klass);
 static void g_mime_filter_reply_finalize (GObject *object);
 
@@ -70,7 +70,7 @@ g_mime_filter_reply_get_type (void)
 
 
 static void
-g_mime_filter_reply_class_init (GMimeFilterReplyClass *klass)
+g_mime_filter_reply_class_init (GMimeFilterReplyClass *klass, gpointer klass_data __attribute__ ((unused)))
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 	GMimeFilterClass *filter_class = GMIME_FILTER_CLASS (klass);
diff --git a/lib/index.cc b/lib/index.cc
index 3f694387..86c6171d 100644
--- a/lib/index.cc
+++ b/lib/index.cc
@@ -142,7 +142,8 @@ static void filter_reset (GMimeFilter *filter);
 static GMimeFilterClass *parent_class = NULL;
 
 static void
-notmuch_filter_discard_non_term_class_init (NotmuchFilterDiscardNonTermClass *klass)
+notmuch_filter_discard_non_term_class_init (NotmuchFilterDiscardNonTermClass *klass,
+					    gpointer klass_data __attribute__ ((unused)))
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
     GMimeFilterClass *filter_class = GMIME_FILTER_CLASS (klass);
-- 
2.19.0



More information about the notmuch mailing list