warning: comm/mailnews/imap/src/nsImapProtocol.cpp:1829:16 [-Wformat=] format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘nsresult’
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(thunderbird_esr78 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr78 | --- | wontfix |
People
(Reporter: aceman, Assigned: aceman)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
3.13 KB,
patch
|
mkmelin
:
review+
ishikawa
:
feedback+
|
Details | Diff | Splinter Review |
I get a few warnings in IMAP code compiling with GCC9.3:
28:29.57 warning: comm/mailnews/imap/src/nsImapProtocol.cpp:1829:16 [-Wformat=] format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘nsresult’
28:29.57 warning: comm/mailnews/imap/src/nsImapProtocol.cpp:4740:14 [-Wformat=] format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘nsresult’
28:29.57 warning: comm/mailnews/imap/src/nsImapProtocol.cpp:4814:35 [-Wformat=] format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘nsresult’
They do not prevent build yet (seems warnings-as-errors is currently disabled), but we should fix this preventively.
Comment 1•5 years ago
|
||
I see this also locally.
This is how we print a nsresult, using PRIx32 and static_cast<uint32_t>, as can be seen elsewhere in the file.
Comment 3•5 years ago
|
||
Comment 4•5 years ago
|
||
(In reply to :aceman from comment #2)
Created attachment 9166079 [details] [diff] [review]
1655132.patchThis is how we print a nsresult, using PRIx32 and static_cast<uint32_t>, as can be seen elsewhere in the file.
This is how I would have fixed the formatting issue. (I have fixed the printing of nsresult values using this idiom in my local patches.)
Comment 5•5 years ago
|
||
Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/ccbde15888d0
printf nsresult using PRIx32 and static_cast in a few places in nsImapProtocol.cpp. r=mkmelin
Updated•5 years ago
|
Updated•4 years ago
|
Description
•