Skip to content

Commit

Permalink
v0.1.0: 修正了release版本编译时的warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
xywanz committed May 29, 2020
1 parent 1be606c commit ef7cb72
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 1 deletion.
Binary file modified bin/cancel-order
Binary file not shown.
Binary file modified bin/contract-collector
Binary file not shown.
Binary file modified bin/libgrid-strategy.so
Binary file not shown.
Binary file modified bin/query-position
Binary file not shown.
Binary file modified bin/send-order
Binary file not shown.
Binary file modified bin/strategy-loader
Binary file not shown.
Binary file modified bin/trading-engine
Binary file not shown.
5 changes: 5 additions & 0 deletions include/ipc/redis.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <string>
#include <vector>

#include "utils/misc.h"

namespace ft {

using RedisReply = std::shared_ptr<redisReply>;
Expand Down Expand Up @@ -175,6 +177,7 @@ class AsyncRedisSession {
argvlen[2] = size;

auto status = redisAsyncCommandArgv(ctx_, cb, privdata, 3, argv, argvlen);
UNUSED(status);
assert(status == REDIS_OK);
}

Expand All @@ -190,6 +193,7 @@ class AsyncRedisSession {
argvlen[1] = key.length();

auto status = redisAsyncCommandArgv(ctx_, cb, privdata, 2, argv, argvlen);
UNUSED(status);
assert(status == REDIS_OK);
}

Expand All @@ -205,6 +209,7 @@ class AsyncRedisSession {
argvlen[1] = pattern.length();

auto status = redisAsyncCommandArgv(ctx_, cb, privdata, 2, argv, argvlen);
UNUSED(status);
assert(status == REDIS_OK);
}

Expand Down
2 changes: 2 additions & 0 deletions src/gateway/xtp/xtp_quote_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <vector>

#include "core/contract_table.h"
#include "utils/misc.h"

namespace ft {

Expand Down Expand Up @@ -38,6 +39,7 @@ bool XtpQuoteApi::login(const Config& config) {
try {
int ret = sscanf(config.quote_server_address.c_str(), "%[^:]://%[^:]:%d",
protocol, ip, &port);
UNUSED(ret);
assert(ret == 3);
} catch (...) {
assert(false);
Expand Down
1 change: 1 addition & 0 deletions src/gateway/xtp/xtp_trade_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ bool XtpTradeApi::login(const Config& config) {
try {
int ret = sscanf(config.trade_server_address.c_str(), "%[^:]://%[^:]:%d",
protocol, ip, &port);
UNUSED(ret);
assert(ret == 3);
} catch (...) {
assert(false);
Expand Down
2 changes: 1 addition & 1 deletion src/risk_management/fund_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int FundManager::check_order_req(const Order* order) {
assert(contract->size > 0);

double avl = account_->balance - account_->frozen - account_->margin;
double estimated;
double estimated = 0;
if (req->direction == Direction::BUY) {
estimated =
req->price * req->volume * contract->size * contract->long_margin_rate;
Expand Down

0 comments on commit ef7cb72

Please sign in to comment.