Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix clang static analyzer warning in StyleBuilderConverter.h
<https://webkit.org/b/190907>

Reviewed by Antti Koivisto.

Fix the following clang static warning in StyleBuilderConverter.h:
    Value stored to 'autoFlow' during its initialization is never read

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertGridAutoFlow): Move
assignment of RenderStyle::initialGridAutoFlow() to `default`
case.  Make `CSSValueDense` consistent with other cases by
assigning value to `autoFlow` instead of returning early.


Canonical link: https://commits.webkit.org/205849@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
ddkilzer committed Oct 29, 2018
1 parent 453970b commit abd7b7c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
16 changes: 16 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
2018-10-29 David Kilzer <ddkilzer@apple.com>

Fix clang static analyzer warning in StyleBuilderConverter.h
<https://webkit.org/b/190907>

Reviewed by Antti Koivisto.

Fix the following clang static warning in StyleBuilderConverter.h:
Value stored to 'autoFlow' during its initialization is never read

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertGridAutoFlow): Move
assignment of RenderStyle::initialGridAutoFlow() to `default`
case. Make `CSSValueDense` consistent with other cases by
assigning value to `autoFlow` instead of returning early.

2018-10-29 Youenn Fablet <youenn@apple.com>

Guard H264 simulcast with a runtime flag
Expand Down
11 changes: 7 additions & 4 deletions Source/WebCore/css/StyleBuilderConverter.h
Expand Up @@ -1047,11 +1047,11 @@ inline GridAutoFlow StyleBuilderConverter::convertGridAutoFlow(StyleResolver&, c
auto& first = downcast<CSSPrimitiveValue>(*list.item(0));
auto* second = downcast<CSSPrimitiveValue>(list.item(1));

GridAutoFlow autoFlow = RenderStyle::initialGridAutoFlow();
GridAutoFlow autoFlow;
switch (first.valueID()) {
case CSSValueRow:
if (second && second->valueID() == CSSValueDense)
autoFlow = AutoFlowRowDense;
autoFlow = AutoFlowRowDense;
else
autoFlow = AutoFlowRow;
break;
Expand All @@ -1063,10 +1063,13 @@ inline GridAutoFlow StyleBuilderConverter::convertGridAutoFlow(StyleResolver&, c
break;
case CSSValueDense:
if (second && second->valueID() == CSSValueColumn)
return AutoFlowColumnDense;
return AutoFlowRowDense;
autoFlow = AutoFlowColumnDense;
else
autoFlow = AutoFlowRowDense;
break;
default:
ASSERT_NOT_REACHED();
autoFlow = RenderStyle::initialGridAutoFlow();
break;
}

Expand Down

0 comments on commit abd7b7c

Please sign in to comment.