mirror of
https://github.com/xmrig/xmrig.git
synced 2025-03-12 09:37:35 +00:00
Fix warnings on Linux.
This commit is contained in:
parent
d7659b5093
commit
ebf54c6d04
2 changed files with 4 additions and 3 deletions
src
|
@ -22,6 +22,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
#include <uv.h>
|
#include <uv.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,7 +95,7 @@ static void print_threads()
|
||||||
{
|
{
|
||||||
char buf[32];
|
char buf[32];
|
||||||
if (Options::i()->affinity() != -1L) {
|
if (Options::i()->affinity() != -1L) {
|
||||||
snprintf(buf, 32, ", affinity=0x%llX", Options::i()->affinity());
|
snprintf(buf, 32, ", affinity=0x%" PRIX64, Options::i()->affinity());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
|
|
|
@ -416,8 +416,8 @@ void Client::parseResponse(int64_t id, const json_t *result, const json_t *error
|
||||||
|
|
||||||
void Client::ping()
|
void Client::ping()
|
||||||
{
|
{
|
||||||
char *req = static_cast<char*>(malloc(128));
|
char *req = static_cast<char*>(malloc(160));
|
||||||
snprintf(req, 128, "{\"id\":%" PRId64 ",\"jsonrpc\":\"2.0\",\"method\":\"keepalived\",\"params\":{\"id\":\"%s\"}}\n", m_sequence, m_rpcId);
|
snprintf(req, 160, "{\"id\":%" PRId64 ",\"jsonrpc\":\"2.0\",\"method\":\"keepalived\",\"params\":{\"id\":\"%s\"}}\n", m_sequence, m_rpcId);
|
||||||
|
|
||||||
send(req);
|
send(req);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue