Closed Bug 354703 Opened 18 years ago Closed 17 years ago

calDateTime::SubtractDate has unused variables and function calls

Categories

(Calendar :: Internal Components, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dmosedale, Assigned: Fallen)

Details

Attachments

(1 file, 1 obsolete file)

Which means that the returned duration's nativeTime is wrong (outdated).  I suspect we may want to take this for 0.3, but I'm conflicted.  Taking it scares me, but not taking it scares me too.
Flags: blocking0.3?
Attached patch normalize and cleanup in subtractDate (obsolete) β€” β€” Splinter Review
Assignee: nobody → dmose
Status: NEW → ASSIGNED
Attachment #240498 - Flags: second-review?(mvl)
Attachment #240498 - Flags: first-review?(cmtalbert)
Comment on attachment 240498 [details] [diff] [review]
normalize and cleanup in subtractDate

This looks good. If there isn't a defect to remove spurious normalize's throughout the rest of the code, can you file one? Or should we just clean them up as we find them?
Attachment #240498 - Flags: first-review?(cmtalbert) → first-review+
I don't understand the bug. Do you have a testcase?
> Which means that the returned duration's nativeTime is wrong (outdated)
calIDuration doesn't have a nativeTime, so how can it be wrong?
Comment on attachment 240498 [details] [diff] [review]
normalize and cleanup in subtractDate

mvl is right; the Normalize call is not necessary here.
Attachment #240498 - Attachment is obsolete: true
Attachment #240498 - Flags: second-review?(mvl)
Flags: blocking0.3?
Summary: calDateTime::SubtractDate does not normalize before returning → calDateTime::SubtractDate has unused variables and function calls
(In reply to comment #4)
> (From update of attachment 240498 [details] [diff] [review] [edit])
> mvl is right; the Normalize call is not necessary here.    

It looks as if we only need to take the first part of the patch then to fix/close this bug.
Target Milestone: --- → Sunbird 0.5
lilmatt: your commment 5 still applies.  A new version of this patch without the Normalize call is what's wanted here.
Assignee: dmose → nobody
Status: ASSIGNED → NEW
BTW: I recognized that calDateTime's boolean member mIsValid is only written but never read, so maybe this can be cleaned up in this turn, too.
Target Milestone: Sunbird 0.5 → ---
(In reply to comment #7)
Forget my previous comment: there is a readonly attribute that reads; I just misgrepped calDatetime.cpp searching for mIsValid while the getter macro just references IsValid...
Attached patch hunk 1 of previous patch β€” β€” Splinter Review
Since this is a quick one, patch as requested in c6.
Assignee: nobody → bugzilla
Status: NEW → ASSIGNED
Attachment #260840 - Flags: first-review?(lilmatt)
Attachment #260840 - Flags: first-review?(lilmatt) → review?(lilmatt)
Comment on attachment 260840 [details] [diff] [review]
hunk 1 of previous patch

over to clint
Attachment #260840 - Flags: review?(lilmatt) → review?(ctalbert)
Comment on attachment 260840 [details] [diff] [review]
hunk 1 of previous patch

r=ctalbert
Attachment #260840 - Flags: review?(ctalbert) → review+
Checked in on HEAD and MOZILLA_1_8_BRANCH

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: