Use same data types as calling function prototypes.

This commit is contained in:
Biswapriyo Nath
2021-05-28 21:20:09 +05:30
committed by akallabeth
parent 4c9754b269
commit 173ab04b59
11 changed files with 28 additions and 28 deletions

View File

@@ -82,7 +82,7 @@ static UINT cliprdr_server_packet_send(CliprdrServerPrivate* cliprdr, wStream* s
size_t pos, size;
BOOL status;
UINT32 dataLen;
UINT32 written;
ULONG written;
pos = Stream_GetPosition(s);
if ((pos < 8) || (pos > UINT32_MAX))
{

View File

@@ -426,7 +426,7 @@ BOOL drive_file_seek(DRIVE_FILE* file, UINT64 Offset)
BOOL drive_file_read(DRIVE_FILE* file, BYTE* buffer, UINT32* Length)
{
UINT32 read;
DWORD read;
if (!file || !buffer || !Length)
return FALSE;
@@ -444,7 +444,7 @@ BOOL drive_file_read(DRIVE_FILE* file, BYTE* buffer, UINT32* Length)
BOOL drive_file_write(DRIVE_FILE* file, BYTE* buffer, UINT32 Length)
{
UINT32 written;
DWORD written;
if (!file || !buffer)
return FALSE;

View File

@@ -50,7 +50,7 @@ typedef struct
static int init_external_addin(Plugin* plugin)
{
SECURITY_ATTRIBUTES saAttr;
STARTUPINFO siStartInfo;
STARTUPINFOA siStartInfo; /* Using ANSI type to match CreateProcessA */
PROCESS_INFORMATION procInfo;
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
saAttr.bInheritHandle = TRUE;

View File

@@ -2074,7 +2074,7 @@ LONG smartcard_pack_list_reader_groups_return(SMARTCARD_DEVICE* smartcard, wStre
{
LONG status;
DWORD cBytes = ret->cBytes;
DWORD index = 0;
UINT32 index = 0;
smartcard_trace_list_reader_groups_return(smartcard, ret, unicode);
if (ret->ReturnCode != SCARD_S_SUCCESS)
@@ -2138,7 +2138,7 @@ LONG smartcard_pack_list_readers_return(SMARTCARD_DEVICE* smartcard, wStream* s,
const ListReaders_Return* ret, BOOL unicode)
{
LONG status;
DWORD index = 0;
UINT32 index = 0;
UINT32 size = unicode ? sizeof(WCHAR) : sizeof(CHAR);
size *= ret->cBytes;
@@ -2687,7 +2687,7 @@ LONG smartcard_pack_state_return(SMARTCARD_DEVICE* smartcard, wStream* s, const
{
LONG status;
DWORD cbAtrLen = ret->cbAtrLen;
DWORD index = 0;
UINT32 index = 0;
smartcard_trace_state_return(smartcard, ret);
if (ret->ReturnCode != SCARD_S_SUCCESS)
@@ -2744,7 +2744,7 @@ LONG smartcard_pack_status_return(SMARTCARD_DEVICE* smartcard, wStream* s, const
BOOL unicode)
{
LONG status;
DWORD index = 0;
UINT32 index = 0;
DWORD cBytes = ret->cBytes;
smartcard_trace_status_return(smartcard, ret, unicode);
@@ -2813,7 +2813,7 @@ LONG smartcard_pack_get_attrib_return(SMARTCARD_DEVICE* smartcard, wStream* s,
{
LONG status;
DWORD cbAttrLen;
DWORD index = 0;
UINT32 index = 0;
smartcard_trace_get_attrib_return(smartcard, ret, dwAttrId);
if (!Stream_EnsureRemainingCapacity(s, 4))
@@ -2892,7 +2892,7 @@ LONG smartcard_pack_control_return(SMARTCARD_DEVICE* smartcard, wStream* s,
{
LONG status;
DWORD cbDataLen = ret->cbOutBufferSize;
DWORD index = 0;
UINT32 index = 0;
smartcard_trace_control_return(smartcard, ret);
if (ret->ReturnCode != SCARD_S_SUCCESS)
@@ -3149,7 +3149,7 @@ LONG smartcard_pack_transmit_return(SMARTCARD_DEVICE* smartcard, wStream* s,
const Transmit_Return* ret)
{
LONG status;
DWORD index = 0;
UINT32 index = 0;
LONG error;
UINT32 cbRecvLength = ret->cbRecvLength;
UINT32 cbRecvPci = ret->pioRecvPci ? ret->pioRecvPci->cbPciLength : 0;
@@ -3796,7 +3796,7 @@ LONG smartcard_pack_locate_cards_return(SMARTCARD_DEVICE* smartcard, wStream* s,
{
LONG status;
DWORD cbDataLen = ret->cReaders;
DWORD index = 0;
UINT32 index = 0;
smartcard_trace_locate_cards_return(smartcard, ret);
if (ret->ReturnCode != SCARD_S_SUCCESS)
@@ -3824,7 +3824,7 @@ LONG smartcard_pack_get_reader_icon_return(SMARTCARD_DEVICE* smartcard, wStream*
const GetReaderIcon_Return* ret)
{
LONG status;
DWORD index = 0;
UINT32 index = 0;
DWORD cbDataLen = ret->cbDataLen;
smartcard_trace_get_reader_icon_return(smartcard, ret);
if (ret->ReturnCode != SCARD_S_SUCCESS)
@@ -3868,7 +3868,7 @@ LONG smartcard_pack_read_cache_return(SMARTCARD_DEVICE* smartcard, wStream* s,
const ReadCache_Return* ret)
{
LONG status;
DWORD index = 0;
UINT32 index = 0;
DWORD cbDataLen = ret->cbDataLen;
smartcard_trace_read_cache_return(smartcard, ret);
if (ret->ReturnCode != SCARD_S_SUCCESS)

View File

@@ -1330,7 +1330,7 @@ UINT cliprdr_send_request_filecontents(wfClipboard* clipboard, const void* strea
if (!clipboard || !clipboard->context || !clipboard->context->ClientFileContentsRequest)
return ERROR_INTERNAL_ERROR;
fileContentsRequest.streamId = (UINT32)streamid;
fileContentsRequest.streamId = (UINT32)(ULONG_PTR)streamid;
fileContentsRequest.listIndex = index;
fileContentsRequest.dwFlags = flag;
fileContentsRequest.nPositionLow = positionlow;

View File

@@ -125,7 +125,7 @@ static BOOL floatbar_animation(wfFloatBar* const floatbar, const BOOL show)
floatbar->animating = timer;
if (SetTimer(floatbar->hwnd, timer, USER_TIMER_MINIMUM, NULL) == NULL)
if (SetTimer(floatbar->hwnd, timer, USER_TIMER_MINIMUM, NULL) == 0)
{
DWORD err = GetLastError();
WLog_ERR(TAG, "SetTimer failed with %08" PRIx32, err);
@@ -142,7 +142,7 @@ static BOOL floatbar_trigger_hide(wfFloatBar* floatbar)
if (!floatbar->locked && floatbar->shown)
{
if (SetTimer(floatbar->hwnd, TIMER_HIDE, 3000, NULL) == NULL)
if (SetTimer(floatbar->hwnd, TIMER_HIDE, 3000, NULL) == 0)
{
DWORD err = GetLastError();
WLog_ERR(TAG, "SetTimer failed with %08" PRIx32, err);

View File

@@ -480,8 +480,8 @@ static BOOL wf_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt)
HBRUSH brush;
HBRUSH org_brush;
int org_bkmode;
UINT32 fgcolor;
UINT32 bgcolor;
COLORREF fgcolor;
COLORREF bgcolor;
COLORREF org_bkcolor;
COLORREF org_textcolor;
BOOL rc;
@@ -536,7 +536,7 @@ static BOOL wf_gdi_opaque_rect(rdpContext* context, const OPAQUE_RECT_ORDER* opa
{
RECT rect;
HBRUSH brush;
UINT32 brush_color;
COLORREF brush_color;
wfContext* wfc = (wfContext*)context;
if (!context || !opaque_rect)
@@ -566,7 +566,7 @@ static BOOL wf_gdi_multi_opaque_rect(rdpContext* context,
UINT32 i;
RECT rect;
HBRUSH brush;
UINT32 brush_color;
COLORREF brush_color;
wfContext* wfc = (wfContext*)context;
if (!context || !multi_opaque_rect)
@@ -600,7 +600,7 @@ static BOOL wf_gdi_line_to(rdpContext* context, const LINE_TO_ORDER* line_to)
HPEN pen;
HPEN org_pen;
int x, y, w, h;
UINT32 pen_color;
COLORREF pen_color;
wfContext* wfc = (wfContext*)context;
if (!context || !line_to)
@@ -634,7 +634,7 @@ static BOOL wf_gdi_polyline(rdpContext* context, const POLYLINE_ORDER* polyline)
int org_rop2;
HPEN hpen;
HPEN org_hpen;
UINT32 pen_color;
COLORREF pen_color;
wfContext* wfc = (wfContext*)context;
if (!context || !polyline)

View File

@@ -234,7 +234,7 @@ static int mf_decompress(H264_CONTEXT* h264, const BYTE* pSrcData, UINT32 SrcSiz
IMFMediaBuffer* outputBuffer = NULL;
MFT_OUTPUT_DATA_BUFFER outputDataBuffer;
H264_CONTEXT_MF* sys = (H264_CONTEXT_MF*)h264->pSystemData;
INT32* iStride = h264->iStride;
UINT32* iStride = h264->iStride;
BYTE** pYUVData = h264->pYUVData;
hr = sys->MFCreateMemoryBuffer(SrcSize, &inputBuffer);

View File

@@ -2493,7 +2493,7 @@ BOOL nla_set_state(rdpNla* nla, NLA_STATE state)
return TRUE;
}
BOOL nla_set_service_principal(rdpNla* nla, LPSTR principal)
BOOL nla_set_service_principal(rdpNla* nla, LPTSTR principal)
{
if (!nla || !principal)
return FALSE;

View File

@@ -58,7 +58,7 @@ FREERDP_LOCAL SEC_WINNT_AUTH_IDENTITY* nla_get_identity(rdpNla* nla);
FREERDP_LOCAL NLA_STATE nla_get_state(rdpNla* nla);
FREERDP_LOCAL BOOL nla_set_state(rdpNla* nla, NLA_STATE state);
FREERDP_LOCAL BOOL nla_set_service_principal(rdpNla* nla, LPSTR principal);
FREERDP_LOCAL BOOL nla_set_service_principal(rdpNla* nla, LPTSTR principal);
FREERDP_LOCAL BOOL nla_impersonate(rdpNla* nla);
FREERDP_LOCAL BOOL nla_revert_to_self(rdpNla* nla);

View File

@@ -214,8 +214,8 @@ static BOOL op_xor(UINT32* stack, UINT32* stackp)
static UINT32 process_rop(UINT32 src, UINT32 dst, UINT32 pat, const char* rop, UINT32 format)
{
DWORD stack[10] = { 0 };
DWORD stackp = 0;
UINT32 stack[10] = { 0 };
UINT32 stackp = 0;
while (*rop != '\0')
{