Fixed warnings
This commit is contained in:
parent
cc3e28f2f1
commit
1dcc5a180a
@ -550,7 +550,6 @@ static UINT cliprdr_server_receive_temporary_directory(CliprdrServerContext* con
|
||||
WCHAR* wszTempDir;
|
||||
CLIPRDR_TEMP_DIRECTORY tempDirectory;
|
||||
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*)context->handle;
|
||||
size_t slength;
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
|
||||
WINPR_UNUSED(header);
|
||||
|
@ -311,7 +311,6 @@ static UINT parallel_process_irp(PARALLEL_DEVICE* parallel, IRP* irp)
|
||||
default:
|
||||
irp->IoStatus = STATUS_NOT_SUPPORTED;
|
||||
return irp->Complete(irp);
|
||||
break;
|
||||
}
|
||||
|
||||
return CHANNEL_RC_OK;
|
||||
|
@ -575,7 +575,6 @@ static UINT printer_process_irp(PRINTER_DEVICE* printer_dev, IRP* irp)
|
||||
default:
|
||||
irp->IoStatus = STATUS_NOT_SUPPORTED;
|
||||
return irp->Complete(irp);
|
||||
break;
|
||||
}
|
||||
|
||||
return CHANNEL_RC_OK;
|
||||
|
@ -1680,7 +1680,4 @@ UINT rail_server_handle_messages(RailServerContext* context)
|
||||
WLog_ERR(TAG, "Unknown RAIL PDU order received.");
|
||||
return ERROR_INVALID_DATA;
|
||||
}
|
||||
|
||||
Stream_SetPosition(s, 0);
|
||||
return status;
|
||||
}
|
||||
|
@ -716,7 +716,6 @@ static UINT rdpei_send_touch_event_pdu(RDPEI_CHANNEL_CALLBACK* callback,
|
||||
static UINT rdpei_recv_sc_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
{
|
||||
UINT32 features = 0;
|
||||
UINT32 size;
|
||||
UINT32 protocolVersion;
|
||||
RDPEI_PLUGIN* rdpei;
|
||||
|
||||
|
@ -1011,8 +1011,6 @@ static int libusb_udev_query_device_descriptor(IUDEVICE* idev, int offset)
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static BOOL libusb_udev_detach_kernel_driver(IUDEVICE* idev)
|
||||
|
@ -758,6 +758,7 @@ int xf_input_handle_event(xfContext* xfc, const XEvent* event)
|
||||
return xf_input_handle_event_local(xfc, event);
|
||||
}
|
||||
|
||||
#endif
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
@ -578,8 +578,6 @@ static DWORD client_cli_accept_certificate(rdpSettings* settings)
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Callback set in the rdp_freerdp structure, and used to make a certificate validation
|
||||
|
@ -762,7 +762,6 @@ static int rdg_websocket_read(BIO* bio, BYTE* pBuffer, size_t size,
|
||||
}
|
||||
}
|
||||
/* should be unreachable */
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int rdg_chuncked_read(BIO* bio, BYTE* pBuffer, size_t size,
|
||||
@ -863,7 +862,6 @@ static int rdg_chuncked_read(BIO* bio, BYTE* pBuffer, size_t size,
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int rdg_socket_read(BIO* bio, BYTE* pBuffer, size_t size,
|
||||
|
@ -671,8 +671,6 @@ size_t ber_write_integer(wStream* s, UINT32 value)
|
||||
Stream_Write_UINT32_BE(s, value);
|
||||
return 6;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t ber_write_contextual_integer(wStream* s, BYTE tag, UINT32 value)
|
||||
@ -711,8 +709,6 @@ size_t ber_sizeof_integer(UINT32 value)
|
||||
/* treat as signed integer i.e. NT/HRESULT error codes */
|
||||
return 6;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t ber_sizeof_contextual_integer(UINT32 value)
|
||||
|
@ -419,8 +419,6 @@ int er_write_integer(wStream* s, INT32 value)
|
||||
Stream_Write_UINT32_BE(s, value);
|
||||
return 5;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int er_skip_integer(INT32 value)
|
||||
@ -437,8 +435,6 @@ int er_skip_integer(INT32 value)
|
||||
{
|
||||
return _er_skip_length(4) + 5;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL er_read_integer_length(wStream* s, int* length)
|
||||
|
@ -35,9 +35,9 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__)
|
||||
#include <malloc/malloc.h>
|
||||
#elif __FreeBSD__ || __OpenBSD__
|
||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <malloc.h>
|
||||
@ -168,7 +168,7 @@ static INLINE size_t cMIN(size_t a, size_t b)
|
||||
void* _aligned_offset_recalloc(void* memblock, size_t num, size_t size, size_t alignment,
|
||||
size_t offset)
|
||||
{
|
||||
void* newMemblock = NULL;
|
||||
char* newMemblock = NULL;
|
||||
WINPR_ALIGNED_MEM* pMem = NULL;
|
||||
WINPR_ALIGNED_MEM* pNewMem = NULL;
|
||||
|
||||
|
@ -16,6 +16,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef WITH_PKCS11
|
||||
|
||||
#include <pkcs11-helper-1.0/pkcs11.h>
|
||||
|
@ -12,7 +12,7 @@ static const TCHAR testPathNotUNC[] = _T("C:\\share\\path\\file");
|
||||
int TestPathIsUNCEx(int argc, char* argv[])
|
||||
{
|
||||
BOOL status;
|
||||
LPTSTR Server;
|
||||
LPCTSTR Server;
|
||||
TCHAR Path[PATHCCH_MAX_CCH];
|
||||
|
||||
WINPR_UNUSED(argc);
|
||||
@ -22,11 +22,11 @@ int TestPathIsUNCEx(int argc, char* argv[])
|
||||
|
||||
_tcscpy(Path, testPathUNC);
|
||||
|
||||
status = PathIsUNCEx(Path, (LPCTSTR*)&Server);
|
||||
status = PathIsUNCEx(Path, &Server);
|
||||
|
||||
if (!status)
|
||||
{
|
||||
_tprintf(_T("PathIsUNCEx status: 0x%08") _T(PRIX32) _T("\n"), status);
|
||||
_tprintf(_T("PathIsUNCEx status: 0x%d\n"), status);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ int TestPathIsUNCEx(int argc, char* argv[])
|
||||
|
||||
_tcscpy(Path, testPathNotUNC);
|
||||
|
||||
status = PathIsUNCEx(Path, (LPCTSTR*)&Server);
|
||||
status = PathIsUNCEx(Path, &Server);
|
||||
|
||||
if (status)
|
||||
{
|
||||
|
@ -202,15 +202,6 @@ static HANDLE_OPS ops = { PipeIsHandled,
|
||||
static BOOL NamedPipeIsHandled(HANDLE handle)
|
||||
{
|
||||
return WINPR_HANDLE_IS_HANDLED(handle, HANDLE_TYPE_NAMED_PIPE, TRUE);
|
||||
WINPR_HANDLE* pPipe = (WINPR_HANDLE*)handle;
|
||||
|
||||
if (!pPipe || (pPipe->Type != HANDLE_TYPE_NAMED_PIPE) || (pPipe == INVALID_HANDLE_VALUE))
|
||||
{
|
||||
SetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int NamedPipeGetFd(HANDLE handle)
|
||||
|
@ -624,9 +624,11 @@ static SECURITY_STATUS SEC_ENTRY kerberos_InitializeSecurityContextA(
|
||||
PSecBuffer output_buffer = NULL;
|
||||
sspi_gss_buffer_desc input_tok = { 0 };
|
||||
sspi_gss_buffer_desc output_tok = { 0 };
|
||||
#if defined(WITH_GSSAPI)
|
||||
sspi_gss_OID actual_mech;
|
||||
sspi_gss_OID desired_mech = SSPI_GSS_C_SPNEGO_KRB5;
|
||||
UINT32 actual_services;
|
||||
#endif
|
||||
|
||||
context = (KRB_CONTEXT*)sspi_SecureHandleGetLowerPointer(phContext);
|
||||
if (!context)
|
||||
|
@ -466,7 +466,7 @@ ntlm_AcceptSecurityContext(PCredHandle phCredential, PCtxtHandle phContext, PSec
|
||||
|
||||
return SEC_E_OUT_OF_SEQUENCE;
|
||||
}
|
||||
break;
|
||||
|
||||
case NTLM_STATE_AUTHENTICATE:
|
||||
{
|
||||
if (!pInput)
|
||||
@ -498,7 +498,7 @@ ntlm_AcceptSecurityContext(PCredHandle phCredential, PCtxtHandle phContext, PSec
|
||||
|
||||
return status;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -307,12 +307,11 @@ static DWORD ThreadCleanupHandle(HANDLE handle)
|
||||
|
||||
if (!thread->joined)
|
||||
{
|
||||
int status;
|
||||
status = pthread_join(thread->thread, NULL);
|
||||
int rc = pthread_join(thread->thread, NULL);
|
||||
|
||||
if (status != 0)
|
||||
if (rc != 0)
|
||||
{
|
||||
WLog_ERR(TAG, "pthread_join failure: [%d] %s", status, strerror(status));
|
||||
WLog_ERR(TAG, "pthread_join failure: [%d] %s", rc, strerror(rc));
|
||||
goto fail;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user