Project

General

Profile

Bug #11740

loader: warning: unused parameter

Added by Toomas Soome about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

With -Wunused-parameter we will get long list of warnings, lets clean them up (almost only add __unused):

    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/gzip.c:58:79: warning: unused parameter 'n' [-Wunused-parameter]
     gzip_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
                                                                                   ^
    /code/illumos-gate/usr/src/boot/lib/libstand/printf.c:64:31: error: unused parameter 'arg' [-Werror=unused-parameter]
     putchar_wrapper(int cc, void *arg)
                                   ^~~

    /code/illumos-gate/usr/src/boot/lib/libstand/bootp.c:282:11: error: unused parameter 'extra' [-Werror=unused-parameter]
         void *extra)
               ^~~~~

    /code/illumos-gate/usr/src/boot/lib/libstand/zalloc_malloc.c: In function 'Malloc':
    /code/illumos-gate/usr/src/boot/lib/libstand/zalloc_malloc.c:53:34: error: unused parameter 'file' [-Werror=unused-parameter]
     Malloc(size_t bytes, const char *file, int line)
                                      ^~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/zalloc_malloc.c:53:44: error: unused parameter 'line' [-Werror=unused-parameter]
     Malloc(size_t bytes, const char *file, int line)
                                                ^~~~

    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:71:23: error: unused parameter 'path' [-Werror=unused-parameter]
     null_open(const char *path, struct open_file *f)
                           ^~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:71:47: error: unused parameter 'f' [-Werror=unused-parameter]
     null_open(const char *path, struct open_file *f)
                                                   ^
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c: In function 'null_close':
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:77:30: error: unused parameter 'f' [-Werror=unused-parameter]
     null_close(struct open_file *f)
                                  ^
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c: In function 'null_read':
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:83:29: error: unused parameter 'f' [-Werror=unused-parameter]
     null_read(struct open_file *f, void *buf, size_t size, size_t *resid)
                                 ^
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:83:38: error: unused parameter 'buf' [-Werror=unused-parameter]
     null_read(struct open_file *f, void *buf, size_t size, size_t *resid)
                                          ^~~
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:83:50: error: unused parameter 'size' [-Werror=unused-parameter]
     null_read(struct open_file *f, void *buf, size_t size, size_t *resid)
tsoome@beastie:/code/illumos-gate$ git log warning 
commit a61615a50b1dccc16b7deb6a5988fcf475785845 (warning)
Author: Toomas Soome <tsoome@me.com>
Date:   Fri Sep 20 10:41:05 2019 +0300

    loader: warning: unused parameter

    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/gzip.c:58:79: warning: unused parameter 'n' [-Wunused-parameter]
     gzip_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
                                                                                   ^
    /code/illumos-gate/usr/src/boot/lib/libstand/printf.c:64:31: error: unused parameter 'arg' [-Werror=unused-parameter]
     putchar_wrapper(int cc, void *arg)
                                   ^~~

    /code/illumos-gate/usr/src/boot/lib/libstand/bootp.c:282:11: error: unused parameter 'extra' [-Werror=unused-parameter]
         void *extra)
               ^~~~~

    /code/illumos-gate/usr/src/boot/lib/libstand/zalloc_malloc.c: In function 'Malloc':
    /code/illumos-gate/usr/src/boot/lib/libstand/zalloc_malloc.c:53:34: error: unused parameter 'file' [-Werror=unused-parameter]
     Malloc(size_t bytes, const char *file, int line)
                                      ^~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/zalloc_malloc.c:53:44: error: unused parameter 'line' [-Werror=unused-parameter]
     Malloc(size_t bytes, const char *file, int line)
                                                ^~~~

    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:71:23: error: unused parameter 'path' [-Werror=unused-parameter]
     null_open(const char *path, struct open_file *f)
                           ^~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:71:47: error: unused parameter 'f' [-Werror=unused-parameter]
     null_open(const char *path, struct open_file *f)
                                                   ^
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c: In function 'null_close':
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:77:30: error: unused parameter 'f' [-Werror=unused-parameter]
     null_close(struct open_file *f)
                                  ^
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c: In function 'null_read':
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:83:29: error: unused parameter 'f' [-Werror=unused-parameter]
     null_read(struct open_file *f, void *buf, size_t size, size_t *resid)
                                 ^
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:83:38: error: unused parameter 'buf' [-Werror=unused-parameter]
     null_read(struct open_file *f, void *buf, size_t size, size_t *resid)
                                          ^~~
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:83:50: error: unused parameter 'size' [-Werror=unused-parameter]
     null_read(struct open_file *f, void *buf, size_t size, size_t *resid)
                                                      ^~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:83:64: error: unused parameter 'resid' [-Werror=unused-parameter]
     null_read(struct open_file *f, void *buf, size_t size, size_t *resid)
                                                                    ^~~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c: In function 'null_write':
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:89:30: error: unused parameter 'f' [-Werror=unused-parameter]
     null_write(struct open_file *f, const void *buf, size_t size, size_t *resid)
                                  ^
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:89:45: error: unused parameter 'buf' [-Werror=unused-parameter]
     null_write(struct open_file *f, const void *buf, size_t size, size_t *resid)
                                                 ^~~
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:89:57: error: unused parameter 'size' [-Werror=unused-parameter]
     null_write(struct open_file *f, const void *buf, size_t size, size_t *resid)
                                                             ^~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:89:71: error: unused parameter 'resid' [-Werror=unused-parameter]
     null_write(struct open_file *f, const void *buf, size_t size, size_t *resid)
                                                                           ^~~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c: In function 'null_seek':
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:95:29: error: unused parameter 'f' [-Werror=unused-parameter]
     null_seek(struct open_file *f, off_t offset, int where)
                                 ^
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:95:38: error: unused parameter 'offset' [-Werror=unused-parameter]
     null_seek(struct open_file *f, off_t offset, int where)
                                          ^~~~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:95:50: error: unused parameter 'where' [-Werror=unused-parameter]
     null_seek(struct open_file *f, off_t offset, int where)
                                                      ^~~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c: In function 'null_stat':
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:102:29: error: unused parameter 'f' [-Werror=unused-parameter]
     null_stat(struct open_file *f, struct stat *sb)
                                 ^
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:102:45: error: unused parameter 'sb' [-Werror=unused-parameter]
     null_stat(struct open_file *f, struct stat *sb)
                                                 ^~
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c: In function 'null_readdir':
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:108:32: error: unused parameter 'f' [-Werror=unused-parameter]
     null_readdir(struct open_file *f, struct dirent *d)
                                    ^
    /code/illumos-gate/usr/src/boot/lib/libstand/nullfs.c:108:50: error: unused parameter 'd' [-Werror=unused-parameter]
     null_readdir(struct open_file *f, struct dirent *d)
                                                      ^

    /code/illumos-gate/usr/src/boot/lib/libstand/arp.c:159:75: error: unused parameter 'extra' [-Werror=unused-parameter]
     arprecv(struct iodesc *d, void **pkt, void **payload, time_t tleft, void *extra)
                                                                               ^~~~~

    /code/illumos-gate/usr/src/boot/lib/libstand/rpc.c:219:75: error: unused parameter 'extra' [-Werror=unused-parameter]
     recvrpc(struct iodesc *d, void **pkt, void **payload, time_t tleft, void *extra)
                                                                               ^~~~~

    /code/illumos-gate/usr/src/boot/lib/libstand/rarp.c:146:11: error: unused parameter 'extra' [-Werror=unused-parameter]
         void *extra)
               ^~~~~

    In file included from /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfsimpl.c:40:0,
                     from /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:48:
    ../../../cddl/boot/zfs/zfssubr.c: In function 'zio_checksum_off':
    ../../../cddl/boot/zfs/zfssubr.c:63:30: error: unused parameter 'buf' [-Werror=unused-parameter]
     zio_checksum_off(const void *buf, uint64_t size,
                                  ^~~
    ../../../cddl/boot/zfs/zfssubr.c:63:44: error: unused parameter 'size' [-Werror=unused-parameter]
     zio_checksum_off(const void *buf, uint64_t size,
                                                ^~~~
    ../../../cddl/boot/zfs/zfssubr.c:64:17: error: unused parameter 'ctx_template' [-Werror=unused-parameter]
         const void *ctx_template, zio_cksum_t *zcp)
                     ^~~~~~~~~~~~
    In file included from ../../../cddl/boot/zfs/zfssubr.c:104:0,
                     from /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfsimpl.c:40,
                     from /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:48:
    ../../../cddl/boot/zfs/fletcher.c: In function 'fletcher_2_native':
    ../../../cddl/boot/zfs/fletcher.c:28:17: error: unused parameter 'ctx_template' [-Werror=unused-parameter]
         const void *ctx_template, zio_cksum_t *zcp)
                     ^~~~~~~~~~~~
    ../../../cddl/boot/zfs/fletcher.c: In function 'fletcher_2_byteswap':
    ../../../cddl/boot/zfs/fletcher.c:46:17: error: unused parameter 'ctx_template' [-Werror=unused-parameter]
         const void *ctx_template, zio_cksum_t *zcp)
                     ^~~~~~~~~~~~
    ../../../cddl/boot/zfs/fletcher.c: In function 'fletcher_4_native':
    ../../../cddl/boot/zfs/fletcher.c:64:17: error: unused parameter 'ctx_template' [-Werror=unused-parameter]
         const void *ctx_template, zio_cksum_t *zcp)
                     ^~~~~~~~~~~~
    ../../../cddl/boot/zfs/fletcher.c: In function 'fletcher_4_byteswap':
    ../../../cddl/boot/zfs/fletcher.c:82:17: error: unused parameter 'ctx_template' [-Werror=unused-parameter]
         const void *ctx_template, zio_cksum_t *zcp)
                     ^~~~~~~~~~~~
    In file included from ../../../cddl/boot/zfs/zfssubr.c:105:0,
                     from /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfsimpl.c:40,
                     from /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:48:
    ../../../cddl/boot/zfs/sha256.c: In function 'zio_checksum_SHA256':
    ../../../cddl/boot/zfs/sha256.c:290:17: error: unused parameter 'ctx_template' [-Werror=unused-parameter]
         const void *ctx_template, zio_cksum_t *zcp)
                     ^~~~~~~~~~~~
    ../../../cddl/boot/zfs/sha256.c: In function 'zio_checksum_SHA512_native':
    ../../../cddl/boot/zfs/sha256.c:302:17: error: unused parameter 'ctx_template' [-Werror=unused-parameter]
         const void *ctx_template, zio_cksum_t *zcp)
                     ^~~~~~~~~~~~
    In file included from ../../../cddl/boot/zfs/zfssubr.c:164:0,
                     from /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfsimpl.c:40,
                     from /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:48:
    ../../../cddl/boot/zfs/lzjb.c: In function 'lzjb_decompress':
    ../../../cddl/boot/zfs/lzjb.c:48:54: error: unused parameter 's_len' [-Werror=unused-parameter]
     lzjb_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
                                                          ^~~~~
    ../../../cddl/boot/zfs/lzjb.c:48:79: error: unused parameter 'n' [-Werror=unused-parameter]
     lzjb_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
                                                                                   ^
    In file included from /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfsimpl.c:40:0,
                     from /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:48:
    ../../../cddl/boot/zfs/zfssubr.c: In function 'vdev_raidz_matrix_init':
    ../../../cddl/boot/zfs/zfssubr.c:844:37: error: unused parameter 'rm' [-Werror=unused-parameter]
     vdev_raidz_matrix_init(raidz_map_t *rm, int n, int nmap, int *map,
                                         ^~
    ../../../cddl/boot/zfs/zfssubr.c: In function 'raidz_checksum_verify':
    ../../../cddl/boot/zfs/zfssubr.c:1339:14: error: unused parameter 'size' [-Werror=unused-parameter]
         uint64_t size)
                  ^~~~
    ../../../cddl/boot/zfs/zfssubr.c: In function 'vdev_raidz_combrec':
    ../../../cddl/boot/zfs/zfssubr.c:1392:23: error: unused parameter 'offset' [-Werror=unused-parameter]
         void *data, off_t offset, uint64_t bytes, int total_errors, int data_errors)
                           ^~~~~~
    In file included from /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:48:0:
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfsimpl.c: In function 'mzap_rlookup':
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfsimpl.c:2386:27: error: unused parameter 'spa' [-Werror=unused-parameter]
     mzap_rlookup(const spa_t *spa, const dnode_phys_t *dnode, char *name, uint64_t value)
                               ^~~
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c: In function 'vdev_read':
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:361:19: error: unused parameter 'vdev' [-Werror=unused-parameter]
     vdev_read(vdev_t *vdev, void *priv, off_t offset, void *buf, size_t bytes)
                       ^~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c: In function 'zfs_dev_strategy':
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:651:24: error: unused parameter 'devdata' [-Werror=unused-parameter]
     zfs_dev_strategy(void *devdata, int rw, daddr_t dblk, size_t size,
                            ^~~~~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:651:37: error: unused parameter 'rw' [-Werror=unused-parameter]
     zfs_dev_strategy(void *devdata, int rw, daddr_t dblk, size_t size,
                                         ^~
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:651:49: error: unused parameter 'dblk' [-Werror=unused-parameter]
     zfs_dev_strategy(void *devdata, int rw, daddr_t dblk, size_t size,
                                                     ^~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:651:62: error: unused parameter 'size' [-Werror=unused-parameter]
     zfs_dev_strategy(void *devdata, int rw, daddr_t dblk, size_t size,
                                                                  ^~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:652:11: error: unused parameter 'buf' [-Werror=unused-parameter]
         char *buf, size_t *rsize)
               ^~~
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/zfs.c:652:24: error: unused parameter 'rsize' [-Werror=unused-parameter]
         char *buf, size_t *rsize)
                            ^~~~~

    biossmap.c: In function 'command_smap':
    biossmap.c:139:18: error: unused parameter 'argc' [-Werror=unused-parameter]
     command_smap(int argc, char *argv[])
                      ^~~~
    biossmap.c:139:30: error: unused parameter 'argv' [-Werror=unused-parameter]
     command_smap(int argc, char *argv[])
                                  ^~~~

    elf64_freebsd.c: In function 'elf64_obj_exec':
    elf64_freebsd.c:123:39: error: unused parameter 'fp' [-Werror=unused-parameter]
     elf64_obj_exec(struct preloaded_file *fp)
                                           ^~

    multiboot.c: In function 'multiboot_obj_exec':
    multiboot.c:530:43: error: unused parameter 'fp' [-Werror=unused-parameter]
     multiboot_obj_exec(struct preloaded_file *fp)
                                               ^~

    smbios.c: In function 'smbios_setuuid':
    smbios.c:216:64: error: unused parameter 'ver' [-Werror=unused-parameter]
     smbios_setuuid(const char *name, const caddr_t addr, const int ver)
                                                                    ^~~

    linux.c: In function 'linux_loadkernel':
    linux.c:91:43: error: unused parameter 'dest' [-Werror=unused-parameter]
     linux_loadkernel(char *filename, uint64_t dest, struct preloaded_file **result)
                                               ^~~~
    linux.c: In function 'linux_loadinitrd':
    linux.c:411:43: error: unused parameter 'dest' [-Werror=unused-parameter]
     linux_loadinitrd(char *filename, uint64_t dest, struct preloaded_file **result)
                                               ^~~~
    linux.c: In function 'linux_execinitrd':
    linux.c:432:52: error: unused parameter 'pf' [-Werror=unused-parameter]
     static int linux_execinitrd(struct preloaded_file *pf)
                                                        ^~

    pxe.c: In function 'pxe_perror':
    pxe.c:305:16: error: unused parameter 'err' [-Werror=unused-parameter]
     pxe_perror(int err)
                    ^~~
    pxe.c: In function 'pxe_netif_match':
    pxe.c:355:31: error: unused parameter 'nif' [-Werror=unused-parameter]
     pxe_netif_match(struct netif *nif, void *machdep_hint)
                                   ^~~
    pxe.c:355:42: error: unused parameter 'machdep_hint' [-Werror=unused-parameter]
     pxe_netif_match(struct netif *nif, void *machdep_hint)
                                              ^~~~~~~~~~~~
    pxe.c: In function 'pxe_netif_probe':
    pxe.c:362:31: error: unused parameter 'nif' [-Werror=unused-parameter]
     pxe_netif_probe(struct netif *nif, void *machdep_hint)
                                   ^~~
    pxe.c:362:42: error: unused parameter 'machdep_hint' [-Werror=unused-parameter]
     pxe_netif_probe(struct netif *nif, void *machdep_hint)
                                              ^~~~~~~~~~~~
    pxe.c: In function 'pxe_netif_end':
    pxe.c:371:29: error: unused parameter 'nif' [-Werror=unused-parameter]
     pxe_netif_end(struct netif *nif)
                                 ^~~
    pxe.c: In function 'pxe_netif_init':
    pxe.c:386:43: error: unused parameter 'machdep_hint' [-Werror=unused-parameter]
     pxe_netif_init(struct iodesc *desc, void *machdep_hint)
                                               ^~~~~~~~~~~~
    pxe.c: In function 'pxe_netif_get':
    pxe.c:518:30: error: unused parameter 'desc' [-Werror=unused-parameter]
     pxe_netif_get(struct iodesc *desc, void **pkt, time_t timeout)
                                  ^~~~
    pxe.c: In function 'pxe_netif_put':
    pxe.c:536:30: error: unused parameter 'desc' [-Werror=unused-parameter]
     pxe_netif_put(struct iodesc *desc, void *pkt, size_t len)
                                  ^~~~

    biosmem.c: In function 'command_biosmem':
    biosmem.c:228:21: error: unused parameter 'argc' [-Werror=unused-parameter]
     command_biosmem(int argc, char *argv[])
                         ^~~~
    biosmem.c:228:33: error: unused parameter 'argv' [-Werror=unused-parameter]
     command_biosmem(int argc, char *argv[])
                                     ^~~~

    elf32_freebsd.c: In function 'elf32_obj_exec':
    elf32_freebsd.c:81:39: error: unused parameter 'fp' [-Werror=unused-parameter]
     elf32_obj_exec(struct preloaded_file *fp)
                                           ^~

    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/devicename_stubs.c: In function 'zfs_parsedev':
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/devicename_stubs.c:35:34: error: unused parameter 'dev' [-Werror=unused-parameter]
     zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, const char **path)
                                      ^~~
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/devicename_stubs.c:35:51: error: unused parameter 'devspec' [-Werror=unused-parameter]
     zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, const char **path)
                                                       ^~~~~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/devicename_stubs.c:35:73: error: unused parameter 'path' [-Werror=unused-parameter]
     zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, const char **path)
                                                                             ^~~~
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/devicename_stubs.c: In function 'zfs_fmtdev':
    /code/illumos-gate/usr/src/boot/lib/libstand/zfs/devicename_stubs.c:42:18: error: unused parameter 'vdev' [-Werror=unused-parameter]
     zfs_fmtdev(void *vdev)
                      ^~~~

    main.c: In function 'command_reboot':
    main.c:298:20: error: unused parameter 'argc' [-Werror=unused-parameter]
     command_reboot(int argc, char *argv[])
                        ^~~~
    main.c:298:32: error: unused parameter 'argv' [-Werror=unused-parameter]
     command_reboot(int argc, char *argv[])
                                    ^~~~
    main.c: In function 'command_heap':
    main.c:321:18: error: unused parameter 'argc' [-Werror=unused-parameter]
     command_heap(int argc, char *argv[])
                      ^~~~
    main.c:321:30: error: unused parameter 'argv' [-Werror=unused-parameter]
     command_heap(int argc, char *argv[])
                                  ^~~~

    ../../common/dev_net.c: In function 'net_strategy':
    ../../common/dev_net.c:230:20: error: unused parameter 'devdata' [-Werror=unused-parameter]
     net_strategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf,
                        ^~~~~~~
    ../../common/dev_net.c:230:33: error: unused parameter 'rw' [-Werror=unused-parameter]
     net_strategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf,
                                     ^~
    ../../common/dev_net.c:230:45: error: unused parameter 'blk' [-Werror=unused-parameter]
     net_strategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf,
                                                 ^~~
    ../../common/dev_net.c:230:57: error: unused parameter 'size' [-Werror=unused-parameter]
     net_strategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf,
                                                             ^~~~
    ../../common/dev_net.c:230:69: error: unused parameter 'buf' [-Werror=unused-parameter]
     net_strategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf,
                                                                         ^~~
    ../../common/dev_net.c:231:13: error: unused parameter 'rsize' [-Werror=unused-parameter]
         size_t *rsize)
                 ^~~~~

    main.c: In function 'command_heap':
    main.c:321:18: error: unused parameter 'argc' [-Werror=unused-parameter]
     command_heap(int argc, char *argv[])
                      ^~~~
    main.c:321:30: error: unused parameter 'argv' [-Werror=unused-parameter]
     command_heap(int argc, char *argv[])
                                  ^~~~

    ../env.c: In function 'efi_print_shell_str':
    ../env.c:395:35: error: unused parameter 'varnamearg' [-Werror=unused-parameter]
     efi_print_shell_str(const CHAR16 *varnamearg, uint8_t *data, UINTN datasz)
                                       ^~~~~~~~~~
    ../env.c:395:68: error: unused parameter 'datasz' [-Werror=unused-parameter]
     efi_print_shell_str(const CHAR16 *varnamearg, uint8_t *data, UINTN datasz)
                                                                        ^~~~~~
    ../env.c: In function 'efi_print_mem_type':
    ../env.c:448:34: error: unused parameter 'varnamearg' [-Werror=unused-parameter]
     efi_print_mem_type(const CHAR16 *varnamearg, uint8_t *data, UINTN datasz)
                                      ^~~~~~~~~~
    ../env.c: In function 'efi_print_illumos':
    ../env.c:473:66: error: unused parameter 'datasz' [-Werror=unused-parameter]
     efi_print_illumos(const CHAR16 *varnamearg, uint8_t *data, UINTN datasz)
                                                                      ^~~~~~

    ../efinet.c: In function 'efinet_init':
    ../efinet.c:201:40: error: unused parameter 'machdep_hint' [-Werror=unused-parameter]
     efinet_init(struct iodesc *desc, void *machdep_hint)
                                            ^~~~~~~~~~~~

    ../arch/amd64/trap.c: In function 'command_grab_faults':
    ../arch/amd64/trap.c:379:25: error: unused parameter 'argc' [-Werror=unused-parameter]
     command_grab_faults(int argc, char *argv[])
                             ^~~~
    ../arch/amd64/trap.c:379:37: error: unused parameter 'argv' [-Werror=unused-parameter]
     command_grab_faults(int argc, char *argv[])
                                         ^~~~
    ../arch/amd64/trap.c: In function 'command_ungrab_faults':
    ../arch/amd64/trap.c:391:27: error: unused parameter 'argc' [-Werror=unused-parameter]
     command_ungrab_faults(int argc, char *argv[])
                               ^~~~
    ../arch/amd64/trap.c:391:39: error: unused parameter 'argv' [-Werror=unused-parameter]
     command_ungrab_faults(int argc, char *argv[])
                                           ^~~~
    ../arch/amd64/trap.c: In function 'command_fault':
    ../arch/amd64/trap.c:401:19: error: unused parameter 'argc' [-Werror=unused-parameter]
     command_fault(int argc, char *argv[])
                       ^~~~
    ../arch/amd64/trap.c:401:31: error: unused parameter 'argv' [-Werror=unused-parameter]
     command_fault(int argc, char *argv[])
                                   ^~~~

    ../efi_main.c: In function 'exit':
    ../efi_main.c:45:10: error: unused parameter 'status' [-Werror=unused-parameter]
     exit(int status)
              ^~~~~~

    ../memmap.c: In function 'command_smap':
    ../memmap.c:169:18: error: unused parameter 'argc' [-Werror=unused-parameter]
     command_smap(int argc, char *argv[])
                      ^~~~
    ../memmap.c:169:30: error: unused parameter 'argv' [-Werror=unused-parameter]
     command_smap(int argc, char *argv[])
                                  ^~~~
    cc1: all warnings being treated as errors

commit 46fb41a10a67f141288594009a06dc7bdab25e1e
Author: Toomas Soome <tsoome@me.com>
Date:   Fri Sep 20 11:29:16 2019 +0300

    loader -_gcc=-Wunused-parameter -_gcc=-Werror

commit c79df70e7f04e3742087189b820b431059193dfe (HEAD -> master, upstream/master, origin/master, origin/HEAD)
Author: Toomas Soome <tsoome@me.com>
Date:   Tue Aug 20 22:16:38 2019 +0300

    11588 loader: isapnp.c: this statement may fall through
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

commit c8caaf7af609cac86df1d624c8b8fdf0edbb3c7f
Author: Toomas Soome <tsoome@me.com>
Date:   Sat Aug 31 09:30:35 2019 +0300

    11704 loader.efi: filter out very large blocksize in efipart
    11703 loader.efi: add vendor devicepath nodes as disks
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

commit 2d37a1a3f6b9fa33de5a877c84711ec1231fa21b
Author: Toomas Soome <tsoome@me.com>
Date:   Thu Sep 19 16:49:51 2019 +0300

    11713 zdb should not output binary data on terminal
    ../arch/amd64/trap.c:391:39: error: unused parameter 'argv' [-Werror=unused-
parameter]
     command_ungrab_faults(int argc, char *argv[])
                                           ^~~~
    ../arch/amd64/trap.c: In function 'command_fault':
    ../arch/amd64/trap.c:401:19: error: unused parameter 'argc' [-Werror=unused-
parameter]
     command_fault(int argc, char *argv[])
                       ^~~~
    ../arch/amd64/trap.c:401:31: error: unused parameter 'argv' [-Werror=unused-
parameter]
     command_fault(int argc, char *argv[])
                                   ^~~~

    ../efi_main.c: In function 'exit':
    ../efi_main.c:45:10: error: unused parameter 'status' [-Werror=unused-parame
ter]
     exit(int status)
              ^~~~~~

    ../memmap.c: In function 'command_smap':
    ../memmap.c:169:18: error: unused parameter 'argc' [-Werror=unused-parameter
]
     command_smap(int argc, char *argv[])
                      ^~~~
    ../memmap.c:169:30: error: unused parameter 'argv' [-Werror=unused-parameter
]
     command_smap(int argc, char *argv[])
                                  ^~~~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk about 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 8eef2ab6218419d91e0aefc223c9f2cd1c8e9a2c

commit  8eef2ab6218419d91e0aefc223c9f2cd1c8e9a2c
Author: Toomas Soome <tsoome@me.com>
Date:   2019-10-04T06:26:49.000Z

    11740 loader: warning: unused parameter
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF