cddl/sbin/zfs build warning fixes
Diff Detail
Diff Detail
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 9746 Build 10185: arc lint + arc unit
Event Timeline
Comment Actions
Changelog:
Pre-fix warnings are at: https://gist.github.com/aprieger-llnw/d14e571d85c30c11f80c4a6cb4bb5071
- cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
- warning: format specifies type 'unsigned long long' but the argument has type 'int64_t' (aka 'long') [-Wformat]
- fix: changed format modifier from "%llu" to "%"PRId64 on line 1332
- warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
- fix: changed format modifier from "%llu" to "%"PRIu64 one lines 2075, 2184, 2188, 2551, 2622, 2630 and 5624
- warning: field width should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]
- fix: added explicit modifier (int) to parameter on lines 2653, 2655, 2679, 2682, 2977, 2979, 3055, 3057 and 5632
- warning: data argument not used by format string [-Wformat-extra-args]
- fix: removed the data argument that was not used
- warning: format string is not a string literal (potentially insecure) [-Wformat-security]
- fix: added the modifier "%s" to print the string on lines 5206, 5261 and 5322
- warning: field width should have type 'int', but argument has type 'unsigned long' [-Wformat]
- fix: added explicit modifier (int) to parameters on line 5601
- warning: format specifies type 'int' but the argument has type 'char *' [-Wformat]
- fix: changed print format modifier from "%c" to "%s" on line 6102
- warning: format specifies type 'unsigned long long' but the argument has type 'int64_t' (aka 'long') [-Wformat]
Comment Actions
I think this should go upstream (https://github.com/openzfs/openzfs) but they are happy to have it come from FreeBSD or just be directly to their github.
cddl/contrib/opensolaris/cmd/zfs/zfs_main.c | ||
---|---|---|
6103 | good catch here, this is a legit bug you found here. |
Comment Actions
Thank you for the feedback! I will send try to get it reviewed and submitted on their end.
Comment Actions
Huh ... openzfs has their github issue tracker turned off. There doesn't seem to be a bug tracker or direct way of saying "take this code".
Comment Actions
Ahh, they will take pull requests, but if we just want to commit it on the FreeBSD side, I suppose that is fine, but we do want to send it back upstream to avoid diverging too much.
cddl/contrib/opensolaris/cmd/zfs/zfs_main.c | ||
---|---|---|
5632 | This line should be wrapped |