misc places compiler warnings

RESOLVED FIXED in Firefox 3

Status

()

Firefox
Bookmarks & History
--
minor
RESOLVED FIXED
11 years ago
9 years ago

People

(Reporter: Gavin, Assigned: dietrich)

Tracking

Trunk
Firefox 3
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

I noticed some "unused variable" compiler warnings when building places components.
Comment on attachment 310274 [details] [diff] [review]
patch

>Index: toolkit/components/places/src/nsNavBookmarks.cpp

>-    mozIStorageConnection *dbConn = DBConn();

Added in bug 332047, Marco says it can be removed.

>-  PRTime now = PR_Now();
>   rv = SetItemDateInternal(mDBSetItemLastModified, oldParent, PR_Now());
>   NS_ENSURE_SUCCESS(rv, rv);
>   rv = SetItemDateInternal(mDBSetItemLastModified, aNewParent, PR_Now());
>   NS_ENSURE_SUCCESS(rv, rv);

Intentionally changed by bug 393498. Not sure whether we should use "now" or get rid of it.

>Index: toolkit/components/places/src/nsNavHistory.cpp

>+  mUseLimit(aUseLimit),
>   mResultType(aOptions->ResultType()),
>   mQueryType(aOptions->QueryType()),
>   mIncludeHidden(aOptions->IncludeHidden()),
>   mSortingMode(aOptions->SortingMode()),
>   mMaxResults(aOptions->MaxResults()),
>-  mUseLimit(aUseLimit),
>   mSkipOrderBy(PR_FALSE)

>Index: toolkit/components/places/src/nsNavHistoryResult.cpp

>-  mDynamicContainerType(aDynamicContainerType),
>-  mOptions(aOptions)
>+  mOptions(aOptions),
>+  mDynamicContainerType(aDynamicContainerType)

Initialization order doesn't match declaration order warnings.
(Assignee)

Comment 3

11 years ago
> >-  PRTime now = PR_Now();
> >   rv = SetItemDateInternal(mDBSetItemLastModified, oldParent, PR_Now());
> >   NS_ENSURE_SUCCESS(rv, rv);
> >   rv = SetItemDateInternal(mDBSetItemLastModified, aNewParent, PR_Now());
> >   NS_ENSURE_SUCCESS(rv, rv);
> 
> Intentionally changed by bug 393498. Not sure whether we should use "now" or
> get rid of it.

should use "now". thanks for the patch!
Duplicate of this bug: 424577
(Assignee)

Comment 6

10 years ago
Created attachment 315320 [details] [diff] [review]
more

patch updated, more warnings fixed.
Assignee: nobody → dietrich
Attachment #310274 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #315320 - Flags: review?(mano)
(Assignee)

Comment 8

10 years ago
Comment on attachment 315320 [details] [diff] [review]
more

drivers: very low risk changes to fix various warnings. safe and sane.
Attachment #315320 - Flags: approval1.9?

Updated

10 years ago
Attachment #315320 - Flags: approval1.9? → approval1.9+
(Assignee)

Comment 9

10 years ago
Checking in toolkit/components/places/src/nsNavBookmarks.cpp;
/cvsroot/mozilla/toolkit/components/places/src/nsNavBookmarks.cpp,v  <--  nsNavBookmarks.cpp
new revision: 1.162; previous revision: 1.161
done
Checking in toolkit/components/places/src/nsNavHistory.cpp;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.cpp,v  <--  nsNavHistory.cpp
new revision: 1.292; previous revision: 1.291
done
Checking in toolkit/components/places/src/nsNavHistoryResult.cpp;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistoryResult.cpp,v  <--  nsNavHistoryResult.cpp
new revision: 1.141; previous revision: 1.140
done
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.