Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
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
brpc
Commits
9f510165
Commit
9f510165
authored
Jan 21, 2020
by
jamesge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix warnings on MACOS
parent
4e519089
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
11 additions
and
13 deletions
+11
-13
CMakeLists.txt
CMakeLists.txt
+2
-1
config_brpc.sh
config_brpc.sh
+1
-1
hotspots_service.cpp
src/brpc/builtin/hotspots_service.cpp
+1
-1
http_rpc_protocol.cpp
src/brpc/policy/http_rpc_protocol.cpp
+1
-1
redis.h
src/brpc/redis.h
+1
-1
rpc_dump.h
src/brpc/rpc_dump.h
+2
-1
fd.cpp
src/bthread/fd.cpp
+1
-1
binary_printer.cpp
src/butil/binary_printer.cpp
+2
-2
sampler.cpp
src/bvar/detail/sampler.cpp
+0
-1
CMakeLists.txt
tools/CMakeLists.txt
+0
-3
No files found.
CMakeLists.txt
View file @
9f510165
...
...
@@ -101,9 +101,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-Wno-deprecated-declarations -Wno-inconsistent-missing-override"
)
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DBRPC_WITH_GLOG=
${
WITH_GLOG_VAL
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CPP_FLAGS
"
${
CMAKE_CPP_FLAGS
}
${
DEFINE_CLOCK_GETTIME
}
-DBRPC_WITH_GLOG=
${
WITH_GLOG_VAL
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
WITH_MESALINK
)
set
(
CMAKE_CPP_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DUSE_MESALINK"
)
endif
()
...
...
config_brpc.sh
View file @
9f510165
...
...
@@ -319,7 +319,7 @@ if [ ! -z "$DEBUGSYMBOLS" ]; then
CPPFLAGS
=
"
${
CPPFLAGS
}
$DEBUGSYMBOLS
"
fi
if
[
"
$SYSTEM
"
=
"Darwin"
]
;
then
CPPFLAGS
=
"
${
CPPFLAGS
}
-Wno-deprecated-declarations"
CPPFLAGS
=
"
${
CPPFLAGS
}
-Wno-deprecated-declarations
-Wno-inconsistent-missing-override
"
version
=
`
sw_vers
-productVersion
|
awk
-F
'.'
'{print $1 "." $2}'
`
if
[[
`
echo
"
$version
<10.12"
| bc
-l
`
==
1
]]
;
then
CPPFLAGS
=
"
${
CPPFLAGS
}
-DNO_CLOCK_GETTIME_IN_MAC"
...
...
src/brpc/builtin/hotspots_service.cpp
View file @
9f510165
...
...
@@ -103,7 +103,7 @@ static std::string GeneratePerlScriptPath(const std::string& filename) {
path
+=
FLAGS_rpc_profiling_dir
;
path
.
push_back
(
'/'
);
path
+=
filename
;
return
std
::
move
(
path
)
;
return
path
;
}
extern
bool
cpu_profiler_enabled
;
...
...
src/brpc/policy/http_rpc_protocol.cpp
View file @
9f510165
...
...
@@ -583,7 +583,7 @@ void SerializeHttpRequest(butil::IOBuf* /*not used*/,
hreq
.
SetHeader
(
common
->
TE
,
common
->
TRAILERS
);
if
(
cntl
->
timeout_ms
()
>=
0
)
{
hreq
.
SetHeader
(
common
->
GRPC_TIMEOUT
,
butil
::
string_printf
(
"%
ldm"
,
cntl
->
timeout_ms
()));
butil
::
string_printf
(
"%
"
PRId64
,
cntl
->
timeout_ms
()));
}
// Append compressed and length before body
AddGrpcPrefix
(
&
cntl
->
request_attachment
(),
grpc_compressed
);
...
...
src/brpc/redis.h
View file @
9f510165
...
...
@@ -240,7 +240,7 @@ enum RedisCommandHandlerResult {
// The Command handler for a redis request. User should impletement Run().
class
RedisCommandHandler
{
public
:
~
RedisCommandHandler
()
{}
virtual
~
RedisCommandHandler
()
{}
// Once Server receives commands, it will first find the corresponding handlers and
// call them sequentially(one by one) according to the order that requests arrive,
...
...
src/brpc/rpc_dump.h
View file @
9f510165
...
...
@@ -47,7 +47,8 @@ DECLARE_bool(rpc_dump);
// In practice, sampled requests are just small fraction of all requests.
// The overhead of sampling should be negligible for overall performance.
struct
SampledRequest
:
public
bvar
::
Collected
{
class
SampledRequest
:
public
bvar
::
Collected
{
public
:
butil
::
IOBuf
request
;
RpcDumpMeta
meta
;
...
...
src/bthread/fd.cpp
View file @
9f510165
...
...
@@ -434,7 +434,7 @@ short epoll_to_poll_events(uint32_t epoll_events) {
return
poll_events
;
}
#elif defined(OS_MACOSX)
s
hort
kqueue_to_poll_events
(
uint32_
t
kqueue_events
)
{
s
tatic
short
kqueue_to_poll_events
(
in
t
kqueue_events
)
{
//TODO: add more values?
short
poll_events
=
0
;
if
(
kqueue_events
==
EVFILT_READ
)
{
...
...
src/butil/binary_printer.cpp
View file @
9f510165
...
...
@@ -106,7 +106,7 @@ static void PrintIOBuf(Appender* appender, const IOBuf& b, size_t max_length) {
printer
.
Flush
();
char
buf
[
48
];
int
len
=
snprintf
(
buf
,
sizeof
(
buf
),
"...<skipping %"
PRIu64
" bytes>"
,
b
.
size
()
-
nw
);
(
uint64_t
)(
b
.
size
()
-
nw
)
);
appender
->
Append
(
buf
,
len
);
return
;
}
...
...
@@ -124,7 +124,7 @@ static void PrintString(Appender* appender, const StringPiece& s, size_t max_len
printer
.
Flush
();
char
buf
[
48
];
int
len
=
snprintf
(
buf
,
sizeof
(
buf
),
"...<skipping %"
PRIu64
" bytes>"
,
s
.
size
()
-
i
);
(
uint64_t
)(
s
.
size
()
-
i
)
);
appender
->
Append
(
buf
,
len
);
return
;
}
...
...
src/bvar/detail/sampler.cpp
View file @
9f510165
...
...
@@ -111,7 +111,6 @@ private:
private
:
bool
_created
;
bool
_stop
;
pid_t
_created_pid
;
int64_t
_cumulated_time_us
;
pthread_t
_tid
;
};
...
...
tools/CMakeLists.txt
View file @
9f510165
...
...
@@ -15,9 +15,6 @@
# specific language governing permissions and limitations
# under the License.
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DBRPC_WITH_GLOG=
${
WITH_GLOG_VAL
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -D__STRICT_ANSI__ -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
use_cxx11
()
set
(
EXECUTABLE_OUTPUT_PATH
${
PROJECT_BINARY_DIR
}
/output/bin
)
add_subdirectory
(
parallel_http
)
...
...
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