[Drbd-dev] "missing-prototypes" warning under standard kernel compile options

David Butterfield dab21774 at gmail.com
Mon Jul 8 20:16:43 CEST 2019


This fixes a "missing-prototypes" compiler warning under the standard kernel compile
warning options.  It wants to see a prior declaration for externally-visible functions.
The function at issue does not need to be externally-visible, so make it static.

drbd_actlog.c:239:1: warning: no previous prototype for ‘set_bme_priority’ [-Wmissing-prototypes]
 set_bme_priority(struct get_activity_log_ref_ctx *al_ctx)



diff --git a/drbd/drbd_actlog.c b/drbd/drbd_actlog.c
index 44c5b2cc..20b72d5f 100644
--- a/drbd/drbd_actlog.c
+++ b/drbd/drbd_actlog.c
@@ -235,7 +235,7 @@ find_active_resync_extent(struct get_activity_log_ref_ctx *al_ctx)
 	return NULL;
 }
 
-void
+static void
 set_bme_priority(struct get_activity_log_ref_ctx *al_ctx)
 {
 	struct drbd_peer_device *peer_device;


More information about the drbd-dev mailing list