Page MenuHomeFreeBSD

cddl/sbin/zfs build warning fixes
AbandonedPublic

Authored by aprieger_llnw.com on Jun 8 2017, 6:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 2:06 AM
Unknown Object (File)
Feb 14 2024, 7:57 AM
Unknown Object (File)
Jan 18 2024, 3:49 PM
Unknown Object (File)
Dec 20 2023, 12:45 AM
Unknown Object (File)
Nov 18 2023, 5:02 AM
Unknown Object (File)
Nov 18 2023, 4:37 AM
Unknown Object (File)
Oct 4 2023, 11:25 AM
Unknown Object (File)
Aug 13 2023, 6:08 AM
Subscribers

Details

Summary

cddl/sbin/zfs build warning fixes

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 9746
Build 10185: arc lint + arc unit

Event Timeline

Changelog:
Pre-fix warnings are at: https://gist.github.com/aprieger-llnw/d14e571d85c30c11f80c4a6cb4bb5071

  1. 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

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.

Thank you for the feedback! I will send try to get it reviewed and submitted on their end.

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.

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".

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.

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".

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

Will submit changes directly through the OpenZFS Github