Closed
Bug 588718
Opened 15 years ago
Closed 15 years ago
warning: comparison between signed and unsigned integer expressions in nsSMILTimeValueSpec::CheckEventDetail
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 587910
People
(Reporter: timeless, Assigned: timeless)
Details
Attachments
(1 file, 1 obsolete file)
|
686 bytes,
patch
|
timeless
:
review+
|
Details | Diff | Splinter Review |
content/smil/nsSMILTimeValueSpec.cpp:
In member function ‘PRBool nsSMILTimeValueSpec::CheckEventDetail(nsIDOMEvent*)’:
427: warning: comparison between signed and unsigned integer expressions
Comment 2•15 years ago
|
||
Comment on attachment 467356 [details] [diff] [review]
patch
r=dholbert, but can you add just before this return statement:
NS_ABORT_IF_FALSE(detail >= 0, "received negative repeat count?");
(birtles, just as a sanity-check, can you confirm that the above NS_ABORT_IF_FALSE is correct -- i.e. that I'm not misinterpreting what's going on in that function?)
Attachment #467356 -
Flags: review?(dholbert) → review+
Comment 3•15 years ago
|
||
(In reply to comment #2)
> r=dholbert, but can you add just before this return statement:
Er, I meant to say "can you add this before the return statement"
(sorry, it's late :))
Comment 4•15 years ago
|
||
(In reply to comment #2)
> Comment on attachment 467356 [details] [diff] [review]
> patch
>
> r=dholbert, but can you add just before this return statement:
> NS_ABORT_IF_FALSE(detail >= 0, "received negative repeat count?");
>
> (birtles, just as a sanity-check, can you confirm that the above
> NS_ABORT_IF_FALSE is correct -- i.e. that I'm not misinterpreting what's going
> on in that function?)
Actually, the detail could potentially be negative since we accept synthesised events. I don't think we want to abort in the case where we get something wacky from content right?
So maybe this should be:
return detail > 0 && (PRUint32)detail == mParams.mRepeatIterationOrAccessKey;
In the case where detail == 0 (which will only happen for synthesised events) we want to return false.
Sorry, for not picking this up before, I'm building on Windows (where there's no warning for this case) and haven't got in the habit of going through TryServer logs to pick this sort of thing up.
Comment 5•15 years ago
|
||
(In reply to comment #4)
Ah, I'd forgotten about synthesized events -- thanks Brian!
> So maybe this should be:
> return detail > 0 && (PRUint32)detail == mParams.mRepeatIterationOrAccessKey;
That sounds good to me. Timeless, mind tweaking the patch to that? (just adding "detail > 0 &&" to your existing patch)
Attachment #467356 -
Attachment is obsolete: true
Attachment #468086 -
Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•