diff --git a/CMakeLists.txt b/CMakeLists.txt index 48169776dae6348ced803681b7515a222e4e45a5..8f0a0237286e77661e77ed7faa331bf15bb9bb2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_C_STANDARD 11) SET( CPACK_PACKAGE_NAME "${PROJECT_NAME}") SET( CPACK_PACKAGE_VERSION_MAJOR 4) SET( CPACK_PACKAGE_VERSION_MINOR 4) -SET( CPACK_PACKAGE_VERSION_PATCH 55) +SET( CPACK_PACKAGE_VERSION_PATCH 56) # init CellFrame SDK add_definitions("-DDAP_VERSION=\"${CPACK_PACKAGE_VERSION_MAJOR}-${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\"") diff --git a/cellframe-sdk b/cellframe-sdk index 39f0cc65878ee1a6b089f8a44edd6afff3753a66..0077fa15b62f64185ea8f1de3137261c2235bf84 160000 --- a/cellframe-sdk +++ b/cellframe-sdk @@ -1 +1 @@ -Subproject commit 39f0cc65878ee1a6b089f8a44edd6afff3753a66 +Subproject commit 0077fa15b62f64185ea8f1de3137261c2235bf84 diff --git a/sources/exh_win32.c b/sources/exh_win32.c index d01c401a0d61ca2f453cd1d9ab01972d5e3ecfa2..330cb834d24981484e9dbe1c22ef018c61fc7668 100644 --- a/sources/exh_win32.c +++ b/sources/exh_win32.c @@ -4,10 +4,11 @@ #include <stdint.h> #include <string.h> #include <stdbool.h> +#include <conio.h> #include "dap_common.h" -DWORD ExceptionFilter( EXCEPTION_POINTERS *ep ); +LONG ExceptionFilter( EXCEPTION_POINTERS *ep ); void S_SetExceptionFilter( void ) { @@ -33,7 +34,7 @@ typedef struct _EXCEPTION_RECORD { } EXCEPTION_RECORD; #endif -DWORD ExceptionFilter( EXCEPTION_POINTERS *ep ) +LONG ExceptionFilter( EXCEPTION_POINTERS *ep ) { // printf( "\r\nExceptionCode = 0x%0X[%s]\r\n", ep->ExceptionRecord->ExceptionCode, buff ); @@ -85,7 +86,7 @@ DWORD ExceptionFilter( EXCEPTION_POINTERS *ep ) HANDLE hConOut = GetStdHandle( STD_OUTPUT_HANDLE ); SetConsoleTextAttribute( hConOut, 12 ); - printf( "\r\nExceptionCode = 0x%0X[%s]\r\n", ep->ExceptionRecord->ExceptionCode, buff ); + printf( "\r\nExceptionCode = 0x%0lX[%s]\r\n", ep->ExceptionRecord->ExceptionCode, buff ); SetConsoleTextAttribute( hConOut, 7 ); diff --git a/sources/main.c b/sources/main.c index f6533e23769ac5375b77657a4c48c0954b581820..3a83681e9d0fcfc56dc30a08862328172f8a4df3 100755 --- a/sources/main.c +++ b/sources/main.c @@ -138,7 +138,7 @@ void exit_if_server_already_running( void ); static const char *s_pid_file_path = NULL; -bool dap_chain_net_srv_pay_verificator(dap_chain_tx_out_cond_t *a_cond, dap_chain_datum_tx_t *a_tx) { return true; } +bool dap_chain_net_srv_pay_verificator(dap_chain_tx_out_cond_t *a_cond, dap_chain_datum_tx_t *a_tx) { UNUSED(a_cond); UNUSED(a_tx); return true; } #ifdef __ANDROID__ int cellframe_node_Main(int argc, const char **argv) @@ -591,8 +591,8 @@ void exit_if_server_already_running( void ) { #endif if ( (pid != 0 && is_process_running(pid)) || mf ) { - log_it( L_WARNING, "Proccess %d is running, don't allow " - "to run more than one copy of DapServer, exiting...", pid ); + log_it( L_WARNING, "Proccess %"DAP_UINT64_FORMAT_U" is running, don't allow " + "to run more than one copy of DapServer, exiting...", (uint64_t)pid ); exit( -2 ); } } diff --git a/sources/main_node_cli.c b/sources/main_node_cli.c index 9d2e25a93a49fa3475b59ff5fd2b20a16d7eed85..102a42625ff5b64f43e3443c47cbeb9d110484a5 100644 --- a/sources/main_node_cli.c +++ b/sources/main_node_cli.c @@ -27,11 +27,11 @@ #include <stdlib.h> #include <string.h> +#include "dap_chain_node_cli.h" //#include "dap_client.h" #include "dap_common.h" #include "dap_file_utils.h" #include "dap_strfuncs.h" -#include "dap_chain_node_cli.h" #include "dap_app_cli.h" #include "dap_app_cli_net.h" #include "dap_app_cli_shell.h" diff --git a/sources/main_node_tool.c b/sources/main_node_tool.c index 989fee5e484a5a78299f6a7a6c553990f8983af6..5547c419e961529323168205e8aa1459813f0f30 100644 --- a/sources/main_node_tool.c +++ b/sources/main_node_tool.c @@ -99,14 +99,16 @@ #endif #undef log_it +#ifdef DAP_OS_WINDOWS +#define log_it(_log_level, string, ...) __mingw_printf(string, ##__VA_ARGS__) +#else #define log_it(_log_level, string, ...) printf(string, ##__VA_ARGS__) +#endif static int s_init( int argc, const char * argv[] ); static void s_help( ); static char s_system_ca_dir[MAX_PATH]; -static char * s_config_dir = NULL; -static char * s_log_file_path= NULL; #ifdef __ANDROID__ int cellframe_node_tool_Main(int argc, const char **argv) @@ -185,7 +187,7 @@ int main(int argc, const char **argv) if ( l_data_file ) {} } else { - log_it( L_ERROR, "Cert index %d can't be found in wallet with %lu certs inside" + log_it( L_ERROR, "Cert index %d can't be found in wallet with %zu certs inside" ,l_cert_index,l_wallet_certs_number ); s_help(); exit( -3002 ); @@ -376,6 +378,8 @@ int main(int argc, const char **argv) */ static int s_init( int argc, const char **argv ) { + UNUSED(argc); + UNUSED(argv); dap_set_appname("cellframe-node"); #ifdef _WIN32 g_sys_dir_path = dap_strdup_printf("%s/%s", regGetUsrPath(), dap_get_appname());