[PATCH 0/2] Synchronize <sys/tree.h> with FreeBSD

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 0/2] Synchronize <sys/tree.h> with FreeBSD

Sebastian Huber-4
pfg (1):
  sys/sys: further adoption of SPDX licensing ID tags.

trasz (1):
  Mark inline functions with __unused;

 newlib/libc/include/sys/tree.h | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

--
2.16.4

Reply | Threaded
Open this post in threaded view
|

[PATCH 1/2] sys/sys: further adoption of SPDX licensing ID tags.

Sebastian Huber-4
From: pfg <[hidden email]>

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
---
 newlib/libc/include/sys/tree.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/newlib/libc/include/sys/tree.h b/newlib/libc/include/sys/tree.h
index f4167c4e4..aef934a10 100644
--- a/newlib/libc/include/sys/tree.h
+++ b/newlib/libc/include/sys/tree.h
@@ -3,6 +3,8 @@
 /* $FreeBSD$ */
 
 /*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
  * Copyright 2002 Niels Provos <[hidden email]>
  * All rights reserved.
  *
--
2.16.4

Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] Mark inline functions with __unused;

Sebastian Huber-4
In reply to this post by Sebastian Huber-4
From: trasz <[hidden email]>

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
---
 newlib/libc/include/sys/tree.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/newlib/libc/include/sys/tree.h b/newlib/libc/include/sys/tree.h
index aef934a10..fd66ceba1 100644
--- a/newlib/libc/include/sys/tree.h
+++ b/newlib/libc/include/sys/tree.h
@@ -1,6 +1,6 @@
 /* $NetBSD: tree.h,v 1.8 2004/03/28 19:38:30 provos Exp $ */
 /* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/sys/tree.h 347360 2019-05-08 18:47:00Z trasz $ */
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -90,7 +90,7 @@ struct { \
  SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
  (head)->sph_root = tmp; \
 } while (/*CONSTCOND*/ 0)
-
+
 #define SPLAY_ROTATE_LEFT(head, tmp, field) do { \
  SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
  SPLAY_LEFT(tmp, field) = (head)->sph_root; \
@@ -125,7 +125,7 @@ struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
 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); \
--
2.16.4

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 0/2] Synchronize <sys/tree.h> with FreeBSD

Corinna Vinschen
In reply to this post by Sebastian Huber-4
On Jun  7 09:17, Sebastian Huber wrote:

> pfg (1):
>   sys/sys: further adoption of SPDX licensing ID tags.
>
> trasz (1):
>   Mark inline functions with __unused;
>
>  newlib/libc/include/sys/tree.h | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
>
> --
> 2.16.4
Looks good, please push.


Thanks,
Corinna

--
Corinna Vinschen
Cygwin Maintainer
Red Hat

signature.asc (849 bytes) Download Attachment