mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[warnings] fix various compiler warnings
This commit is contained in:
@@ -1730,8 +1730,8 @@ BOOL SdlContext::update_resizeable(BOOL enable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SdlContext::SdlContext(rdpContext* context)
|
SdlContext::SdlContext(rdpContext* context)
|
||||||
: _context(context), log(WLog_Get(SDL_TAG)), update_complete(true), disp(this), clip(this),
|
: _context(context), log(WLog_Get(SDL_TAG)), update_complete(true), disp(this), input(this),
|
||||||
input(this), primary(nullptr, SDL_DestroySurface), rdp_thread_running(false)
|
clip(this), primary(nullptr, SDL_DestroySurface), rdp_thread_running(false)
|
||||||
{
|
{
|
||||||
WINPR_ASSERT(context);
|
WINPR_ASSERT(context);
|
||||||
grab_kbd_enabled = freerdp_settings_get_bool(context->settings, FreeRDP_GrabKeyboard);
|
grab_kbd_enabled = freerdp_settings_get_bool(context->settings, FreeRDP_GrabKeyboard);
|
||||||
|
|||||||
@@ -202,8 +202,6 @@ if (WITH_XFIXES)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/resources)
|
|
||||||
|
|
||||||
list(APPEND PUB_LIBS
|
list(APPEND PUB_LIBS
|
||||||
freerdp-client
|
freerdp-client
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1015,7 +1015,7 @@ static int freerdp_client_command_line_post_filter_int(void* context, COMMAND_LI
|
|||||||
size_t count = 0;
|
size_t count = 0;
|
||||||
char** ptr = CommandLineParseCommaSeparatedValues(arg->Value, &count);
|
char** ptr = CommandLineParseCommaSeparatedValues(arg->Value, &count);
|
||||||
|
|
||||||
if (!freerdp_client_add_device_channel(settings, count, (const char**)ptr))
|
if (!freerdp_client_add_device_channel(settings, count, (const char* const*)ptr))
|
||||||
status = COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
status = COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||||
if (!freerdp_settings_set_bool(settings, FreeRDP_DeviceRedirection, TRUE))
|
if (!freerdp_settings_set_bool(settings, FreeRDP_DeviceRedirection, TRUE))
|
||||||
status = COMMAND_LINE_ERROR;
|
status = COMMAND_LINE_ERROR;
|
||||||
|
|||||||
@@ -2310,7 +2310,8 @@ BOOL freerdp_client_populate_settings_from_rdp_file(const rdpFile* file, rdpSett
|
|||||||
size_t count = 0;
|
size_t count = 0;
|
||||||
|
|
||||||
char** ptr = CommandLineParseCommaSeparatedValuesEx(LOCATION_CHANNEL_NAME, NULL, &count);
|
char** ptr = CommandLineParseCommaSeparatedValuesEx(LOCATION_CHANNEL_NAME, NULL, &count);
|
||||||
const BOOL rc = freerdp_client_add_dynamic_channel(settings, count, (const char**)ptr);
|
const BOOL rc =
|
||||||
|
freerdp_client_add_dynamic_channel(settings, count, (const char* const*)ptr);
|
||||||
CommandLineParserFree(ptr);
|
CommandLineParserFree(ptr);
|
||||||
if (!rc)
|
if (!rc)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
@@ -1030,9 +1030,9 @@ static BOOL http_response_parse_header(HttpResponse* response)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int rc = http_response_parse_header_field(response, name, value);
|
const int res = http_response_parse_header_field(response, name, value);
|
||||||
*end_of_header = end_of_header_char;
|
*end_of_header = end_of_header_char;
|
||||||
if (!rc)
|
if (!res)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ static void keyboard_handle_leave(void* data, struct wl_keyboard* keyboard, uint
|
|||||||
its.it_interval.tv_nsec = 0;
|
its.it_interval.tv_nsec = 0;
|
||||||
its.it_value.tv_sec = 0;
|
its.it_value.tv_sec = 0;
|
||||||
its.it_value.tv_nsec = 0;
|
its.it_value.tv_nsec = 0;
|
||||||
timerfd_settime(input->repeat_timer_fd, 0, &its, NULL);
|
(void)timerfd_settime(input->repeat_timer_fd, 0, &its, NULL);
|
||||||
|
|
||||||
UwacPointerEnterLeaveEvent* event =
|
UwacPointerEnterLeaveEvent* event =
|
||||||
(UwacPointerEnterLeaveEvent*)UwacDisplayNewEvent(input->display, UWAC_EVENT_POINTER_LEAVE);
|
(UwacPointerEnterLeaveEvent*)UwacDisplayNewEvent(input->display, UWAC_EVENT_POINTER_LEAVE);
|
||||||
@@ -403,7 +403,7 @@ static void keyboard_handle_key(void* data, struct wl_keyboard* keyboard, uint32
|
|||||||
its.it_interval.tv_nsec = 0;
|
its.it_interval.tv_nsec = 0;
|
||||||
its.it_value.tv_sec = 0;
|
its.it_value.tv_sec = 0;
|
||||||
its.it_value.tv_nsec = 0;
|
its.it_value.tv_nsec = 0;
|
||||||
timerfd_settime(input->repeat_timer_fd, 0, &its, NULL);
|
(void)timerfd_settime(input->repeat_timer_fd, 0, &its, NULL);
|
||||||
}
|
}
|
||||||
else if (state == WL_KEYBOARD_KEY_STATE_PRESSED &&
|
else if (state == WL_KEYBOARD_KEY_STATE_PRESSED &&
|
||||||
xkb_keymap_key_repeats(input->xkb.keymap, code))
|
xkb_keymap_key_repeats(input->xkb.keymap, code))
|
||||||
@@ -415,7 +415,7 @@ static void keyboard_handle_key(void* data, struct wl_keyboard* keyboard, uint32
|
|||||||
its.it_interval.tv_nsec = input->repeat_rate_nsec;
|
its.it_interval.tv_nsec = input->repeat_rate_nsec;
|
||||||
its.it_value.tv_sec = input->repeat_delay_sec;
|
its.it_value.tv_sec = input->repeat_delay_sec;
|
||||||
its.it_value.tv_nsec = input->repeat_delay_nsec;
|
its.it_value.tv_nsec = input->repeat_delay_nsec;
|
||||||
timerfd_settime(input->repeat_timer_fd, 0, &its, NULL);
|
(void)timerfd_settime(input->repeat_timer_fd, 0, &its, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
keyEvent = (UwacKeyEvent*)UwacDisplayNewEvent(input->display, UWAC_EVENT_KEY);
|
keyEvent = (UwacKeyEvent*)UwacDisplayNewEvent(input->display, UWAC_EVENT_KEY);
|
||||||
|
|||||||
@@ -462,6 +462,8 @@ static const EVP_CIPHER* winpr_openssl_get_evp_cipher(WINPR_CIPHER_TYPE cipher)
|
|||||||
case WINPR_CIPHER_BLOWFISH_CTR:
|
case WINPR_CIPHER_BLOWFISH_CTR:
|
||||||
evp = EVP_get_cipherbyname("blowfish-ctr");
|
evp = EVP_get_cipherbyname("blowfish-ctr");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return evp;
|
return evp;
|
||||||
|
|||||||
@@ -1100,7 +1100,7 @@ WINSCARDAPI char* WINAPI SCardGetReaderStateString(DWORD dwReaderState)
|
|||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define WINSCARD_LOAD_PROC(_name, ...) \
|
#define WINSCARD_LOAD_PROC(_name) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
WINPR_PRAGMA_DIAG_PUSH \
|
WINPR_PRAGMA_DIAG_PUSH \
|
||||||
|
|||||||
@@ -553,7 +553,7 @@ exit:
|
|||||||
|
|
||||||
set_event(thread);
|
set_event(thread);
|
||||||
|
|
||||||
signal_thread_ready(thread);
|
(void)signal_thread_ready(thread);
|
||||||
|
|
||||||
if (thread->detached || !thread->started)
|
if (thread->detached || !thread->started)
|
||||||
cleanup_handle(thread);
|
cleanup_handle(thread);
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ static void append_timezone(const char* dir, const char* name)
|
|||||||
tzset();
|
tzset();
|
||||||
const time_t t = time(NULL);
|
const time_t t = time(NULL);
|
||||||
struct tm lt = { 0 };
|
struct tm lt = { 0 };
|
||||||
localtime_r(&t, <);
|
(void)localtime_r(&t, <);
|
||||||
append(tz, lt.tm_zone);
|
append(tz, lt.tm_zone);
|
||||||
if (oldtz)
|
if (oldtz)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -393,7 +393,7 @@ static struct tm next_day(const struct tm* start)
|
|||||||
cur.tm_isdst = -1;
|
cur.tm_isdst = -1;
|
||||||
cur.tm_mday++;
|
cur.tm_mday++;
|
||||||
const time_t t = mktime(&cur);
|
const time_t t = mktime(&cur);
|
||||||
localtime_r(&t, &cur);
|
(void)localtime_r(&t, &cur);
|
||||||
return cur;
|
return cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -405,7 +405,7 @@ static struct tm adjust_time(const struct tm* start, int hour, int minute)
|
|||||||
cur.tm_sec = 0;
|
cur.tm_sec = 0;
|
||||||
cur.tm_isdst = -1;
|
cur.tm_isdst = -1;
|
||||||
const time_t t = mktime(&cur);
|
const time_t t = mktime(&cur);
|
||||||
localtime_r(&t, &cur);
|
(void)localtime_r(&t, &cur);
|
||||||
return cur;
|
return cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -426,7 +426,7 @@ static WORD get_transition_weekday_occurrence(const SYSTEMTIME* st)
|
|||||||
next.tm_mday++;
|
next.tm_mday++;
|
||||||
|
|
||||||
struct tm cur = { 0 };
|
struct tm cur = { 0 };
|
||||||
localtime_r(&t, &cur);
|
(void)localtime_r(&t, &cur);
|
||||||
|
|
||||||
if (cur.tm_mon + 1 != st->wMonth)
|
if (cur.tm_mon + 1 != st->wMonth)
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -112,8 +112,12 @@ static BOOL WLog_JournaldAppender_WriteMessage(wLog* log, wLogAppender* appender
|
|||||||
WLog_Layout_GetMessagePrefix(log, appender->Layout, message);
|
WLog_Layout_GetMessagePrefix(log, appender->Layout, message);
|
||||||
|
|
||||||
if (message->Level != WLOG_OFF)
|
if (message->Level != WLOG_OFF)
|
||||||
(void)fprintf(journaldAppender->stream, formatStr, message->PrefixString,
|
{
|
||||||
message->TextString);
|
WINPR_PRAGMA_DIAG_PUSH
|
||||||
|
WINPR_PRAGMA_DIAG_IGNORED_FORMAT_NONLITERAL(void)
|
||||||
|
fprintf(journaldAppender->stream, formatStr, message->PrefixString, message->TextString);
|
||||||
|
WINPR_PRAGMA_DIAG_POP
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user