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
c4943308
Unverified
Commit
c4943308
authored
Feb 08, 2018
by
Kenton Varda
Committed by
GitHub
Feb 08, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #632 from capnproto/fix-warnings
Fix new compiler warnings.
parents
0034d126
a75953ed
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
28 deletions
+26
-28
capnpc-c++.c++
c++/src/capnp/compiler/capnpc-c++.c++
+19
-19
rpc-test.c++
c++/src/capnp/rpc-test.c++
+0
-2
tls.c++
c++/src/kj/compat/tls.c++
+4
-4
main.c++
c++/src/kj/main.c++
+1
-1
timer.c++
c++/src/kj/timer.c++
+2
-2
No files found.
c++/src/capnp/compiler/capnpc-c++.c++
View file @
c4943308
...
...
@@ -2475,16 +2475,16 @@ private:
const
char
*
linkage
=
scope
.
size
()
==
0
?
"extern "
:
"static "
;
switch
(
type
.
which
())
{
case
schema
:
:
Valu
e
::
BOOL
:
case
schema
:
:
Valu
e
::
INT8
:
case
schema
:
:
Valu
e
::
INT16
:
case
schema
:
:
Valu
e
::
INT32
:
case
schema
:
:
Valu
e
::
INT64
:
case
schema
:
:
Valu
e
::
UINT8
:
case
schema
:
:
Valu
e
::
UINT16
:
case
schema
:
:
Valu
e
::
UINT32
:
case
schema
:
:
Valu
e
::
UINT64
:
case
schema
:
:
Valu
e
::
ENUM
:
case
schema
:
:
Typ
e
::
BOOL
:
case
schema
:
:
Typ
e
::
INT8
:
case
schema
:
:
Typ
e
::
INT16
:
case
schema
:
:
Typ
e
::
INT32
:
case
schema
:
:
Typ
e
::
INT64
:
case
schema
:
:
Typ
e
::
UINT8
:
case
schema
:
:
Typ
e
::
UINT16
:
case
schema
:
:
Typ
e
::
UINT32
:
case
schema
:
:
Typ
e
::
UINT64
:
case
schema
:
:
Typ
e
::
ENUM
:
return
ConstText
{
false
,
kj
::
strTree
(
"static constexpr "
,
typeName_
,
' '
,
upperCase
,
" = "
,
...
...
@@ -2497,9 +2497,9 @@ private:
"#endif
\n
"
)
};
case
schema
:
:
Valu
e
::
VOID
:
case
schema
:
:
Valu
e
::
FLOAT32
:
case
schema
:
:
Valu
e
::
FLOAT64
:
{
case
schema
:
:
Typ
e
::
VOID
:
case
schema
:
:
Typ
e
::
FLOAT32
:
case
schema
:
:
Typ
e
::
FLOAT64
:
{
// TODO(msvc): MSVC doesn't like float- or class-typed constexprs. As soon as this is fixed,
// treat VOID, FLOAT32, and FLOAT64 the same as the other primitives.
kj
::
String
value
=
literalValue
(
schema
.
getType
(),
constProto
.
getValue
()).
flatten
();
...
...
@@ -2513,7 +2513,7 @@ private:
};
}
case
schema
:
:
Valu
e
::
TEXT
:
{
case
schema
:
:
Typ
e
::
TEXT
:
{
kj
::
String
constType
=
kj
::
strTree
(
"::capnp::_::ConstText<"
,
schema
.
as
<
Text
>
().
size
(),
">"
).
flatten
();
return
ConstText
{
...
...
@@ -2524,7 +2524,7 @@ private:
};
}
case
schema
:
:
Valu
e
::
DATA
:
{
case
schema
:
:
Typ
e
::
DATA
:
{
kj
::
String
constType
=
kj
::
strTree
(
"::capnp::_::ConstData<"
,
schema
.
as
<
Data
>
().
size
(),
">"
).
flatten
();
return
ConstText
{
...
...
@@ -2535,7 +2535,7 @@ private:
};
}
case
schema
:
:
Valu
e
::
STRUCT
:
{
case
schema
:
:
Typ
e
::
STRUCT
:
{
kj
::
String
constType
=
kj
::
strTree
(
"::capnp::_::ConstStruct<"
,
typeName_
,
">"
).
flatten
();
return
ConstText
{
...
...
@@ -2546,7 +2546,7 @@ private:
};
}
case
schema
:
:
Valu
e
::
LIST
:
{
case
schema
:
:
Typ
e
::
LIST
:
{
kj
::
String
constType
=
kj
::
strTree
(
"::capnp::_::ConstList<"
,
typeName
(
type
.
asList
().
getElementType
(),
nullptr
),
">"
)
.
flatten
();
...
...
@@ -2558,8 +2558,8 @@ private:
};
}
case
schema
:
:
Valu
e
::
ANY_POINTER
:
case
schema
:
:
Valu
e
::
INTERFACE
:
case
schema
:
:
Typ
e
::
ANY_POINTER
:
case
schema
:
:
Typ
e
::
INTERFACE
:
return
ConstText
{
false
,
kj
::
strTree
(),
kj
::
strTree
()
};
}
...
...
c++/src/capnp/rpc-test.c++
View file @
c4943308
...
...
@@ -1168,7 +1168,6 @@ TEST(Rpc, RealmGatewayImportExport) {
kj
::
EventLoop
loop
;
kj
::
WaitScope
waitScope
(
loop
);
TestNetwork
network
;
TestRestorer
restorer
;
TestNetworkAdapter
&
clientNetwork
=
network
.
add
(
"client"
);
TestNetworkAdapter
&
serverNetwork
=
network
.
add
(
"server"
);
RpcSystem
<
test
::
TestSturdyRefHostId
>
rpcClient
=
...
...
@@ -1222,7 +1221,6 @@ TEST(Rpc, RealmGatewayImportExport) {
kj
::
EventLoop
loop
;
kj
::
WaitScope
waitScope
(
loop
);
TestNetwork
network
;
TestRestorer
restorer
;
TestNetworkAdapter
&
clientNetwork
=
network
.
add
(
"client"
);
TestNetworkAdapter
&
serverNetwork
=
network
.
add
(
"server"
);
RpcSystem
<
test
::
TestSturdyRefHostId
>
rpcClient
=
...
...
c++/src/kj/compat/tls.c++
View file @
c4943308
...
...
@@ -99,7 +99,7 @@ void ensureOpenSslInitialized() {
// AsyncIoStream is simply wrapping a file descriptor (or other readiness-based stream?) and use
// that directly if so.
class
TlsConnection
:
public
kj
::
AsyncIoStream
{
class
TlsConnection
final
:
public
kj
::
AsyncIoStream
{
public
:
TlsConnection
(
kj
::
Own
<
kj
::
AsyncIoStream
>
stream
,
SSL_CTX
*
ctx
)
:
TlsConnection
(
*
stream
,
ctx
)
{
...
...
@@ -372,7 +372,7 @@ private:
// =======================================================================================
// Implementations of ConnectionReceiver, NetworkAddress, and Network as wrappers adding TLS.
class
TlsConnectionReceiver
:
public
kj
::
ConnectionReceiver
{
class
TlsConnectionReceiver
final
:
public
kj
::
ConnectionReceiver
{
public
:
TlsConnectionReceiver
(
TlsContext
&
tls
,
kj
::
Own
<
kj
::
ConnectionReceiver
>
inner
)
:
tls
(
tls
),
inner
(
kj
::
mv
(
inner
))
{}
...
...
@@ -400,7 +400,7 @@ private:
kj
::
Own
<
kj
::
ConnectionReceiver
>
inner
;
};
class
TlsNetworkAddress
:
public
kj
::
NetworkAddress
{
class
TlsNetworkAddress
final
:
public
kj
::
NetworkAddress
{
public
:
TlsNetworkAddress
(
TlsContext
&
tls
,
kj
::
String
hostname
,
kj
::
Own
<
kj
::
NetworkAddress
>&&
inner
)
:
tls
(
tls
),
hostname
(
kj
::
mv
(
hostname
)),
inner
(
kj
::
mv
(
inner
))
{}
...
...
@@ -435,7 +435,7 @@ private:
kj
::
Own
<
kj
::
NetworkAddress
>
inner
;
};
class
TlsNetwork
:
public
kj
::
Network
{
class
TlsNetwork
final
:
public
kj
::
Network
{
public
:
TlsNetwork
(
TlsContext
&
tls
,
kj
::
Network
&
inner
)
:
tls
(
tls
),
inner
(
inner
)
{}
TlsNetwork
(
TlsContext
&
tls
,
kj
::
Own
<
kj
::
Network
>
inner
)
...
...
c++/src/kj/main.c++
View file @
c4943308
...
...
@@ -631,7 +631,7 @@ void MainBuilder::MainImpl::usageError(StringPtr programName, StringPtr message)
class
MainBuilder
::
Impl
::
OptionDisplayOrder
{
public
:
bool
operator
()(
const
Option
*
a
,
const
Option
*
b
)
{
bool
operator
()(
const
Option
*
a
,
const
Option
*
b
)
const
{
if
(
a
==
b
)
return
false
;
char
aShort
=
'\0'
;
...
...
c++/src/kj/timer.c++
View file @
c4943308
...
...
@@ -32,7 +32,7 @@ kj::Exception Timer::makeTimeoutException() {
struct
TimerImpl
::
Impl
{
struct
TimerBefore
{
bool
operator
()(
TimerPromiseAdapter
*
lhs
,
TimerPromiseAdapter
*
rhs
);
bool
operator
()(
TimerPromiseAdapter
*
lhs
,
TimerPromiseAdapter
*
rhs
)
const
;
};
using
Timers
=
std
::
multiset
<
TimerPromiseAdapter
*
,
TimerBefore
>
;
Timers
timers
;
...
...
@@ -66,7 +66,7 @@ private:
};
inline
bool
TimerImpl
::
Impl
::
TimerBefore
::
operator
()(
TimerPromiseAdapter
*
lhs
,
TimerPromiseAdapter
*
rhs
)
{
TimerPromiseAdapter
*
lhs
,
TimerPromiseAdapter
*
rhs
)
const
{
return
lhs
->
time
<
rhs
->
time
;
}
...
...
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