Closed Bug 1243117 Opened 9 years ago Closed 9 years ago

compiler warning: unsiged comparison with 0 is always false. ldap/c-sdk/libraries/libldap/sort.c

Categories

(MailNews Core :: LDAP Integration, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 47.0

People

(Reporter: ishikawa, Assigned: ishikawa)

Details

Attachments

(1 file, 1 obsolete file)

I failed to copy the original compiler message but there are a couple of places where unsigned |count| is compared as in if (count < 0) and the compiler correctly warned this condition never succeeds. Attached is the patch. I created a temporary signed value to receive the possible negative value and after the use in the if-expression sets it to |count|. TIA
Assignee: nobody → ishikawa
Attachment #8712343 - Flags: review?(mkmelin+mozilla)
Attachment #8712343 - Flags: review?(mkmelin+mozilla) → review?(Pidgeot18)
Comment on attachment 8712343 [details] [diff] [review] signed-vs-unsigned-issue-in-ldap.patch Review of attachment 8712343 [details] [diff] [review]: ----------------------------------------------------------------- Stealing this slow review. LGTM.
Attachment #8712343 - Flags: review?(Pidgeot18) → review+
Thank you for the review. I updated the patch comment and added r=rkent at the end. I will add checkin-needed keyword.
Attachment #8712343 - Attachment is obsolete: true
Attachment #8720858 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/8f470598a61d72601a618c63129079a700d9e21f Bug 1243117 - compiler warning: unsiged comparison with 0 is alwayse false. ldap/c-sdk/libraries/libldap/sort.c r=rkent
Status: NEW → RESOLVED
Closed: 9 years ago
Component: OS Integration → LDAP Integration
Keywords: checkin-needed
Product: Thunderbird → MailNews Core
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 47.0
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: