Commit 076d49a2 authored by Kenton Varda's avatar Kenton Varda

Work around spurrious GCC 4.7 warning, and split RPC code into separate library.

parent ba49d48a
......@@ -163,7 +163,7 @@ includecapnp_HEADERS = \
src/capnp/generated-header-support.h \
src/capnp/rpc.h
lib_LTLIBRARIES = libkj.la libcapnp.la libcapnpc.la
lib_LTLIBRARIES = libkj.la libcapnp.la libcapnp-rpc.la libcapnpc.la
# -lpthread is here to work around https://bugzilla.redhat.com/show_bug.cgi?id=661333
libkj_la_LIBADD = $(PTHREAD_LIBS) -lpthread
......@@ -206,7 +206,12 @@ libcapnp_la_SOURCES= \
src/capnp/dynamic.c++ \
src/capnp/stringify.c++ \
src/capnp/serialize.c++ \
src/capnp/serialize-packed.c++ \
src/capnp/serialize-packed.c++
# -lpthread is here to work around https://bugzilla.redhat.com/show_bug.cgi?id=661333
libcapnp_rpc_la_LIBADD = libcapnp.la libkj.la $(PTHREAD_LIBS) -lpthread
libcapnp_rpc_la_LDFLAGS = -release $(VERSION) -no-undefined
libcapnp_rpc_la_SOURCES= \
src/capnp/rpc.c++ \
src/capnp/rpc.capnp.c++ \
src/capnp/rpc.capnp.h
......@@ -299,7 +304,8 @@ $(test_capnpc_outputs): test_capnpc_middleman
BUILT_SOURCES = $(test_capnpc_outputs)
check_PROGRAMS = capnp-test capnp-evolution-test
capnp_test_LDADD = gtest/lib/libgtest.la gtest/lib/libgtest_main.la libcapnpc.la libcapnp.la libkj.la
capnp_test_LDADD = gtest/lib/libgtest.la gtest/lib/libgtest_main.la \
libcapnpc.la libcapnp-rpc.la libcapnp.la libkj.la
capnp_test_CPPFLAGS = -Igtest/include -I$(srcdir)/gtest/include
capnp_test_SOURCES = \
src/kj/common-test.c++ \
......
......@@ -923,8 +923,11 @@ private:
exports = kj::Vector<ExportId>(caps.getWithoutLock().size());
for (auto& entry: caps.getWithoutLock()) {
KJ_IF_MAYBE(exportId, connectionState.writeDescriptor(
entry.second.cap->addRef(), entry.second.builder, tables)) {
// If maybeExportId is inlined, GCC 4.7 reports a spurious "may be used uninitialized"
// error (GCC 4.8 and Clang do not complain).
auto maybeExportId = connectionState.writeDescriptor(
entry.second.cap->addRef(), entry.second.builder, tables);
KJ_IF_MAYBE(exportId, maybeExportId) {
exports.add(*exportId);
}
}
......
linux-gcc-4.7 1564 ./super-test.sh tmpdir capnp-gcc-4.7 quick
linux-gcc-4.8 1567 ./super-test.sh tmpdir capnp-gcc-4.8 quick gcc-4.8
linux-clang 1581 ./super-test.sh tmpdir capnp-clang quick clang
mac 740 ./super-test.sh remote beat caffeinate quick
cygwin 745 ./super-test.sh remote Kenton@flashman quick
linux-gcc-4.8 1601 ./super-test.sh tmpdir capnp-gcc-4.8 quick gcc-4.8
linux-clang 1615 ./super-test.sh tmpdir capnp-clang quick clang
mac 752 ./super-test.sh remote beat caffeinate quick
cygwin 757 ./super-test.sh remote Kenton@flashman quick
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment