Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
6816634a
Commit
6816634a
authored
Mar 19, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix recently-introduced unit analysis errors.
parent
0197c69c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
layout.c++
c++/src/capnp/layout.c++
+6
-6
No files found.
c++/src/capnp/layout.c++
View file @
6816634a
...
...
@@ -1678,7 +1678,7 @@ struct WireHelpers {
auto
se
=
value
.
getStructElement
(
ec
);
WordCount
localDataSize
=
declDataSize
;
while
(
localDataSize
!=
0
*
WORDS
)
{
size_t
end
=
(
localDataSize
*
BYTES_PER_WORD
*
BYTES
)
/
BYTES
;
size_t
end
=
localDataSize
*
BYTES_PER_WORD
/
BYTES
;
ByteCount
window
=
BYTES_PER_WORD
*
WORDS
;
size_t
start
=
end
-
window
/
BYTES
;
kj
::
ArrayPtr
<
const
byte
>
lastWord
=
se
.
getDataSectionAsBlob
().
slice
(
start
,
end
);
...
...
@@ -2959,15 +2959,15 @@ bool ListReader::isCanonical(const word **readHead, const WirePointer *ref) {
if
(
this
->
structDataSize
%
BITS_PER_WORD
!=
0
*
BITS
)
{
return
false
;
}
auto
structSize
=
(
this
->
structDataSize
/
BITS_PER_WORD
)
+
(
this
->
structPointerCount
*
WORDS_PER_POINTER
)
;
if
(
struc
tSize
*
this
->
elementCount
!=
ref
->
listRef
.
inlineCompositeWordCount
())
{
auto
elementSize
=
(
this
->
structDataSize
/
BITS_PER_WORD
+
this
->
structPointerCount
*
WORDS_PER_POINTER
)
/
ELEMENTS
;
if
(
elemen
tSize
*
this
->
elementCount
!=
ref
->
listRef
.
inlineCompositeWordCount
())
{
return
false
;
}
if
(
structSize
==
0
*
WORD
S
)
{
if
(
elementSize
==
0
*
WORDS
/
ELEMENT
S
)
{
return
true
;
}
auto
listEnd
=
*
readHead
+
(
this
->
elementCount
/
ELEMENTS
*
struc
tSize
)
/
WORDS
;
auto
listEnd
=
*
readHead
+
(
this
->
elementCount
*
elemen
tSize
)
/
WORDS
;
auto
pointerHead
=
listEnd
;
bool
listDataTrunc
=
false
;
bool
listPtrTrunc
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment