[warnings] fix types and guards

Fix some broken define guards and a wrong return type
This commit is contained in:
akallabeth 2024-08-29 09:25:07 +02:00
parent 1e24fcd9a4
commit 622fcc7025
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
2 changed files with 5 additions and 3 deletions

View File

@ -1188,7 +1188,7 @@ static BOOL rdg_auth_init(rdpRdg* rdg, rdpTls* tls, TCHAR* authPkg)
if (!credssp_auth_init(rdg->auth, authPkg, tls->Bindings)) if (!credssp_auth_init(rdg->auth, authPkg, tls->Bindings))
return FALSE; return FALSE;
bool doSCLogon = freerdp_settings_get_bool(settings, FreeRDP_SmartcardLogon); BOOL doSCLogon = freerdp_settings_get_bool(settings, FreeRDP_SmartcardLogon);
if (doSCLogon) if (doSCLogon)
{ {
if (!smartcard_getCert(context, &rdg->smartcard, TRUE)) if (!smartcard_getCert(context, &rdg->smartcard, TRUE))

View File

@ -611,9 +611,10 @@ static const char* flagsToStr(char* buffer, size_t size, DWORD flags)
BOOL SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes) BOOL SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes)
{ {
struct stat st;
int fd = 0;
BOOL rc = FALSE; BOOL rc = FALSE;
#ifdef WINPR_HAVE_FCNTL_H
struct stat st = { 0 };
int fd = 0;
if (dwFileAttributes & ~FILE_ATTRIBUTE_READONLY) if (dwFileAttributes & ~FILE_ATTRIBUTE_READONLY)
{ {
@ -645,6 +646,7 @@ BOOL SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes)
rc = TRUE; rc = TRUE;
fail: fail:
close(fd); close(fd);
#endif
return rc; return rc;
} }