Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jan 2017 11:46:27 +0100
From:      Vincenzo Maffione <v.maffione@gmail.com>
To:        "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, freebsd-powerpc@freebsd.org,  FreeBSD CURRENT <freebsd-current@freebsd.org>, Luigi Rizzo <rizzo@iet.unipi.it>
Subject:   Re: powerpc.LINT* broken in netmap(4)
Message-ID:  <CA%2B_eA9jzSn-oojzH4AizXa34TjxwwHjv9ZUZuY9BnK3N1L9fXw@mail.gmail.com>
In-Reply-To: <D636872E-F5E0-49D4-A27E-621322BAE2CC@gmail.com>
References:  <D636872E-F5E0-49D4-A27E-621322BAE2CC@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
  Thanks for reporting. The warning is innocuous, but I'm not sure how to
silence it. Maybe

diff --git a/sys/dev/netmap/netmap_generic.c
b/sys/dev/netmap/netmap_generic.c
index cb1cff1f0e7..226a0864fd0 100644
--- a/sys/dev/netmap/netmap_generic.c
+++ b/sys/dev/netmap/netmap_generic.c
@@ -168,7 +168,7 @@ nm_os_get_mbuf(struct ifnet *ifp, int len)
 static void void_mbuf_dtor(struct mbuf *m, void *arg1, void *arg2) { }

 #define SET_MBUF_DESTRUCTOR(m, fn)     do {            \
-       (m)->m_ext.ext_free =3D fn ? (void *)fn : (void *)void_mbuf_dtor; \
+       (m)->m_ext.ext_free =3D (fn !=3D NULL) ? (void *)fn : (void
*)void_mbuf_dtor;   \
 } while (0)

 static inline struct mbuf *


or we could turn SET_MBUF_DESTRUCTOR into a real function.

Cheers,
  VIncenzo

2017-01-13 11:22 GMT+01:00 Ngie Cooper (yaneurabeya) <yaneurabeya@gmail.com=
>
:

> Hi,
>         I spotted these compilation errors on universe12a.freebsd.org for
> both powerpc.LINT and powerpc.LINT64:
>
> cc1: warnings being treated as errors
> /scratch/tmp/ngie/svn/sys/dev/netmap/netmap_generic.c: In function
> 'generic_set_tx_event':
> /scratch/tmp/ngie/svn/sys/dev/netmap/netmap_generic.c:765: warning: the
> address of 'generic_mbuf_destructor' will always evaluate as 'true'
> [-Waddress]
> --- netmap_generic.o ---
> *** [netmap_generic.o] Error code 1
>
>         I haven=E2=80=99t yet dug into why this only surfaces on powerpc,=
 yet=E2=80=A6
> Thanks,
> -Ngie
>



--=20
Vincenzo Maffione



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B_eA9jzSn-oojzH4AizXa34TjxwwHjv9ZUZuY9BnK3N1L9fXw>