FTBFS: too many arguments to function ‘zpool_search_import’

Bug #2028925 reported by Shengjing Zhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grubzfs-testsuite (Ubuntu)
New
Undecided
Unassigned

Bug Description

Building this package on mantic, I get:

   debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
go test -c -o grubzfs-tests
# github.com/bicomsystems/go-libzfs
In file included from /usr/include/libzfs/libzfs.h:37,
                 from zfs.c:5:
zfs.c: In function ‘read_user_property’:
zfs.c:208:38: warning: passing argument 3 of ‘nvlist_lookup_string’ from incompatible pointer type [-Wincompatible-pointer-types]
  208 | ZPROP_VALUE, &strval) == 0);
      | ^~~~~~~
      | |
      | char **
/usr/include/libspl/assert.h:71:20: note: in definition of macro ‘verify’
   71 | (void) ((!(cond)) && \
      | ^~~~
In file included from /usr/include/libzfs/libnvpair.h:29,
                 from /usr/include/libzfs/libzfs.h:39:
/usr/include/libzfs/sys/nvpair.h:236:5: note: expected ‘const char **’ but argument is of type ‘char **’
  236 | const char **);
      | ^~~~~~~~~~~~~
zfs.c:210:39: warning: passing argument 3 of ‘nvlist_lookup_string’ from incompatible pointer type [-Wincompatible-pointer-types]
  210 | ZPROP_SOURCE, &sourceval) == 0);
      | ^~~~~~~~~~
      | |
      | char **
/usr/include/libspl/assert.h:71:20: note: in definition of macro ‘verify’
   71 | (void) ((!(cond)) && \
      | ^~~~
/usr/include/libzfs/sys/nvpair.h:236:5: note: expected ‘const char **’ but argument is of type ‘char **’
  236 | const char **);
      | ^~~~~~~~~~~~~
# github.com/bicomsystems/go-libzfs
zpool.c: In function ‘get_vdev_type’:
zpool.c:374:61: warning: passing argument 3 of ‘nvlist_lookup_string’ from incompatible pointer type [-Wincompatible-pointer-types]
  374 | int r = nvlist_lookup_string(nv, ZPOOL_CONFIG_TYPE, &value);
      | ^~~~~~
      | |
      | char **
In file included from /usr/include/libzfs/libnvpair.h:29,
                 from /usr/include/libzfs/libzfs.h:39,
                 from zpool.c:5:
/usr/include/libzfs/sys/nvpair.h:236:5: note: expected ‘const char **’ but argument is of type ‘char **’
  236 | const char **);
      | ^~~~~~~~~~~~~
zpool.c: In function ‘get_vdev_path’:
zpool.c:448:72: warning: passing argument 3 of ‘nvlist_lookup_string’ from incompatible pointer type [-Wincompatible-pointer-types]
  448 | if ( 0 != nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) ) {
      | ^~~~~
      | |
      | char **
/usr/include/libzfs/sys/nvpair.h:236:5: note: expected ‘const char **’ but argument is of type ‘char **’
  236 | const char **);
      | ^~~~~~~~~~~~~
zpool.c: In function ‘get_zpool_name’:
zpool.c:477:67: warning: passing argument 3 of ‘nvlist_lookup_string’ from incompatible pointer type [-Wincompatible-pointer-types]
  477 | if (0 != nvlist_lookup_string(nv, ZPOOL_CONFIG_POOL_NAME, &name)) {
      | ^~~~~
      | |
      | char **
/usr/include/libzfs/sys/nvpair.h:236:5: note: expected ‘const char **’ but argument is of type ‘char **’
  236 | const char **);
      | ^~~~~~~~~~~~~
zpool.c: In function ‘get_zpool_comment’:
zpool.c:485:65: warning: passing argument 3 of ‘nvlist_lookup_string’ from incompatible pointer type [-Wincompatible-pointer-types]
  485 | if (0 != nvlist_lookup_string(nv, ZPOOL_CONFIG_COMMENT, &comment)) {
      | ^~~~~~~~
      | |
      | char **
/usr/include/libzfs/sys/nvpair.h:236:5: note: expected ‘const char **’ but argument is of type ‘char **’
  236 | const char **);
      | ^~~~~~~~~~~~~
zpool.c: In function ‘go_zpool_search_import’:
zpool.c:513:37: warning: passing argument 1 of ‘zpool_search_import’ from incompatible pointer type [-Wincompatible-pointer-types]
  513 | pools = zpool_search_import(zfsh, &idata, &libzfs_config_ops);
      | ^~~~
      | |
      | libzfs_handle_ptr {aka struct libzfs_handle *}
In file included from zpool.c:7:
/usr/include/libzfs/libzutil.h:93:43: note: expected ‘libpc_handle_t *’ {aka ‘struct libpc_handle *’} but argument is of type ‘libzfs_handle_ptr’ {aka ‘struct libzfs_handle *’}
   93 | _LIBZUTIL_H nvlist_t *zpool_search_import(libpc_handle_t *, importargs_t *);
      | ^~~~~~~~~~~~~~~~
zpool.c:513:17: error: too many arguments to function ‘zpool_search_import’
  513 | pools = zpool_search_import(zfsh, &idata, &libzfs_config_ops);
      | ^~~~~~~~~~~~~~~~~~~
/usr/include/libzfs/libzutil.h:93:23: note: declared here
   93 | _LIBZUTIL_H nvlist_t *zpool_search_import(libpc_handle_t *, importargs_t *);
      | ^~~~~~~~~~~~~~~~~~~
make[1]: *** [debian/rules:17: override_dh_auto_build] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:8: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Tags: ftbfs
Shengjing Zhu (zhsj)
tags: added: ftbfs
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.