mirror of https://github.com/yandex/odyssey.git
odissey: fix jenkins compilation warnings
This commit is contained in:
parent
cfa978d402
commit
ad8809acb2
|
@ -12,9 +12,9 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||||
set(CMAKE_BUILD_TYPE "Debug")
|
set(CMAKE_BUILD_TYPE "Debug")
|
||||||
endif()
|
endif()
|
||||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||||
set(CMAKE_C_FLAGS "-std=gnu99 -pedantic -Wall -Wextra -g -O2")
|
set(CMAKE_C_FLAGS "-std=gnu99 -pedantic -Wall -Wextra -Wstrict-aliasing -g -O2")
|
||||||
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||||
set(CMAKE_C_FLAGS "-std=gnu99 -pedantic -Wall -Wextra -g -O0")
|
set(CMAKE_C_FLAGS "-std=gnu99 -pedantic -Wall -Wextra -Wstrict-aliasing -g -O0")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
string(TOLOWER ${CMAKE_BUILD_TYPE} OD_VERSION_BUILD)
|
string(TOLOWER ${CMAKE_BUILD_TYPE} OD_VERSION_BUILD)
|
||||||
|
|
|
@ -187,7 +187,7 @@ error:
|
||||||
static inline void
|
static inline void
|
||||||
od_frontend_key(od_client_t *client)
|
od_frontend_key(od_client_t *client)
|
||||||
{
|
{
|
||||||
client->key.key_pid = *(uint32_t*)client->id.id;
|
client->key.key_pid = *(int32_t*)client->id.id;
|
||||||
client->key.key = 1 + rand();
|
client->key.key = 1 + rand();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,11 +113,9 @@ void od_idmgr_generate(od_idmgr_t *mgr, od_id_t *id, char *prefix)
|
||||||
mgr->seed[0] ^= seq ^ second;
|
mgr->seed[0] ^= seq ^ second;
|
||||||
mgr->seed[1] ^= seq ^ minute;
|
mgr->seed[1] ^= seq ^ minute;
|
||||||
mgr->seed[2] ^= seq ^ (hour + day + month);
|
mgr->seed[2] ^= seq ^ (hour + day + month);
|
||||||
mgr->seed[3] ^= ((uint8_t*)&seq)[0] ^ ((uint8_t*)&seq)[1];
|
mgr->seed[3] ^= ((uint8_t*)&seq)[0] ^ ((uint8_t*)&seq)[1] ^ mgr->pid;
|
||||||
mgr->seed[4] ^= ((uint8_t*)&seq)[2] ^ ((uint8_t*)&seq)[3];
|
mgr->seed[4] ^= ((uint8_t*)&seq)[2] ^ ((uint8_t*)&seq)[3] ^ mgr->uid;
|
||||||
mgr->seed[5] ^= seq ^ (uintptr_t)id;
|
mgr->seed[5] ^= seq ^ (uintptr_t)id;
|
||||||
mgr->seed[6] ^= seq ^ (mgr->pid + mgr->uid);
|
|
||||||
mgr->seed[7] ^= seq;
|
|
||||||
|
|
||||||
char *dest = id->id;
|
char *dest = id->id;
|
||||||
static const char *hex = "0123456789abcdef";
|
static const char *hex = "0123456789abcdef";
|
||||||
|
|
|
@ -54,7 +54,7 @@ od_logger_write(od_logger_t *logger, od_logger_ident_t *ident,
|
||||||
od_logfile_write(&logger->log, buf, buf_len);
|
od_logfile_write(&logger->log, buf, buf_len);
|
||||||
od_logsystem(&logger->log_system, ident->syslog_prio, buf, buf_len);
|
od_logsystem(&logger->log_system, ident->syslog_prio, buf, buf_len);
|
||||||
if (logger->log_stdout) {
|
if (logger->log_stdout) {
|
||||||
write(0, buf, buf_len);
|
(void)write(0, buf, buf_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue