WebKit Bugzilla
Attachment 343432 Details for
Bug 186968
: Fix clang static analyzer warnings: Branch condition evaluates to a garbage value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v1
bug-186968-20180623061934.patch (text/plain), 3.76 KB, created by
David Kilzer (:ddkilzer)
on 2018-06-23 06:19:35 PDT
(
hide
)
Description:
Patch v1
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2018-06-23 06:19:35 PDT
Size:
3.76 KB
patch
obsolete
>Subversion Revision: 233095 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1254ddaec5fbd097498b7c424a1c2c6a92e9f151..c476d9d1e3097805f7878e9626e11ba5299184f0 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,25 @@ >+2018-06-23 David Kilzer <ddkilzer@apple.com> >+ >+ Fix clang static analyzer warnings: Branch condition evaluates to a garbage value >+ <https://webkit.org/b/186968> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * editing/mac/EditorMac.mm: >+ (WebCore::Editor::writeImageToPasteboard): Initialize >+ `cachedImage` to nullptr since getImage() has an early return >+ that doesn't set `cachedImage`. This may cause new assertion >+ failure crashes in Debug builds. >+ * page/animation/CompositeAnimation.cpp: >+ (WebCore::CompositeAnimation::updateTransitions): Initialize >+ `isShorthand` to false since CSSPropertyAnimation::getPropertyAtIndex() >+ has an early return that doesn't set `isShorthand`. >+ * rendering/InlineFlowBox.cpp: >+ (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const): >+ Initialize `emphasisMarkIsAbove` to false since >+ InlineTextBox::emphasisMarkExistsAndIsAbove() has an early >+ return that doesn't set `emphasisMarkIsAbove`. >+ > 2018-06-22 Timothy Hatcher <timothy@apple.com> > > Recalc styles every time defaultAppearance changes. >diff --git a/Source/WebCore/editing/mac/EditorMac.mm b/Source/WebCore/editing/mac/EditorMac.mm >index a1f4563f26d889ccfc6d96d509eec3e54ae8933a..cf289bf70e400036767808d1a1699f68237aac00 100644 >--- a/Source/WebCore/editing/mac/EditorMac.mm >+++ b/Source/WebCore/editing/mac/EditorMac.mm >@@ -263,7 +263,7 @@ void Editor::writeImageToPasteboard(Pasteboard& pasteboard, Element& imageElemen > { > PasteboardImage pasteboardImage; > >- CachedImage* cachedImage; >+ CachedImage* cachedImage = nullptr; > getImage(imageElement, pasteboardImage.image, cachedImage); > if (!pasteboardImage.image) > return; >diff --git a/Source/WebCore/page/animation/CompositeAnimation.cpp b/Source/WebCore/page/animation/CompositeAnimation.cpp >index 1db6234a6ec747ae006030b15a83049c43e94ef2..3d52bf91956498a355d7a07eb96981922576c9d3 100644 >--- a/Source/WebCore/page/animation/CompositeAnimation.cpp >+++ b/Source/WebCore/page/animation/CompositeAnimation.cpp >@@ -109,7 +109,7 @@ void CompositeAnimation::updateTransitions(Element& element, const RenderStyle* > for (int propertyIndex = 0; propertyIndex < CSSPropertyAnimation::getNumProperties(); ++propertyIndex) { > if (all) { > // Get the next property which is not a shorthand. >- bool isShorthand; >+ bool isShorthand = false; > prop = CSSPropertyAnimation::getPropertyAtIndex(propertyIndex, isShorthand); > if (isShorthand) > continue; >diff --git a/Source/WebCore/rendering/InlineFlowBox.cpp b/Source/WebCore/rendering/InlineFlowBox.cpp >index 80f3c91e3e8a0d3342e3ac655161bc15618d556f..a94d0035e1d299e8e6d8244b95a6c476d99657cf 100644 >--- a/Source/WebCore/rendering/InlineFlowBox.cpp >+++ b/Source/WebCore/rendering/InlineFlowBox.cpp >@@ -1623,7 +1623,7 @@ LayoutUnit InlineFlowBox::computeUnderAnnotationAdjustment(LayoutUnit allowedPos > > if (is<InlineTextBox>(*child)) { > const RenderStyle& childLineStyle = child->lineStyle(); >- bool emphasisMarkIsAbove; >+ bool emphasisMarkIsAbove = false; > downcast<InlineTextBox>(*child).emphasisMarkExistsAndIsAbove(childLineStyle, emphasisMarkIsAbove); > if (childLineStyle.textEmphasisMark() != TextEmphasisMark::None && !emphasisMarkIsAbove) { > if (!childLineStyle.isFlippedLinesWritingMode()) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186968
:
343432
|
343483
|
343487
|
343545
|
343621