#12657: [easy] 64-bit type printf misalignment
------------------------------+------------------------------
Reporter: kallisti5 | Owner: axeld
Type: bug | Status: new
Priority: low | Milestone: Unscheduled
Component: File Systems/BFS | Version: R1/Development
Keywords: easy | Blocked By:
Blocking: | Has a Patch: 0
Platform: x86-64 |
------------------------------+------------------------------
{{{
C++ /home/kallisti5/Code/haiku-
self/generated.x86_64/objects/linux/x86_64/release/tools/bfs_shell/command_checkfs.o
/home/kallisti5/Code/haiku-self/src/tools/bfs_shell/command_checkfs.cpp:
In function ‘fssh_status_t FSShell::command_checkfs(int, const char*
const*)’:
/home/kallisti5/Code/haiku-
self/src/tools/bfs_shell/command_checkfs.cpp:58:57: warning: format ‘%Ld’
expects argument of type ‘long long int’, but argument 2 has type
‘uint64_t {aka long unsigned int}’ [-Wformat=]
fssh_dprintf("%9Ld nodes processed\x1b[1A\n", counter);
^
/home/kallisti5/Code/haiku-
self/src/tools/bfs_shell/command_checkfs.cpp:62:64: warning: format ‘%lld’
expects argument of type ‘long long int’, but argument 3 has type
‘fssh_ino_t {aka long int}’ [-Wformat=]
fssh_dprintf("%s (inode = %lld)", result.name, result.inode);
^
/home/kallisti5/Code/haiku-
self/src/tools/bfs_shell/command_checkfs.cpp:119:58: warning: format
‘%lld’ expects argument of type ‘long long int’, but argument 3 has type
‘uint64_t {aka long unsigned int}’ [-Wformat=]
result.stats.blocks_in_direct * result.stats.block_size);
^
/home/kallisti5/Code/haiku-
self/src/tools/bfs_shell/command_checkfs.cpp:123:60: warning: format
‘%lld’ expects argument of type ‘long long int’, but argument 4 has type
‘uint64_t {aka long unsigned int}’ [-Wformat=]
result.stats.blocks_in_indirect * result.stats.block_size);
^
/home/kallisti5/Code/haiku-
self/src/tools/bfs_shell/command_checkfs.cpp:127:67: warning: format
‘%lld’ expects argument of type ‘long long int’, but argument 4 has type
‘uint64_t {aka long unsigned int}’ [-Wformat=]
result.stats.blocks_in_double_indirect * result.stats.block_size);
^
}}}
Should be corrected with defines like B_PRI* from
../headers/os/support/SupportDefs.h or FSSH_B_PRI* from
../headers/private/fs_shell/fssh_types.h
--
Ticket URL: <https://dev.haiku-os.org/ticket/12657>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.