fix "warning: comparison between signed and unsigned integer expressions [-Wsign-compare]" in nsMailApp.cpp and nsSuiteApp.cpp

RESOLVED FIXED in Thunderbird 20.0

Status

MailNews Core
Backend
--
trivial
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: aceman, Assigned: aceman)

Tracking

Trunk
Thunderbird 20.0
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

2.21 KB, patch
neil@parkwaycc.co.uk
: review+
standard8
: review+
Details | Diff | Splinter Review
(Assignee)

Description

5 years ago
Fix gcc warning:
mail/app/nsMailApp.cpp:131:78: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
(Assignee)

Comment 1

5 years ago
Created attachment 693612 [details] [diff] [review]
patch

This casts to size_t in the same way Firefox does in nsBrowserApp.cpp.
Attachment #693612 - Flags: review?(neil)
(Assignee)

Updated

5 years ago
Attachment #693612 - Flags: review?(mbanner)
(Assignee)

Updated

5 years ago
Severity: normal → trivial

Comment 2

5 years ago
Comment on attachment 693612 [details] [diff] [review]
patch

I'd be tempted to write the expression in a way that doesn't need a cast e.g.

if (!lastSlash || lastSlash >= exePath + MAXPATHLEN - sizeof(XPCOM_DLL) - 1)
Attachment #693612 - Flags: review?(neil) → review+
Attachment #693612 - Flags: review?(mbanner) → review+
(Assignee)

Comment 3

5 years ago
(In reply to neil@parkwaycc.co.uk from comment #2)
> I'd be tempted to write the expression in a way that doesn't need a cast e.g.
> 
> if (!lastSlash || lastSlash >= exePath + MAXPATHLEN - sizeof(XPCOM_DLL) - 1)

Maybe you can make Firefox also adopt this version?
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/4e4dbac5d4c0
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 20.0
You need to log in before you can comment on or make changes to this bug.