Closed Bug 1755850 Opened 4 years ago Closed 4 years ago

GCC build issue: mailnews/base/src/nsMsgFolderCache.cpp |nsresult| needs casting to be used against "%x" format string.

Categories

(Thunderbird :: General, defect)

defect

Tracking

(thunderbird_esr91 wontfix)

RESOLVED FIXED
99 Branch
Tracking Status
thunderbird_esr91 --- wontfix

People

(Reporter: ishikawa, Assigned: ishikawa)

Details

Attachments

(1 file)

I am locally compiling C-C TB using GCC with -Werror flag (ignoring some warnings).
This is to check various language issues early on.

There are "%x" format specifier used for printing |nsresult| within |MOZ_LOG()|.

They need to be cast to an integer value or otherwise GCC complains that value of type |nsresult| cannot be used for "%x".
Thus with -Wall, build fails.

The attached patch fixes the issue.
It has been used locally and tryserver push for a while.
For example, see https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=7fb3853717d7aa5ba14eb41d5452f6c4e8486def

Attachment #9264319 - Flags: review?(mkmelin+mozilla)
Assignee: nobody → ishikawa
Status: NEW → ASSIGNED

Comment on attachment 9264319 [details]
casting |rv| of type |nsresult| to |uint32_t|

Thanks, r=mkmelin

Attachment #9264319 - Flags: review?(mkmelin+mozilla) → review+
Target Milestone: --- → 99 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/b966f4ff2bc5
casting nsresult to <static_cast>(uint32_t) to be used for %x format specifier. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Pushed by thunderbird@calypsoblue.org: https://hg.mozilla.org/comm-central/rev/c2a8f73f0467 Follow-up: Run clang-format. rs=clang-format CLOSED TREE DONTBUILD
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: