mirror of
https://github.com/SCST-project/scst.git
synced 2026-10-22 14:12:33 +00:00
Cppcheck reports at the affected calls:
invalidPrintfArgType_sint: %d requires 'int' but the argument type
is 'unsigned int'.
invalidPrintfArgType_sint: %zd requires 'ssize_t' but the argument
type is 'size_t {aka unsigned long}'.
invalidPrintfArgType_uint: %llx requires 'unsigned long long' but
the argument type is 'unsigned long'.
invalidPrintfArgType_uint: %u requires 'unsigned int' but the
argument type is 'signed int'.
invalidScanfArgType_int: %lld requires 'long long *' but the
argument type is 'unsigned long long *'.
Use unsigned formats for command states, event IDs, handles and sizes.
Cast the u64 disk ID for %llx on both 32-bit and 64-bit builds. Preserve
unsigned export-link naming through an explicit counter conversion. Use
%llu for the unsigned virtual-disk size destination; retain the byte/MiB
shifts and overflow check.
At five DLM lock-name calls, explicitly convert node IDs to int for the
existing %d formats. Switching them to %u would change high-bit node
IDs' lock identities and break matching with older peers. Preserve that
signed spelling and leave membership and node-ID storage unchanged.