Open
Bug 989737
Opened 10 years ago
Updated 2 years ago
Fixed warnings in accessible/src/generic/
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: iulian.matesica, Unassigned)
Details
Attachments
(1 file)
7.99 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release) Build ID: 20140317233501 Steps to reproduce: It is my first patch, I hope it fixed the warnings.
Reporter | ||
Comment 1•10 years ago
|
||
Attachment #8399079 -
Flags: review?(trev.saunders)
Comment 2•10 years ago
|
||
Comment on attachment 8399079 [details] [diff] [review] Warnings.patch For the first bunch here I'd sort of rather leave the warning if we're not going to fix the issue somehow >@@ -1030,17 +1030,17 @@ HyperTextAccessible::TextBounds(int32_t > int32_t childIdx = GetChildIndexAtOffset(startOffset); > if (childIdx == -1) > return nsIntRect(); > > nsIntRect bounds; > int32_t prevOffset = GetChildOffset(childIdx); > int32_t offset1 = startOffset - prevOffset; > >- while (childIdx < ChildCount()) { >+ while (static_cast<unsigned int>(childIdx) < ChildCount()) { istm the right fix here is to add some sort of unsigned int option class and then have GetChildIndexAtOffset() return that instead of int32_t. >@@ -1356,17 +1356,17 @@ HyperTextAccessible::SelectionBoundsAt(i > int32_t* aEndOffset) > { > *aStartOffset = *aEndOffset = 0; > > nsTArray<nsRange*> ranges; > GetSelectionDOMRanges(nsISelectionController::SELECTION_NORMAL, &ranges); > > uint32_t rangeCount = ranges.Length(); >- if (aSelectionNum < 0 || aSelectionNum >= rangeCount) >+ if (aSelectionNum < 0 || static_cast<unsigned int>(aSelectionNum) >= rangeCount) why isn't the type of aSelectionNum unsigned? >@@ -1398,30 +1398,30 @@ HyperTextAccessible::SetSelectionBoundsA > int32_t endOffset = ConvertMagicOffset(aEndOffset); > > Selection* domSel = DOMSelection(); > if (!domSel) > return false; > > nsRefPtr<nsRange> range; > uint32_t rangeCount = domSel->GetRangeCount(); >- if (aSelectionNum == rangeCount) >+ if (static_cast<unsigned int>(aSelectionNum) == rangeCount) same
Attachment #8399079 -
Flags: review?(trev.saunders)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•