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
1cb71b92
Commit
1cb71b92
authored
Aug 23, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable more warnings and -Werror in test script, fix problems.
parent
59e840bd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
14 deletions
+23
-14
common.h
c++/src/capnp/common.h
+8
-7
capnpc-c++.c++
c++/src/capnp/compiler/capnpc-c++.c++
+1
-1
schema-loader.c++
c++/src/capnp/schema-loader.c++
+2
-2
string-tree-test.c++
c++/src/kj/string-tree-test.c++
+2
-2
super-test.sh
super-test.sh
+10
-2
No files found.
c++/src/capnp/common.h
View file @
1cb71b92
...
...
@@ -269,13 +269,14 @@ constexpr WordCount WORDS = kj::unit<WordCount>();
constexpr
ElementCount
ELEMENTS
=
kj
::
unit
<
ElementCount
>
();
constexpr
WirePointerCount
POINTERS
=
kj
::
unit
<
WirePointerCount
>
();
constexpr
auto
BITS_PER_BYTE
=
8
*
BITS
/
BYTES
;
constexpr
auto
BITS_PER_WORD
=
64
*
BITS
/
WORDS
;
constexpr
auto
BYTES_PER_WORD
=
8
*
BYTES
/
WORDS
;
constexpr
auto
BITS_PER_POINTER
=
64
*
BITS
/
POINTERS
;
constexpr
auto
BYTES_PER_POINTER
=
8
*
BYTES
/
POINTERS
;
constexpr
auto
WORDS_PER_POINTER
=
1
*
WORDS
/
POINTERS
;
// GCC 4.7 actually gives unused warnings on these constants in opt mode...
constexpr
auto
BITS_PER_BYTE
KJ_UNUSED
=
8
*
BITS
/
BYTES
;
constexpr
auto
BITS_PER_WORD
KJ_UNUSED
=
64
*
BITS
/
WORDS
;
constexpr
auto
BYTES_PER_WORD
KJ_UNUSED
=
8
*
BYTES
/
WORDS
;
constexpr
auto
BITS_PER_POINTER
KJ_UNUSED
=
64
*
BITS
/
POINTERS
;
constexpr
auto
BYTES_PER_POINTER
KJ_UNUSED
=
8
*
BYTES
/
POINTERS
;
constexpr
auto
WORDS_PER_POINTER
KJ_UNUSED
=
1
*
WORDS
/
POINTERS
;
constexpr
WordCount
POINTER_SIZE_IN_WORDS
=
1
*
POINTERS
*
WORDS_PER_POINTER
;
...
...
c++/src/capnp/compiler/capnpc-c++.c++
View file @
1cb71b92
...
...
@@ -599,7 +599,7 @@ private:
auto
nonGroup
=
proto
.
getNonGroup
();
FieldKind
kind
;
FieldKind
kind
=
FieldKind
::
PRIMITIVE
;
kj
::
String
ownedType
;
kj
::
String
type
=
typeName
(
nonGroup
.
getType
()).
flatten
();
kj
::
StringPtr
setterDefault
;
// only for void
...
...
c++/src/capnp/schema-loader.c++
View file @
1cb71b92
...
...
@@ -312,8 +312,8 @@ private:
case
schema
:
:
Field
::
NON_GROUP
:
{
auto
nonGroup
=
field
.
getNonGroup
();
uint
fieldBits
;
bool
fieldIsPointer
;
uint
fieldBits
=
0
;
bool
fieldIsPointer
=
false
;
validate
(
nonGroup
.
getType
(),
nonGroup
.
getDefaultValue
(),
&
fieldBits
,
&
fieldIsPointer
);
VALIDATE_SCHEMA
(
fieldBits
*
(
nonGroup
.
getOffset
()
+
1
)
<=
dataSizeInBits
&&
...
...
c++/src/kj/string-tree-test.c++
View file @
1cb71b92
...
...
@@ -39,8 +39,8 @@ TEST(StringTree, StrTree) {
EXPECT_EQ
(
"foobarbaz"
,
tree
.
flatten
());
uint
pieceCount
=
0
;
tree
.
visit
([
&
](
ArrayPtr
<
const
char
>
part
)
{
++
pieceCount
;
EXPECT_EQ
(
3
,
part
.
size
());
});
EXPECT_EQ
(
3
,
pieceCount
);
tree
.
visit
([
&
](
ArrayPtr
<
const
char
>
part
)
{
++
pieceCount
;
EXPECT_EQ
(
3
u
,
part
.
size
());
});
EXPECT_EQ
(
3
u
,
pieceCount
);
}
EXPECT_EQ
(
"<foobarbaz>"
,
str
(
'<'
,
strTree
(
str
(
"foo"
),
"bar"
,
str
(
"baz"
)),
'>'
));
...
...
super-test.sh
View file @
1cb71b92
...
...
@@ -152,8 +152,9 @@ __EOF__
done
# Build optimized builds because they catch more problems, but also enable debugging macros.
# Enable lots of warnings and make sure the build breaks if they fire.
export CXXFLAGS="-O2 -DDEBUG -Wall -Werror"
# Enable lots of warnings and make sure the build breaks if they fire. Disable strict-aliasing
# because GCC warns about code that I know is OK.
export CXXFLAGS="-O2 -DDEBUG -Wall -Werror -Wno-strict-aliasing"
STAGING=$PWD/tmp-staging
...
...
@@ -185,6 +186,13 @@ else
SAMPLE_CXXFLAGS=
fi
case ${CXX:-g++} in
*clang* )
# There'
s an unused private field
in
gtest.
export
CXXFLAGS
=
"
$CXXFLAGS
-Wno-unused-private-field"
;;
esac
cd
c++
doit ./setup-autotools.sh |
tr
=
-
doit autoreconf
-i
...
...
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