Fixed compiler warnings.
This commit is contained in:
parent
4d03a9aa6f
commit
198bc6d9e1
@ -375,7 +375,7 @@ static BOOL xf_sw_desktop_resize(rdpContext* context)
|
||||
}
|
||||
|
||||
if (!(xfc->image = XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap,
|
||||
0, gdi->primary_buffer, gdi->width,
|
||||
0, (char*)gdi->primary_buffer, gdi->width,
|
||||
gdi->height, xfc->scanline_pad, gdi->stride)))
|
||||
{
|
||||
goto out;
|
||||
|
@ -437,7 +437,6 @@ static BOOL xf_gdi_opaque_rect(rdpContext* context,
|
||||
const OPAQUE_RECT_ORDER* opaque_rect)
|
||||
{
|
||||
XColor color;
|
||||
rdpGdi* gdi = context->gdi;
|
||||
xfContext* xfc = (xfContext*) context;
|
||||
BOOL ret = TRUE;
|
||||
|
||||
@ -467,7 +466,6 @@ static BOOL xf_gdi_multi_opaque_rect(rdpContext* context,
|
||||
UINT32 i;
|
||||
xfContext* xfc = (xfContext*) context;
|
||||
BOOL ret = TRUE;
|
||||
rdpGdi* gdi = context->gdi;
|
||||
XColor color;
|
||||
|
||||
if (!xf_decode_color(xfc, multi_opaque_rect->color, &color))
|
||||
|
@ -625,7 +625,6 @@ static BOOL freerdp_client_parse_rdp_file_buffer_unicode(rdpFile* file, const BY
|
||||
if (length > 1)
|
||||
{
|
||||
const WCHAR* beg = line;
|
||||
const WCHAR* end = &line[length - 1];
|
||||
|
||||
if (!freerdp_client_parse_rdp_file_add_line_unicode(file, line, index))
|
||||
goto fail;
|
||||
|
@ -459,8 +459,6 @@
|
||||
int freerdp_bitmap_compress(const char* srcData, int width, int height,
|
||||
wStream* s, int bpp, int byte_limit, int start_line, wStream* temp_s, int e)
|
||||
{
|
||||
char *line;
|
||||
char *last_line;
|
||||
char fom_mask[8192]; /* good for up to 64K bitmap */
|
||||
int lines_sent;
|
||||
int pixel;
|
||||
@ -485,7 +483,6 @@ int freerdp_bitmap_compress(const char* srcData, int width, int height,
|
||||
|
||||
Stream_SetPosition(temp_s, 0);
|
||||
fom_mask_len = 0;
|
||||
last_line = 0;
|
||||
lines_sent = 0;
|
||||
end = width + e;
|
||||
count = 0;
|
||||
@ -502,9 +499,10 @@ int freerdp_bitmap_compress(const char* srcData, int width, int height,
|
||||
|
||||
if ((bpp == 15) || (bpp == 16))
|
||||
{
|
||||
const char* line = srcData + width * start_line * 2;
|
||||
const char *last_line = NULL;
|
||||
mix = (bpp == 15) ? 0xBA1F : 0xFFFF;
|
||||
out_count = end * 2;
|
||||
line = srcData + width * start_line * 2;
|
||||
|
||||
while (start_line >= 0 && out_count < 32768)
|
||||
{
|
||||
@ -794,9 +792,10 @@ int freerdp_bitmap_compress(const char* srcData, int width, int height,
|
||||
}
|
||||
else if (bpp == 24)
|
||||
{
|
||||
const char* line = srcData + width * start_line * 4;
|
||||
const char *last_line = NULL;
|
||||
mix = 0xFFFFFF;
|
||||
out_count = end * 3;
|
||||
line = srcData + width * start_line * 4;
|
||||
|
||||
while (start_line >= 0 && out_count < 32768)
|
||||
{
|
||||
|
@ -2165,7 +2165,7 @@ static int test_PrimitivesYCbCr(const primitives_t* prims, UINT32 format, prim_s
|
||||
BYTE* actual1;
|
||||
BYTE* expected;
|
||||
int margin = 1;
|
||||
const INT16* pYCbCr[3];
|
||||
INT16* pYCbCr[3];
|
||||
const UINT32 srcStride = roi.width * 2;
|
||||
const UINT32 dstStride = roi.width * GetBytesPerPixel(format);
|
||||
const UINT32 srcSize = srcStride * roi.height;
|
||||
@ -2193,9 +2193,9 @@ static int test_PrimitivesYCbCr(const primitives_t* prims, UINT32 format, prim_s
|
||||
if (!pYCbCr[0] || !pYCbCr[1] || !pYCbCr[2])
|
||||
goto fail;
|
||||
|
||||
winpr_RAND(pYCbCr[0], srcSize);
|
||||
winpr_RAND(pYCbCr[1], srcSize);
|
||||
winpr_RAND(pYCbCr[2], srcSize);
|
||||
winpr_RAND((BYTE*)pYCbCr[0], srcSize);
|
||||
winpr_RAND((BYTE*)pYCbCr[1], srcSize);
|
||||
winpr_RAND((BYTE*)pYCbCr[2], srcSize);
|
||||
|
||||
if (compare)
|
||||
{
|
||||
@ -2270,9 +2270,9 @@ static int test_PrimitivesYCbCr(const primitives_t* prims, UINT32 format, prim_s
|
||||
PROFILER_PRINT(prof2);
|
||||
PROFILER_PRINT_FOOTER;
|
||||
fail:
|
||||
_aligned_free(pYCbCr[0]);
|
||||
_aligned_free(pYCbCr[1]);
|
||||
_aligned_free(pYCbCr[2]);
|
||||
_aligned_free((BYTE*)pYCbCr[0]);
|
||||
_aligned_free((BYTE*)pYCbCr[1]);
|
||||
_aligned_free((BYTE*)pYCbCr[2]);
|
||||
_aligned_free(actual);
|
||||
_aligned_free(actual1);
|
||||
PROFILER_FREE(prof);
|
||||
@ -2334,14 +2334,14 @@ int TestPrimitivesYCbCr(int argc, char* argv[])
|
||||
|
||||
do
|
||||
{
|
||||
winpr_RAND(&roi.width, sizeof(roi.width));
|
||||
winpr_RAND((BYTE*)&roi.width, sizeof(roi.width));
|
||||
roi.width %= 4096;
|
||||
}
|
||||
while (roi.width < 16);
|
||||
|
||||
do
|
||||
{
|
||||
winpr_RAND(&roi.height, sizeof(roi.height));
|
||||
winpr_RAND((BYTE*)&roi.height, sizeof(roi.height));
|
||||
roi.height %= 4096;
|
||||
}
|
||||
while (roi.height < 16);
|
||||
|
@ -47,7 +47,6 @@ static SecurityFunctionTableA* g_SspiA = NULL;
|
||||
static BOOL ShouldUseNativeSspi(void);
|
||||
static BOOL InitializeSspiModule_Native(void);
|
||||
#endif
|
||||
static void InitializeSspiModule(DWORD flags);
|
||||
|
||||
#if defined(WITH_NATIVE_SSPI)
|
||||
BOOL ShouldUseNativeSspi(void)
|
||||
@ -146,12 +145,6 @@ static BOOL CALLBACK InitializeSspiModuleInt(PINIT_ONCE once, PVOID param, PVOID
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void InitializeSspiModule(DWORD flags)
|
||||
{
|
||||
BOOL status = FALSE;
|
||||
InitOnceExecuteOnce(&g_Initialized, InitializeSspiModuleInt, &flags, NULL);
|
||||
}
|
||||
|
||||
const char* GetSecurityStatusString(SECURITY_STATUS status)
|
||||
{
|
||||
switch (status)
|
||||
|
@ -6,15 +6,11 @@
|
||||
int TestLinkedList(int argc, char* argv[])
|
||||
{
|
||||
int count;
|
||||
int number;
|
||||
wLinkedList* list;
|
||||
|
||||
list = LinkedList_New();
|
||||
|
||||
LinkedList_AddFirst(list, (void*) (size_t) 1);
|
||||
LinkedList_AddLast(list, (void*) (size_t) 2);
|
||||
LinkedList_AddLast(list, (void*) (size_t) 3);
|
||||
|
||||
LinkedList_AddFirst(list, (void*)(size_t) 1);
|
||||
LinkedList_AddLast(list, (void*)(size_t) 2);
|
||||
LinkedList_AddLast(list, (void*)(size_t) 3);
|
||||
count = LinkedList_Count(list);
|
||||
|
||||
if (count != 3)
|
||||
@ -29,14 +25,12 @@ int TestLinkedList(int argc, char* argv[])
|
||||
{
|
||||
printf("\t%"PRIuz"\n", (size_t) LinkedList_Enumerator_Current(list));
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
printf("LinkedList First: %"PRIuz" Last: %"PRIuz"\n",
|
||||
(size_t) LinkedList_First(list), (size_t) LinkedList_Last(list));
|
||||
|
||||
(size_t) LinkedList_First(list), (size_t) LinkedList_Last(list));
|
||||
LinkedList_RemoveFirst(list);
|
||||
LinkedList_RemoveLast(list);
|
||||
|
||||
count = LinkedList_Count(list);
|
||||
|
||||
if (count != 1)
|
||||
@ -51,14 +45,12 @@ int TestLinkedList(int argc, char* argv[])
|
||||
{
|
||||
printf("\t%"PRIuz"\n", (size_t) LinkedList_Enumerator_Current(list));
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
printf("LinkedList First: %"PRIuz" Last: %"PRIuz"\n",
|
||||
(size_t) LinkedList_First(list), (size_t) LinkedList_Last(list));
|
||||
|
||||
(size_t) LinkedList_First(list), (size_t) LinkedList_Last(list));
|
||||
LinkedList_RemoveFirst(list);
|
||||
LinkedList_RemoveLast(list);
|
||||
|
||||
count = LinkedList_Count(list);
|
||||
|
||||
if (count != 0)
|
||||
@ -67,10 +59,9 @@ int TestLinkedList(int argc, char* argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
LinkedList_AddFirst(list, (void*) (size_t) 4);
|
||||
LinkedList_AddLast(list, (void*) (size_t) 5);
|
||||
LinkedList_AddLast(list, (void*) (size_t) 6);
|
||||
|
||||
LinkedList_AddFirst(list, (void*)(size_t) 4);
|
||||
LinkedList_AddLast(list, (void*)(size_t) 5);
|
||||
LinkedList_AddLast(list, (void*)(size_t) 6);
|
||||
count = LinkedList_Count(list);
|
||||
|
||||
if (count != 3)
|
||||
@ -85,51 +76,47 @@ int TestLinkedList(int argc, char* argv[])
|
||||
{
|
||||
printf("\t%"PRIuz"\n", (size_t) LinkedList_Enumerator_Current(list));
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
printf("LinkedList First: %"PRIuz" Last: %"PRIuz"\n",
|
||||
(size_t) LinkedList_First(list), (size_t) LinkedList_Last(list));
|
||||
|
||||
LinkedList_Remove(list, (void*) (size_t) 5);
|
||||
|
||||
(size_t) LinkedList_First(list), (size_t) LinkedList_Last(list));
|
||||
LinkedList_Remove(list, (void*)(size_t) 5);
|
||||
LinkedList_Enumerator_Reset(list);
|
||||
|
||||
while (LinkedList_Enumerator_MoveNext(list))
|
||||
{
|
||||
printf("\t%"PRIuz"\n", (size_t) LinkedList_Enumerator_Current(list));
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
printf("LinkedList First: %"PRIuz" Last: %"PRIuz"\n",
|
||||
(size_t) LinkedList_First(list), (size_t) LinkedList_Last(list));
|
||||
|
||||
(size_t) LinkedList_First(list), (size_t) LinkedList_Last(list));
|
||||
LinkedList_Free(list);
|
||||
|
||||
/* Test enumerator robustness */
|
||||
|
||||
/* enumerator on an empty list */
|
||||
list = LinkedList_New();
|
||||
LinkedList_Enumerator_Reset(list);
|
||||
|
||||
while (LinkedList_Enumerator_MoveNext(list))
|
||||
{
|
||||
printf("\terror: %"PRIuz"\n", (size_t) LinkedList_Enumerator_Current(list));
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
LinkedList_Free(list);
|
||||
|
||||
/* Use an enumerator without reset */
|
||||
list = LinkedList_New();
|
||||
LinkedList_AddFirst(list, (void*) (size_t) 4);
|
||||
LinkedList_AddLast(list, (void*) (size_t) 5);
|
||||
LinkedList_AddLast(list, (void*) (size_t) 6);
|
||||
LinkedList_AddFirst(list, (void*)(size_t) 4);
|
||||
LinkedList_AddLast(list, (void*)(size_t) 5);
|
||||
LinkedList_AddLast(list, (void*)(size_t) 6);
|
||||
|
||||
while (LinkedList_Enumerator_MoveNext(list))
|
||||
{
|
||||
printf("\t%"PRIuz"\n", (size_t) LinkedList_Enumerator_Current(list));
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
LinkedList_Free(list);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user