Opened 9 years ago
Closed 8 years ago
#12657 closed bug (fixed)
(easy) 64-bit type printf misalignment
Reported by: | kallisti5 | Owned by: | nobody |
---|---|---|---|
Priority: | low | Milestone: | Unscheduled |
Component: | File Systems/BFS | Version: | R1/Development |
Keywords: | easy | Cc: | |
Blocked By: | Blocking: | ||
Platform: | x86-64 |
Description
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
Attachments (1)
Change History (6)
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 9 years ago
Summary: | [easy] 64-bit type printf misalignment → (easy) 64-bit type printf misalignment |
---|
comment:3 by , 9 years ago
patch: | 0 → 1 |
---|
comment:4 by , 9 years ago
To anybody applying this patch, please check on 32-bit and 64-bit host and target platforms.
comment:5 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in hrev50884 - sorry, spitaels, I could not use your patch; within the fs-shell, command_checkfs.cpp must not use the B_PRI*
macros, but the FSSH_B_PRI*
macros. Thanks for your work, anyway, though!
Note:
See TracTickets
for help on using tickets.