svn commit: r347360 - head/sys/sys

Edward Tomasz Napierala trasz at FreeBSD.org
Wed May 8 18:47:02 UTC 2019


Author: trasz
Date: Wed May  8 18:47:00 2019
New Revision: 347360
URL: https://svnweb.freebsd.org/changeset/base/347360

Log:
  Mark inline functions with __unused; prevents compiler warning
  when they end up being unused.
  
  Reviewed by:	kib
  Obtained from:	OpenBSD
  MFC after:	2 weeks
  Sponsored by:	Klara Inc.
  Differential Revision:	https://reviews.freebsd.org/D20185

Modified:
  head/sys/sys/tree.h

Modified: head/sys/sys/tree.h
==============================================================================
--- head/sys/sys/tree.h	Wed May  8 18:46:12 2019	(r347359)
+++ head/sys/sys/tree.h	Wed May  8 18:47:00 2019	(r347360)
@@ -125,7 +125,7 @@ struct type *name##_SPLAY_INSERT(struct name *, struct
 struct type *name##_SPLAY_REMOVE(struct name *, struct type *);		\
 									\
 /* Finds the node with the same key as elm */				\
-static __inline struct type *						\
+static __unused __inline struct type *					\
 name##_SPLAY_FIND(struct name *head, struct type *elm)			\
 {									\
 	if (SPLAY_EMPTY(head))						\
@@ -136,7 +136,7 @@ name##_SPLAY_FIND(struct name *head, struct type *elm)
 	return (NULL);							\
 }									\
 									\
-static __inline struct type *						\
+static __unused __inline struct type *					\
 name##_SPLAY_NEXT(struct name *head, struct type *elm)			\
 {									\
 	name##_SPLAY(head, elm);					\
@@ -150,7 +150,7 @@ name##_SPLAY_NEXT(struct name *head, struct type *elm)
 	return (elm);							\
 }									\
 									\
-static __inline struct type *						\
+static __unused __inline struct type *					\
 name##_SPLAY_MIN_MAX(struct name *head, int val)			\
 {									\
 	name##_SPLAY_MINMAX(head, val);					\


More information about the svn-src-head mailing list