未验证 提交 1f76eabf 编写于 作者: Z zhaocaibei123 提交者: GitHub

fix Wtype-limits (#42676)

* fix Wtype-limits

* fix

* remove -Wno-error=type-limits
上级 11ce7eb1
...@@ -26,7 +26,7 @@ add_custom_command(TARGET ps_framework_proto POST_BUILD ...@@ -26,7 +26,7 @@ add_custom_command(TARGET ps_framework_proto POST_BUILD
COMMAND mv the_one_ps.pb.h ps.pb.h COMMAND mv the_one_ps.pb.h ps.pb.h
COMMAND mv the_one_ps.pb.cc ps.pb.cc) COMMAND mv the_one_ps.pb.cc ps.pb.cc)
set(DISTRIBUTE_COMPILE_FLAGS "-Wno-error=unused-value -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=unused-variable -Wno-error=return-type -Wno-error=unused-but-set-variable -Wno-error=type-limits -Wno-error=unknown-pragmas -Wno-error=parentheses -Wno-error=unused-result") set(DISTRIBUTE_COMPILE_FLAGS "-Wno-error=unused-value -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=unused-variable -Wno-error=return-type -Wno-error=unused-but-set-variable -Wno-error=unknown-pragmas -Wno-error=parentheses -Wno-error=unused-result")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
set(DISTRIBUTE_COMPILE_FLAGS set(DISTRIBUTE_COMPILE_FLAGS
......
...@@ -261,7 +261,7 @@ int DownpourBrpcClosure::check_response(size_t request_idx, int cmd_id) { ...@@ -261,7 +261,7 @@ int DownpourBrpcClosure::check_response(size_t request_idx, int cmd_id) {
} }
int DownpourBrpcClosure::check_save_response(size_t request_idx, int cmd_id) { int DownpourBrpcClosure::check_save_response(size_t request_idx, int cmd_id) {
uint32_t feasign_size = 0; int32_t feasign_size = 0;
if (_cntls[request_idx]->Failed()) { if (_cntls[request_idx]->Failed()) {
LOG(ERROR) << "resquest cmd_id:" << cmd_id << " failed, " LOG(ERROR) << "resquest cmd_id:" << cmd_id << " failed, "
"err:" "err:"
......
...@@ -301,11 +301,6 @@ int32_t BrpcPsService::PullDense(Table *table, const PsRequestMessage &request, ...@@ -301,11 +301,6 @@ int32_t BrpcPsService::PullDense(Table *table, const PsRequestMessage &request,
} }
CostTimer timer("pserver_server_pull_dense"); CostTimer timer("pserver_server_pull_dense");
uint32_t num = *(const uint32_t *)request.params(0).c_str(); uint32_t num = *(const uint32_t *)request.params(0).c_str();
if (num < 0) {
set_response_code(response, -1,
"PsRequestMessage.datas[0] is invalid, num must >= 0");
return 0;
}
auto res_data = butil::get_object<std::vector<float>>(); auto res_data = butil::get_object<std::vector<float>>();
res_data->resize(num * table->ValueAccesor()->GetAccessorInfo().select_size / res_data->resize(num * table->ValueAccesor()->GetAccessorInfo().select_size /
......
...@@ -196,9 +196,10 @@ TEST(downpour_feature_value_accessor_test, test_update) { ...@@ -196,9 +196,10 @@ TEST(downpour_feature_value_accessor_test, test_update) {
ptr[idx + j] = embedx_w[j]; ptr[idx + j] = embedx_w[j];
} }
idx += 8; idx += 8;
for (auto j = 0u; j < 0; ++j) { // NaiveSGD has no embedx_g2sum
ptr[idx + j] = embedx_g2sum[j]; // for (auto j = 0u; j < 0; ++j) {
} // ptr[idx + j] = embedx_g2sum[j];
// }
} }
}; };
struct DownpourSparsePushValueTest { struct DownpourSparsePushValueTest {
......
...@@ -134,9 +134,9 @@ if (WITH_PSLIB) ...@@ -134,9 +134,9 @@ if (WITH_PSLIB)
endif(WITH_PSLIB) endif(WITH_PSLIB)
if (WITH_PSCORE) if (WITH_PSCORE)
if (WITH_ARM_BRPC) if (WITH_ARM_BRPC)
set(DISTRIBUTE_COMPILE_FLAGS "-faligned-new -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=unused-variable -Wno-error=return-type -Wno-error=unused-but-set-variable -Wno-error=type-limits -Wno-error=unknown-pragmas -Wno-error=parentheses -Wno-error=unused-result") set(DISTRIBUTE_COMPILE_FLAGS "-faligned-new -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=unused-variable -Wno-error=return-type -Wno-error=unused-but-set-variable -Wno-error=unknown-pragmas -Wno-error=parentheses -Wno-error=unused-result")
else() else()
set(DISTRIBUTE_COMPILE_FLAGS "-Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=unused-variable -Wno-error=return-type -Wno-error=unused-but-set-variable -Wno-error=type-limits -Wno-error=unknown-pragmas -Wno-error=parentheses -Wno-error=unused-result") set(DISTRIBUTE_COMPILE_FLAGS "-Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=unused-variable -Wno-error=return-type -Wno-error=unused-but-set-variable -Wno-error=unknown-pragmas -Wno-error=parentheses -Wno-error=unused-result")
endif() endif()
set_source_files_properties(fleet_py.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS}) set_source_files_properties(fleet_py.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
list(APPEND PYBIND_DEPS fleet communicator index_wrapper index_sampler) list(APPEND PYBIND_DEPS fleet communicator index_wrapper index_sampler)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册