⬢ DragonFlyBSD Kernel Audit
DF-3547 / build.log
← back to finding ↓ download raw
Warning: Object directory not changed from original /tmp/ngdev
cc  -O2 -pipe   -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Wcast-qual  -Wold-style-definition -Wmissing-include-dirs  -Wno-pointer-sign -Winit-self -Wundef -Wno-unused-but-set-variable -std=gnu11 -Werror -DKLD_MODULE -nostdinc  -I. -Idragonfly -I/tmp/ngdev/forwarder_x86_64/include -Idragonfly/../include  -Wold-style-declaration -fno-common -ffreestanding -fno-stack-protector -fno-strict-aliasing -fno-strict-overflow -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -mno-fp-ret-in-387 -mindirect-branch=thunk-inline   -c ng_device.c
ng_device.c:114:8: error: unknown type name 'd_poll_t'
 static d_poll_t ngdpoll;
        ^~~~~~~~
ng_device.c:116:15: error: variable 'ngd_cdevsw' has initializer but incomplete type
 static struct cdevsw ngd_cdevsw = {
               ^~~~~~
ng_device.c:117:3: error: 'struct cdevsw' has no member named 'd_version'
  .d_version = D_VERSION,
   ^~~~~~~~~
ng_device.c:117:15: error: 'D_VERSION' undeclared here (not in a function); did you mean 'MDT_VERSION'?
  .d_version = D_VERSION,
               ^~~~~~~~~
               MDT_VERSION
ng_device.c:117:15: error: excess elements in struct initializer [-Werror]
ng_device.c:117:15: note: (near initialization for 'ngd_cdevsw')
ng_device.c:118:3: error: 'struct cdevsw' has no member named 'd_open'
  .d_open = ngdopen,
   ^~~~~~
ng_device.c:118:12: error: excess elements in struct initializer [-Werror]
  .d_open = ngdopen,
            ^~~~~~~
ng_device.c:118:12: note: (near initialization for 'ngd_cdevsw')
ng_device.c:119:3: error: 'struct cdevsw' has no member named 'd_close'
  .d_close = ngdclose,
   ^~~~~~~
ng_device.c:119:13: error: excess elements in struct initializer [-Werror]
  .d_close = ngdclose,
             ^~~~~~~~
ng_device.c:119:13: note: (near initialization for 'ngd_cdevsw')
ng_device.c:120:3: error: 'struct cdevsw' has no member named 'd_read'
  .d_read = ngdread,
   ^~~~~~
ng_device.c:120:12: error: excess elements in struct initializer [-Werror]
  .d_read = ngdread,
            ^~~~~~~
ng_device.c:120:12: note: (near initialization for 'ngd_cdevsw')
ng_device.c:121:3: error: 'struct cdevsw' has no member named 'd_write'
  .d_write = ngdwrite,
   ^~~~~~~
ng_device.c:121:13: error: excess elements in struct initializer [-Werror]
  .d_write = ngdwrite,
             ^~~~~~~~
ng_device.c:121:13: note: (near initialization for 'ngd_cdevsw')
ng_device.c:125:3: error: 'struct cdevsw' has no member named 'd_poll'
  .d_poll = ngdpoll,
   ^~~~~~
ng_device.c:125:12: error: excess elements in struct initializer [-Werror]
  .d_poll = ngdpoll,
            ^~~~~~~
ng_device.c:125:12: note: (near initialization for 'ngd_cdevsw')
ng_device.c:126:3: error: 'struct cdevsw' has no member named 'd_name'
  .d_name = NG_DEVICE_DEVNAME,
   ^~~~~~
In file included from ng_device.c:60:
ng_device.h:36:27: error: excess elements in struct initializer [-Werror]
 #define NG_DEVICE_DEVNAME "ngd"
                           ^~~~~
ng_device.c:126:12: note: in expansion of macro 'NG_DEVICE_DEVNAME'
  .d_name = NG_DEVICE_DEVNAME,
            ^~~~~~~~~~~~~~~~~
ng_device.h:36:27: note: (near initialization for 'ngd_cdevsw')
 #define NG_DEVICE_DEVNAME "ngd"
                           ^~~~~
ng_device.c:126:12: note: in expansion of macro 'NG_DEVICE_DEVNAME'
  .d_name = NG_DEVICE_DEVNAME,
            ^~~~~~~~~~~~~~~~~
ng_device.c: In function 'ng_device_constructor':
ng_device.c:171:46: error: 'MTX_DEF' undeclared (first use in this function); did you mean 'MOD_DPF'?
  mtx_init(&priv->ngd_mtx, "ng_device", NULL, MTX_DEF);
                                              ^~~~~~~
                                              MOD_DPF
ng_device.c:171:46: note: each undeclared identifier is reported only once for each function it appears in
ng_device.c:171:2: error: too many arguments to function 'mtx_init'
  mtx_init(&priv->ngd_mtx, "ng_device", NULL, MTX_DEF);
  ^~~~~~~~
In file included from netgraph.h:53,
                 from ng_device.c:59:
dragonfly/sys/mutex2.h:53:1: note: declared here
 mtx_init(mtx_t *mtx, const char *ident)
 ^~~~~~~~
ng_device.c:172:24: error: 'struct ifqueue' has no member named 'ifq_mtx'; did you mean 'ifq_len'?
  mtx_init(&priv->readq.ifq_mtx, "ng_device queue", NULL, MTX_DEF);
                        ^~~~~~~
                        ifq_len
ng_device.c:172:2: error: too many arguments to function 'mtx_init'
  mtx_init(&priv->readq.ifq_mtx, "ng_device queue", NULL, MTX_DEF);
  ^~~~~~~~
In file included from netgraph.h:53,
                 from ng_device.c:59:
dragonfly/sys/mutex2.h:53:1: note: declared here
 mtx_init(mtx_t *mtx, const char *ident)
 ^~~~~~~~
ng_device.c:173:2: error: implicit declaration of function 'IFQ_SET_MAXLEN'; did you mean 'IFQ_MAXLEN'? [-Werror=implicit-function-declaration]
  IFQ_SET_MAXLEN(&priv->readq, ifqmaxlen);
  ^~~~~~~~~~~~~~
  IFQ_MAXLEN
ng_device.c:173:2: error: nested extern declaration of 'IFQ_SET_MAXLEN' [-Werror=nested-externs]
ng_device.c:179:39: error: implicit declaration of function 'unit2minor'; did you mean 'uminor'? [-Werror=implicit-function-declaration]
  priv->ngddev = make_dev(&ngd_cdevsw, unit2minor(priv->unit), UID_ROOT,
                                       ^~~~~~~~~~
                                       uminor
ng_device.c:179:39: error: nested extern declaration of 'unit2minor' [-Werror=nested-externs]
ng_device.c:179:26: error: passing argument 1 of 'make_dev' from incompatible pointer type [-Werror=incompatible-pointer-types]
  priv->ngddev = make_dev(&ngd_cdevsw, unit2minor(priv->unit), UID_ROOT,
                          ^~~~~~~~~~~
In file included from dragonfly/sys/buf.h:51,
                 from dragonfly/sys/vfsops.h:70,
                 from dragonfly/sys/vnode.h:63,
                 from ng_device.c:50:
dragonfly/sys/device.h:388:33: note: expected 'struct dev_ops *' but argument is of type 'struct cdevsw *'
 cdev_t make_dev(struct dev_ops *ops, int minor, uid_t uid, gid_t gid,
                 ~~~~~~~~~~~~~~~~^~~
ng_device.c:183:3: error: implicit declaration of function 'mtx_destroy'; did you mean 'ifa_destroy'? [-Werror=implicit-function-declaration]
   mtx_destroy(&priv->ngd_mtx);
   ^~~~~~~~~~~
   ifa_destroy
ng_device.c:183:3: error: nested extern declaration of 'mtx_destroy' [-Werror=nested-externs]
ng_device.c:184:28: error: 'struct ifqueue' has no member named 'ifq_mtx'; did you mean 'ifq_len'?
   mtx_destroy(&priv->readq.ifq_mtx);
                            ^~~~~~~
                            ifq_len
ng_device.c: In function 'ng_device_rcvdata':
ng_device.c:269:2: error: implicit declaration of function 'IF_LOCK'; did you mean 'IFQ_LOCK'? [-Werror=implicit-function-declaration]
  IF_LOCK(&priv->readq);
  ^~~~~~~
  IFQ_LOCK
ng_device.c:269:2: error: nested extern declaration of 'IF_LOCK' [-Werror=nested-externs]
ng_device.c:270:6: error: implicit declaration of function '_IF_QFULL'; did you mean 'IF_QFULL'? [-Werror=implicit-function-declaration]
  if (_IF_QFULL(&priv->readq)) {
      ^~~~~~~~~
      IF_QFULL
ng_device.c:270:6: error: nested extern declaration of '_IF_QFULL' [-Werror=nested-externs]
ng_device.c:271:3: error: implicit declaration of function '_IF_DROP'; did you mean 'IF_DROP'? [-Werror=implicit-function-declaration]
   _IF_DROP(&priv->readq);
   ^~~~~~~~
   IF_DROP
ng_device.c:271:3: error: nested extern declaration of '_IF_DROP' [-Werror=nested-externs]
ng_device.c:272:3: error: implicit declaration of function 'IF_UNLOCK'; did you mean 'IFQ_UNLOCK'? [-Werror=implicit-function-declaration]
   IF_UNLOCK(&priv->readq);
   ^~~~~~~~~
   IFQ_UNLOCK
ng_device.c:272:3: error: nested extern declaration of 'IF_UNLOCK' [-Werror=nested-externs]
ng_device.c:277:2: error: implicit declaration of function '_IF_ENQUEUE'; did you mean 'IF_ENQUEUE'? [-Werror=implicit-function-declaration]
  _IF_ENQUEUE(&priv->readq, m);
  ^~~~~~~~~~~
  IF_ENQUEUE
ng_device.c:277:2: error: nested extern declaration of '_IF_ENQUEUE' [-Werror=nested-externs]
ng_device.c: In function 'ng_device_disconnect':
ng_device.c:303:29: error: 'struct ifqueue' has no member named 'ifq_mtx'; did you mean 'ifq_len'?
  mtx_destroy(&(priv)->readq.ifq_mtx);
                             ^~~~~~~
                             ifq_len
ng_device.c: At top level:
ng_device.c:332:1: error: conflicting types for 'ngdopen'
 ngdopen(struct cdev *dev, int flag, int mode, struct thread *td)
 ^~~~~~~
ng_device.c:108:17: note: previous declaration of 'ngdopen' was here
 static d_open_t ngdopen;
                 ^~~~~~~
ng_device.c:349:1: error: conflicting types for 'ngdclose'
 ngdclose(struct cdev *dev, int flag, int mode, struct thread *td)
 ^~~~~~~~
ng_device.c:107:18: note: previous declaration of 'ngdclose' was here
 static d_close_t ngdclose;
                  ^~~~~~~~
ng_device.c:409:1: error: conflicting types for 'ngdread'
 ngdread(struct cdev *dev, struct uio *uio, int flag)
 ^~~~~~~
ng_device.c:109:17: note: previous declaration of 'ngdread' was here
 static d_read_t ngdread;
                 ^~~~~~~
ng_device.c: In function 'ngdread':
ng_device.c:425:17: error: implicit declaration of function 'msleep'; did you mean 'zsleep'? [-Werror=implicit-function-declaration]
    if ((error = msleep(priv, &priv->ngd_mtx,
                 ^~~~~~
                 zsleep
ng_device.c:425:17: error: nested extern declaration of 'msleep' [-Werror=nested-externs]
ng_device.c:426:8: error: 'PDROP' undeclared (first use in this function); did you mean 'IF_DROP'?
        PDROP | PCATCH | (PZERO + 1),
        ^~~~~
        IF_DROP
ng_device.c:426:26: error: 'PZERO' undeclared (first use in this function); did you mean 'NZERO'?
        PDROP | PCATCH | (PZERO + 1),
                          ^~~~~
                          NZERO
ng_device.c: At top level:
ng_device.c:452:1: error: conflicting types for 'ngdwrite'
 ngdwrite(struct cdev *dev, struct uio *uio, int flag)
 ^~~~~~~~
ng_device.c:110:18: note: previous declaration of 'ngdwrite' was here
 static d_write_t ngdwrite;
                  ^~~~~~~~
ng_device.c: In function 'ngdwrite':
ng_device.c:466:11: error: implicit declaration of function 'm_uiotombuf'; did you mean 'm_uiomove'? [-Werror=implicit-function-declaration]
  if ((m = m_uiotombuf(uio, M_NOWAIT, 0, 0, M_PKTHDR)) == NULL)
           ^~~~~~~~~~~
           m_uiomove
ng_device.c:466:11: error: nested extern declaration of 'm_uiotombuf' [-Werror=nested-externs]
ng_device.c:466:9: error: assignment to 'struct mbuf *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
  if ((m = m_uiotombuf(uio, M_NOWAIT, 0, 0, M_PKTHDR)) == NULL)
         ^
ng_device.c: At top level:
ng_device.c:479:1: error: 'ngdpoll' redeclared as different kind of symbol
 ngdpoll(struct cdev *dev, int events, struct thread *td)
 ^~~~~~~
ng_device.c:114:17: note: previous declaration of 'ngdpoll' was here
 static d_poll_t ngdpoll;
                 ^~~~~~~
ng_device.c: In function 'ngdpoll':
ng_device.c:485:7: error: implicit declaration of function 'IFQ_IS_EMPTY'; did you mean 'IF_QEMPTY'? [-Werror=implicit-function-declaration]
      !IFQ_IS_EMPTY(&priv->readq))
       ^~~~~~~~~~~~
       IF_QEMPTY
ng_device.c:485:7: error: nested extern declaration of 'IFQ_IS_EMPTY' [-Werror=nested-externs]
ng_device.c: At top level:
ng_device.c:116:22: error: storage size of 'ngd_cdevsw' isn't known
 static struct cdevsw ngd_cdevsw = {
                      ^~~~~~~~~~
ng_device.c:107:18: error: 'ngdclose' used but never defined [-Werror]
 static d_close_t ngdclose;
                  ^~~~~~~~
ng_device.c:108:17: error: 'ngdopen' used but never defined [-Werror]
 static d_open_t ngdopen;
                 ^~~~~~~
ng_device.c:109:17: error: 'ngdread' used but never defined [-Werror]
 static d_read_t ngdread;
                 ^~~~~~~
ng_device.c:110:18: error: 'ngdwrite' used but never defined [-Werror]
 static d_write_t ngdwrite;
                  ^~~~~~~~
ng_device.c:479:1: error: 'ngdpoll' defined but not used [-Werror=unused-function]
 ngdpoll(struct cdev *dev, int events, struct thread *td)
 ^~~~~~~
ng_device.c:452:1: error: 'ngdwrite' defined but not used [-Werror=unused-function]
 ngdwrite(struct cdev *dev, struct uio *uio, int flag)
 ^~~~~~~~
ng_device.c:409:1: error: 'ngdread' defined but not used [-Werror=unused-function]
 ngdread(struct cdev *dev, struct uio *uio, int flag)
 ^~~~~~~
ng_device.c:349:1: error: 'ngdclose' defined but not used [-Werror=unused-function]
 ngdclose(struct cdev *dev, int flag, int mode, struct thread *td)
 ^~~~~~~~
ng_device.c:332:1: error: 'ngdopen' defined but not used [-Werror=unused-function]
 ngdopen(struct cdev *dev, int flag, int mode, struct thread *td)
 ^~~~~~~
cc1: all warnings being treated as errors
*** Error code 1

Stop.
make: stopped making "all" in /tmp/ngdev