mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-24 22:43:35 +00:00
windows: fix compile warnings
This commit is contained in:
parent
bda8c50e97
commit
45996a73ce
@ -74,7 +74,7 @@ static uint32_t btstack_run_loop_windows_get_time_ms(void){
|
|||||||
SystemTimeToFileTime(&system_time, &file_time);
|
SystemTimeToFileTime(&system_time, &file_time);
|
||||||
now_time.LowPart = file_time.dwLowDateTime;
|
now_time.LowPart = file_time.dwLowDateTime;
|
||||||
now_time.HighPart = file_time.dwHighDateTime;
|
now_time.HighPart = file_time.dwHighDateTime;
|
||||||
uint32_t time_ms = (now_time.QuadPart - start_time.QuadPart) / 10000;
|
uint32_t time_ms = (uint32_t)((now_time.QuadPart - start_time.QuadPart) / 10000);
|
||||||
log_debug("btstack_run_loop_windows_get_time_ms: %u", time_ms);
|
log_debug("btstack_run_loop_windows_get_time_ms: %u", time_ms);
|
||||||
return time_ms;
|
return time_ms;
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@ static void btstack_run_loop_windows_execute(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// wait for timeout or data source to become ready
|
// wait for timeout or data source to become ready
|
||||||
int res;
|
DWORD res;
|
||||||
if (num_handles){
|
if (num_handles){
|
||||||
// wait for ready Events or timeout
|
// wait for ready Events or timeout
|
||||||
res = WaitForMultipleObjects(num_handles, &handles[0], 0, timeout_ms);
|
res = WaitForMultipleObjects(num_handles, &handles[0], 0, timeout_ms);
|
||||||
|
@ -64,9 +64,9 @@ static HANDLE key_processed_handle;
|
|||||||
static void (*stdin_handler)(char c);
|
static void (*stdin_handler)(char c);
|
||||||
static void (*ctrl_c_handler)(void);
|
static void (*ctrl_c_handler)(void);
|
||||||
|
|
||||||
static WINAPI DWORD stdin_reader_thread_process(void * p){
|
static DWORD WINAPI stdin_reader_thread_process(void * p){
|
||||||
while (true){
|
while (true){
|
||||||
key_read_buffer = getch();
|
key_read_buffer = _getch();
|
||||||
SignalObjectAndWait(stdin_source.source.handle, key_processed_handle, INFINITE, FALSE);
|
SignalObjectAndWait(stdin_source.source.handle, key_processed_handle, INFINITE, FALSE);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user