Skip to content

Instantly share code, notes, and snippets.

@aprieger-llnw
Created June 16, 2017 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aprieger-llnw/cf6d6401aa8e52d3e6fabc094b997bcb to your computer and use it in GitHub Desktop.
Save aprieger-llnw/cf6d6401aa8e52d3e6fabc094b997bcb to your computer and use it in GitHub Desktop.
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:2847:21: warning: field width should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]
(void) printf("%*s", width, header);
~~^ ~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:2849:22: warning: field width should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]
(void) printf("%-*s", width, header);
~~~^ ~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:2917:21: warning: field width should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]
(void) printf("%*s", width, propstr);
~~^ ~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:2919:22: warning: field width should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]
(void) printf("%-*s", width, propstr);
~~~^ ~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:2945:8: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
value);
^~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:2949:56: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
(void) snprintf(propval, sizeof (propval), "%llu%%", value);
~~~~ ^~~~~
%lu
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:2961:22: warning: field width should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]
(void) printf(" %*s", width, propval);
~~^ ~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:4605:28: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
zpool_get_name(zhp), oldversion);
^~~~~~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:4609:28: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
zpool_get_name(zhp), oldversion, version);
^~~~~~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:4609:40: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
zpool_get_name(zhp), oldversion, version);
^~~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:4879:28: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
zpool_get_name(zhp), cur_version);
^~~~~~~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:4886:7: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
cbp->cb_version);
^~~~~~~~~~~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:5083:9: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
cb.cb_version);
^~~~~~~~~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:5194:8: warning: format specifies type 'long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
fnvlist_lookup_uint64(rec, ZPOOL_HIST_TXG),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:5200:8: warning: format specifies type 'long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
fnvlist_lookup_uint64(rec, ZPOOL_HIST_TXG),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:5206:9: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
fnvlist_lookup_uint64(rec,
^~~~~~~~~~~~~~~~~~~~~~~~~~
16 warnings generated.
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c:753:10: warning: taking the absolute value of unsigned type 'unsigned long' has no effect [-Wabsolute-value]
(labs(size - vdev_size) >
^
/usr/home/aprieger/repos/freebsd_master/freebsd/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c:753:10: note: remove the call to 'labs' since unsigned values cannot be negative
(labs(size - vdev_size) >
^~~~
1 warning generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment