Opened 10 years ago
Closed 10 years ago
#11564 closed bug (fixed)
Removed implicit conversion to int32 (CID 1251478)
Reported by: | tgkokk | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Command Line Tools | Version: | R1/Development |
Keywords: | gci2014 | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
In /src/bin/screeninfo.cpp, screen.ID()
is returning a struct with an int32
field id
but the printf
argument is the whole struct. I guess that printf
is smart and retrieves the struct's only field.
Attachments (1)
Change History (5)
comment:1 by , 10 years ago
patch: | 0 → 1 |
---|
comment:2 by , 10 years ago
by , 10 years ago
Attachment: | 0002-Removed-implicit-conversion-to-int32-CID-1251478.patch added |
---|
Note:
See TracTickets
for help on using tickets.
Hi, The fix is incomplete. Since id is an int32, you should use B_PRId32 instead of d for the format, like this:
This way the code will compile without warnings on 32bit and 64bit systems, with the macro expanding to "ld" and "d", respectively.