Bug 1309818 - Fixing some warning when compiling dom/*, r=smaug

This commit is contained in:
Andrea Marchesini 2016-10-13 14:33:07 +02:00
Родитель 38b4c31828
Коммит 793b227795
10 изменённых файлов: 20 добавлений и 20 удалений

Просмотреть файл

@ -1313,7 +1313,7 @@ nsContentSubtreeIterator::Init(nsIDOMRange* aRange)
// find first node in range
int32_t offset = mRange->StartOffset();
nsINode* node;
nsINode* node = nullptr;
if (!startParent->GetChildCount()) {
// no children, start at the node itself
node = startParent;

Просмотреть файл

@ -1313,7 +1313,7 @@ ContentEventHandler::OnQuerySelectedText(WidgetQueryContentEvent* aEvent)
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsINode> anchorNode, focusNode;
int32_t anchorOffset, focusOffset;
int32_t anchorOffset = 0, focusOffset = 0;
if (mSelection->RangeCount()) {
// If there is only one selection range, the anchor/focus node and offset
// are the information of the range. Therefore, we have the direction
@ -1813,7 +1813,7 @@ ContentEventHandler::OnQueryTextRectArray(WidgetQueryContentEvent* aEvent)
// charRect).
nsRect lastCharRect;
// lastFrame is base frame of lastCharRect.
nsIFrame* lastFrame;
nsIFrame* lastFrame = nullptr;
while (offset < kEndOffset) {
nsCOMPtr<nsIContent> lastTextContent;
rv = SetRangeFromFlatTextOffset(range, offset, 1, lineBreakType, true,

Просмотреть файл

@ -106,7 +106,7 @@ public:
// If there is no securityUI, document doesn't have a security state to
// update. But we still want to set the document flags, so we don't return
// early.
nsresult stateRV;
nsresult stateRV = NS_ERROR_FAILURE;
if (securityUI) {
stateRV = securityUI->GetState(&state);
}

Просмотреть файл

@ -835,9 +835,9 @@ XPC_WN_Helper_Resolve(JSContext* cx, HandleObject obj, HandleId id, bool* resolv
XPCNativeSet* set = wrapper->GetSet();
XPCNativeSet* protoSet = wrapper->HasProto() ?
wrapper->GetProto()->GetSet() : nullptr;
XPCNativeMember* member;
XPCNativeMember* member = nullptr;
RefPtr<XPCNativeInterface> iface;
bool IsLocal;
bool IsLocal = false;
if (set->FindMember(id, &member, &iface, protoSet, &IsLocal) &&
IsLocal) {

Просмотреть файл

@ -2431,7 +2431,7 @@ nsTableFrame::HomogenousInsertFrames(ChildListID aListID,
// over... Oh, well.
nsIFrame* pseudoFrame = aFrameList.FirstChild();
nsIContent* parentContent = GetContent();
nsIContent* content;
nsIContent* content = nullptr;
aPrevFrame = nullptr;
while (pseudoFrame && (parentContent ==
(content = pseudoFrame->GetContent()))) {
@ -2441,7 +2441,7 @@ nsTableFrame::HomogenousInsertFrames(ChildListID aListID,
if (MOZ_LIKELY(container)) { // XXX need this null-check, see bug 411823.
int32_t newIndex = container->IndexOf(content);
nsIFrame* kidFrame;
nsTableColGroupFrame* lastColGroup;
nsTableColGroupFrame* lastColGroup = nullptr;
if (isColGroup) {
kidFrame = mColGroups.FirstChild();
lastColGroup = nsTableColGroupFrame::GetLastRealColGroup(this);

Просмотреть файл

@ -845,7 +845,7 @@ nsTableWrapperFrame::Reflow(nsPresContext* aPresContext,
InnerTableFrame()->HasAnyStateBits(NS_FRAME_FIRST_REFLOW);
nsRect origCaptionRect;
nsRect origCaptionVisualOverflow;
bool captionFirstReflow;
bool captionFirstReflow = false;
if (mCaptionFrames.NotEmpty()) {
origCaptionRect = mCaptionFrames.FirstChild()->GetRect();
origCaptionVisualOverflow =

Просмотреть файл

@ -1324,7 +1324,7 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, bool aIsMove, bool aS
nsRect anchorRect;
// Width of the parent, used when aSizedToPopup is true.
int32_t parentWidth;
int32_t parentWidth = 0;
bool anchored = IsAnchored();
if (anchored || aSizedToPopup) {

Просмотреть файл

@ -932,7 +932,7 @@ nsSprocketLayout::AlignChildren(nsIFrame* aBox,
// These are only calculated if needed
nsIFrame::Halignment halign;
nsIFrame::Valignment valign;
nscoord maxAscent;
nscoord maxAscent = 0;
bool isLTR;
if (isHorizontal) {
@ -957,7 +957,7 @@ nsSprocketLayout::AlignChildren(nsIFrame* aBox,
const nscoord endAlign =
clientRect.YMost() - margin.bottom - childRect.height;
nscoord y;
nscoord y = 0;
switch (valign) {
case nsBoxFrame::vAlign_Top:
y = startAlign;
@ -986,7 +986,7 @@ nsSprocketLayout::AlignChildren(nsIFrame* aBox,
const nscoord rightAlign =
clientRect.XMost() - margin.right - childRect.width;
nscoord x;
nscoord x = 0;
switch (halign) {
case nsBoxFrame::hAlign_Left: // start
x = isLTR ? leftAlign : rightAlign;

Просмотреть файл

@ -399,12 +399,12 @@ nsTextBoxFrame::DrawText(nsRenderingContext& aRenderingContext,
DrawTarget* drawTarget = aRenderingContext.GetDrawTarget();
// paint the title
nscolor overColor;
nscolor underColor;
nscolor strikeColor;
uint8_t overStyle;
uint8_t underStyle;
uint8_t strikeStyle;
nscolor overColor = 0;
nscolor underColor = 0;
nscolor strikeColor = 0;
uint8_t overStyle = 0;
uint8_t underStyle = 0;
uint8_t strikeStyle = 0;
// Begin with no decorations
uint8_t decorations = NS_STYLE_TEXT_DECORATION_LINE_NONE;

Просмотреть файл

@ -93,7 +93,7 @@ TreeBoxObject::GetTreeBodyFrame(bool aFlushLayout)
// is true we need to make sure to flush no matter what.
// XXXbz except that flushing style when we were not asked to flush
// layout here breaks things. See bug 585123.
nsIFrame* frame;
nsIFrame* frame = nullptr;
if (aFlushLayout) {
frame = GetFrame(aFlushLayout);
if (!frame)