DragonFlyBSD Kernel Audit
DF-2572 / module_build_failure.txt
← back to finding ↓ download raw
ng_device.c:103: error: "MIN" redefined [-Werror]
ng_device.c:111:8: error: unknown type name 'd_close_t'
ng_device.c:112:8: error: unknown type name 'd_open_t'
ng_device.c:113:8: error: unknown type name 'd_read_t'
ng_device.c:114:8: error: unknown type name 'd_write_t'
ng_device.c:115:8: error: unknown type name 'd_ioctl_t'
ng_device.c:116:8: error: unknown type name 'd_poll_t'
ng_device.c:119:15: error: variable 'ngd_cdevsw' has initializer but incomplete type
ng_device.c:120:25: error: excess elements in struct initializer [-Werror]
ng_device.c:118:24: error: excess elements in struct initializer [-Werror]
ng_device.c:122:25: error: excess elements in struct initializer [-Werror]
dragonfly/sys/_null.h:35:14: error: excess elements in struct initializer [-Werror]
dragonfly/sys/_null.h:35:14: error: excess elements in struct initializer [-Werror]
ng_device.c:126:25: error: excess elements in struct initializer [-Werror]
ng_device.c:127:25: error: excess elements in struct initializer [-Werror]
ng_device.c:128:25: error: excess elements in struct initializer [-Werror]
ng_device.c:129:25: error: excess elements in struct initializer [-Werror]
ng_device.c:130:25: error: excess elements in struct initializer [-Werror]
ng_device.c:131:25: error: excess elements in struct initializer [-Werror]
ng_device.c:132:25: error: 'nommap' undeclared here (not in a function); did you mean 'node_p'?
ng_device.c:132:25: error: excess elements in struct initializer [-Werror]
ng_device.c:133:25: error: 'nostrategy' undeclared here (not in a function); did you mean 'hostname'?
ng_device.c:133:25: error: excess elements in struct initializer [-Werror]
ng_device.c:134:25: error: 'nodump' undeclared here (not in a function); did you mean 'node_p'?
ng_device.c:134:25: error: excess elements in struct initializer [-Werror]
ng_device.c:135:25: error: 'nopsize' undeclared here (not in a function)
ng_device.c:135:25: error: excess elements in struct initializer [-Werror]
ng_device.c:152:4: error: implicit declaration of function 'cdevsw_add' [-Werror=implicit-function-declaration]
ng_device.c:152:4: error: nested extern declaration of 'cdevsw_add' [-Werror=nested-externs]
ng_device.c:159:4: error: implicit declaration of function 'cdevsw_remove'; did you mean 'knote_remove'? [-Werror=implicit-function-declaration]
ng_device.c:159:4: error: nested extern declaration of 'cdevsw_remove' [-Werror=nested-externs]
ng_device.c:203:1: error: conflicting types for 'ng_device_cons'
ng_device.c:286:27: error: implicit declaration of function 'make_dev'; did you mean 'makeudev'? [-Werror=implicit-function-declaration]
ng_device.c:286:27: error: nested extern declaration of 'make_dev' [-Werror=nested-externs]
ng_device.c:286:25: error: assignment to 'cdev_t' {aka 'struct cdev *'} from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
ng_device.c:419:1: error: 'ngdopen' redeclared as different kind of symbol
ng_device.c:433:1: error: 'ngdclose' redeclared as different kind of symbol
ng_device.c:451:1: error: 'ngdioctl' redeclared as different kind of symbol
ng_device.c:506:1: error: 'ngdread' redeclared as different kind of symbol
ng_device.c:557:1: error: 'ngdwrite' redeclared as different kind of symbol
---
ng_device.c:103: error: "MIN" redefined [-Werror]
 #define  MIN(a, b) ((a) < (b) ? (a) : (b))
 
In file included from ng_device.c:35:
dragonfly/sys/param.h:429: note: this is the location of the previous definition
 #define MIN(a,b) (((a)<(b))?(a):(b))
 
ng_device.c:111:8: error: unknown type name 'd_close_t'
 static d_close_t ngdclose;
        ^~~~~~~~~
ng_device.c:112:8: error: unknown type name 'd_open_t'
 static d_open_t ngdopen;
        ^~~~~~~~
ng_device.c:113:8: error: unknown type name 'd_read_t'
 static d_read_t ngdread;
        ^~~~~~~~
ng_device.c:114:8: error: unknown type name 'd_write_t'
 static d_write_t ngdwrite;
        ^~~~~~~~~
ng_device.c:115:8: error: unknown type name 'd_ioctl_t'
 static d_ioctl_t ngdioctl;
        ^~~~~~~~~
ng_device.c:116:8: error: unknown type name 'd_poll_t'
 static d_poll_t ngdpoll;
        ^~~~~~~~
ng_device.c:119:15: error: variable 'ngd_cdevsw' has initializer but incomplete type
 static struct cdevsw ngd_cdevsw = {
               ^~~~~~
ng_device.c:120:25: error: excess elements in struct initializer [-Werror]
         /* name */      "ngd",
                         ^~~~~
ng_device.c:120:25: note: (near initialization for 'ngd_cdevsw')
ng_device.c:118:24: error: excess elements in struct initializer [-Werror]
 #define NGD_CDEV_MAJOR 20
                        ^~
ng_device.c:121:25: note: in expansion of macro 'NGD_CDEV_MAJOR'
         /* maj */       NGD_CDEV_MAJOR,
                         ^~~~~~~~~~~~~~
ng_device.c:118:24: note: (near initialization for 'ngd_cdevsw')
 #define NGD_CDEV_MAJOR 20
                        ^~
ng_device.c:121:25: note: in expansion of macro 'NGD_CDEV_MAJOR'
         /* maj */       NGD_CDEV_MAJOR,
                         ^~~~~~~~~~~~~~
ng_device.c:122:25: error: excess elements in struct initializer [-Werror]
         /* flags */     0,
                         ^
ng_device.c:122:25: note: (near initialization for 'ngd_cdevsw')
In file included from dragonfly/sys/param.h:273,
                 from ng_device.c:35:
dragonfly/sys/_null.h:35:14: error: excess elements in struct initializer [-Werror]
 #define NULL ((void *)0)
              ^
ng_device.c:123:13: note: in expansion of macro 'NULL'
  /* port */ NULL,
             ^~~~
dragonfly/sys/_null.h:35:14: note: (near initialization for 'ngd_cdevsw')
 #define NULL ((void *)0)
              ^
ng_device.c:123:13: note: in expansion of macro 'NULL'
  /* port */ NULL,
             ^~~~
dragonfly/sys/_null.h:35:14: error: excess elements in struct initializer [-Werror]
 #define NULL ((void *)0)
              ^
ng_device.c:124:14: note: in expansion of macro 'NULL'
  /* clone */ NULL,
              ^~~~
dragonfly/sys/_null.h:35:14: note: (near initialization for 'ngd_cdevsw')
 #define NULL ((void *)0)
              ^
ng_device.c:124:14: note: in expansion of macro 'NULL'
  /* clone */ NULL,
              ^~~~
ng_device.c:126:25: error: excess elements in struct initializer [-Werror]
         /* open */      ngdopen,
                         ^~~~~~~
ng_device.c:126:25: note: (near initialization for 'ngd_cdevsw')
ng_device.c:127:25: error: excess elements in struct initializer [-Werror]
         /* close */     ngdclose,
                         ^~~~~~~~
ng_device.c:127:25: note: (near initialization for 'ngd_cdevsw')
ng_device.c:128:25: error: excess elements in struct initializer [-Werror]
         /* read */      ngdread,
                         ^~~~~~~
ng_device.c:128:25: note: (near initialization for 'ngd_cdevsw')
ng_device.c:129:25: error: excess elements in struct initializer [-Werror]
         /* write */     ngdwrite,
                         ^~~~~~~~
ng_device.c:129:25: note: (near initialization for 'ngd_cdevsw')
ng_device.c:130:25: error: excess elements in struct initializer [-Werror]
         /* ioctl */     ngdioctl,
                         ^~~~~~~~
ng_device.c:130:25: note: (near initialization for 'ngd_cdevsw')
ng_device.c:131:25: error: excess elements in struct initializer [-Werror]
         /* poll */      ngdpoll,
                         ^~~~~~~
ng_device.c:131:25: note: (near initialization for 'ngd_cdevsw')
ng_device.c:132:25: error: 'nommap' undeclared here (not in a function); did you mean 'node_p'?
         /* mmap */      nommap,
                         ^~~~~~
                         node_p
ng_device.c:132:25: error: excess elements in struct initializer [-Werror]
ng_device.c:132:25: note: (near initialization for 'ngd_cdevsw')
ng_device.c:133:25: error: 'nostrategy' undeclared here (not in a function); did you mean 'hostname'?
         /* strategy */  nostrategy,
                         ^~~~~~~~~~
                         hostname
ng_device.c:133:25: error: excess elements in struct initializer [-Werror]
ng_device.c:133:25: note: (near initialization for 'ngd_cdevsw')
ng_device.c:134:25: error: 'nodump' undeclared here (not in a function); did you mean 'node_p'?
         /* dump */      nodump,
                         ^~~~~~
                         node_p
ng_device.c:134:25: error: excess elements in struct initializer [-Werror]
ng_device.c:134:25: note: (near initialization for 'ngd_cdevsw')
ng_device.c:135:25: error: 'nopsize' undeclared here (not in a function)
         /* psize */     nopsize
                         ^~~~~~~
ng_device.c:135:25: error: excess elements in struct initializer [-Werror]
ng_device.c:135:25: note: (near initialization for 'ngd_cdevsw')
ng_device.c: In function 'ng_device_mod_event':
ng_device.c:152:4: error: implicit declaration of function 'cdevsw_add' [-Werror=implicit-function-declaration]
    cdevsw_add(&ngd_cdevsw, 0, 0);
    ^~~~~~~~~~
ng_device.c:152:4: error: nested extern declaration of 'cdevsw_add' [-Werror=nested-externs]
ng_device.c:159:4: error: implicit declaration of function 'cdevsw_remove'; did you mean 'knote_remove'? [-Werror=implicit-function-declaration]
    cdevsw_remove(&ngd_cdevsw, 0, 0);
    ^~~~~~~~~~~~~
    knote_remove
ng_device.c:159:4: error: nested extern declaration of 'cdevsw_remove' [-Werror=nested-externs]
ng_device.c: At top level:
ng_device.c:203:1: error: conflicting types for 'ng_device_cons'
 ng_device_cons(node_p node)
 ^~~~~~~~~~~~~~
ng_device.c:54:25: note: previous declaration of 'ng_device_cons' was here
 static ng_constructor_t ng_device_cons;
                         ^~~~~~~~~~~~~~
ng_device.c: In function 'ng_device_newhook':
ng_device.c:286:27: error: implicit declaration of function 'make_dev'; did you mean 'makeudev'? [-Werror=implicit-function-declaration]
  new_connection->ngddev = make_dev(&ngd_cdevsw,
                           ^~~~~~~~
                           makeudev
ng_device.c:286:27: error: nested extern declaration of 'make_dev' [-Werror=nested-externs]
ng_device.c:286:25: error: assignment to 'cdev_t' {aka 'struct cdev *'} from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
  new_connection->ngddev = make_dev(&ngd_cdevsw,
                         ^
ng_device.c: At top level:
ng_device.c:419:1: error: 'ngdopen' redeclared as different kind of symbol
 ngdopen(cdev_t dev, int flag, int mode, struct thread *td)
 ^~~~~~~
ng_device.c:112:17: note: previous declaration of 'ngdopen' was here
 static d_open_t ngdopen;
                 ^~~~~~~
ng_device.c:433:1: error: 'ngdclose' redeclared as different kind of symbol
 ngdclose(cdev_t dev, int flag, int mode, struct thread *td)
 ^~~~~~~~
ng_device.c:111:18: note: previous declaration of 'ngdclose' was here
 static d_close_t ngdclose;
                  ^~~~~~~~
ng_device.c:451:1: error: 'ngdioctl' redeclared as different kind of symbol
 ngdioctl(cdev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
 ^~~~~~~~
ng_device.c:115:18: note: previous declaration of 'ngdioctl' was here
 static d_ioctl_t ngdioctl;
                  ^~~~~~~~
ng_device.c:506:1: error: 'ngdread' redeclared as different kind of symbol
 ngdread(cdev_t dev, struct uio *uio, int flag)
 ^~~~~~~
ng_device.c:113:17: note: previous declaration of 'ngdread' was here
 static d_read_t ngdread;
                 ^~~~~~~
ng_device.c:557:1: error: 'ngdwrite' redeclared as different kind of symbol
 ngdwrite(cdev_t dev, struct uio *uio, int flag)
 ^~~~~~~~
ng_device.c:114:18: note: previous declaration of 'ngdwrite' was here
 static d_write_t ngdwrite;
                  ^~~~~~~~
ng_device.c:607:1: error: 'ngdpoll' redeclared as different kind of symbol
 ngdpoll(cdev_t dev, int events, struct thread *td)
 ^~~~~~~
ng_device.c:116:17: note: previous declaration of 'ngdpoll' was here
 static d_poll_t ngdpoll;
                 ^~~~~~~
ng_device.c:119:22: error: storage size of 'ngd_cdevsw' isn't known
 static struct cdevsw ngd_cdevsw = {
                      ^~~~~~~~~~
ng_device.c:54:25: error: 'ng_device_cons' used but never defined [-Werror]
 static ng_constructor_t ng_device_cons;
                         ^~~~~~~~~~~~~~
ng_device.c:607:1: error: 'ngdpoll' defined but not used [-Werror=unused-function]
 ngdpoll(cdev_t dev, int events, struct thread *td)
 ^~~~~~~
ng_device.c:557:1: error: 'ngdwrite' defined but not used [-Werror=unused-function]
 ngdwrite(cdev_t dev, struct uio *uio, int flag)
 ^~~~~~~~
ng_device.c:506:1: error: 'ngdread' defined but not used [-Werror=unused-function]
 ngdread(cdev_t dev, struct uio *uio, int flag)
 ^~~~~~~
ng_device.c:451:1: error: 'ngdioctl' defined but not used [-Werror=unused-function]
 ngdioctl(cdev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
 ^~~~~~~~
ng_device.c:433:1: error: 'ngdclose' defined but not used [-Werror=unused-function]
 ngdclose(cdev_t dev, int flag, int mode, struct thread *td)
 ^~~~~~~~
ng_device.c:419:1: error: 'ngdopen' defined but not used [-Werror=unused-function]
 ngdopen(cdev_t dev, int flag, int mode, struct thread *td)
 ^~~~~~~
ng_device.c:203:1: error: 'ng_device_cons' defined but not used [-Werror=unused-function]
 ng_device_cons(node_p node)
 ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
MAKE_RC=1