Fixed const warnings with argument parser
This commit is contained in:
parent
f7c7211aad
commit
0f8c52b9ca
@ -354,7 +354,7 @@ static UINT audin_alsa_parse_addin_args(AudinALSADevice* device, const ADDIN_ARG
|
||||
{
|
||||
int status;
|
||||
DWORD flags;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
AudinALSADevice* alsa = (AudinALSADevice*)device;
|
||||
COMMAND_LINE_ARGUMENT_A audin_alsa_args[] = { { "dev", COMMAND_LINE_VALUE_REQUIRED, "<device>",
|
||||
NULL, NULL, -1, NULL, "audio device name" },
|
||||
|
@ -874,7 +874,7 @@ BOOL audin_process_addin_args(AUDIN_PLUGIN* audin, const ADDIN_ARGV* args)
|
||||
{
|
||||
int status;
|
||||
DWORD flags;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
UINT error;
|
||||
COMMAND_LINE_ARGUMENT_A audin_args[] = {
|
||||
{ "sys", COMMAND_LINE_VALUE_REQUIRED, "<subsystem>", NULL, NULL, -1, NULL, "subsystem" },
|
||||
|
@ -388,7 +388,7 @@ static UINT audin_oss_parse_addin_args(AudinOSSDevice* device, const ADDIN_ARGV*
|
||||
int status;
|
||||
char *str_num, *eptr;
|
||||
DWORD flags;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
AudinOSSDevice* oss = (AudinOSSDevice*)device;
|
||||
COMMAND_LINE_ARGUMENT_A audin_oss_args[] = { { "dev", COMMAND_LINE_VALUE_REQUIRED, "<device>",
|
||||
NULL, NULL, -1, NULL, "audio device name" },
|
||||
|
@ -468,7 +468,7 @@ static UINT audin_pulse_parse_addin_args(AudinPulseDevice* device, const ADDIN_A
|
||||
{
|
||||
int status;
|
||||
DWORD flags;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
AudinPulseDevice* pulse = (AudinPulseDevice*)device;
|
||||
COMMAND_LINE_ARGUMENT_A audin_pulse_args[] = { { "dev", COMMAND_LINE_VALUE_REQUIRED, "<device>",
|
||||
NULL, NULL, -1, NULL, "audio device name" },
|
||||
|
@ -479,7 +479,7 @@ static UINT rdpsnd_alsa_parse_addin_args(rdpsndDevicePlugin* device, const ADDIN
|
||||
{
|
||||
int status;
|
||||
DWORD flags;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
rdpsndAlsaPlugin* alsa = (rdpsndAlsaPlugin*)device;
|
||||
COMMAND_LINE_ARGUMENT_A rdpsnd_alsa_args[] = { { "dev", COMMAND_LINE_VALUE_REQUIRED, "<device>",
|
||||
NULL, NULL, -1, NULL, "device" },
|
||||
|
@ -84,7 +84,7 @@ static UINT rdpsnd_fake_parse_addin_args(rdpsndFakePlugin* fake, const ADDIN_ARG
|
||||
{
|
||||
int status;
|
||||
DWORD flags;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
COMMAND_LINE_ARGUMENT_A rdpsnd_fake_args[] = { { NULL, 0, NULL, NULL, NULL, -1, NULL, NULL } };
|
||||
flags =
|
||||
COMMAND_LINE_SIGIL_NONE | COMMAND_LINE_SEPARATOR_COLON | COMMAND_LINE_IGN_UNKNOWN_KEYWORD;
|
||||
|
@ -392,7 +392,7 @@ static int rdpsnd_oss_parse_addin_args(rdpsndDevicePlugin* device, const ADDIN_A
|
||||
int status;
|
||||
char *str_num, *eptr;
|
||||
DWORD flags;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
rdpsndOssPlugin* oss = (rdpsndOssPlugin*)device;
|
||||
COMMAND_LINE_ARGUMENT_A rdpsnd_oss_args[] = { { "dev", COMMAND_LINE_VALUE_REQUIRED, "<device>",
|
||||
NULL, NULL, -1, NULL, "device" },
|
||||
|
@ -537,7 +537,7 @@ static UINT rdpsnd_pulse_parse_addin_args(rdpsndDevicePlugin* device, const ADDI
|
||||
{
|
||||
int status;
|
||||
DWORD flags;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
rdpsndPulsePlugin* pulse = (rdpsndPulsePlugin*)device;
|
||||
COMMAND_LINE_ARGUMENT_A rdpsnd_pulse_args[] = { { "dev", COMMAND_LINE_VALUE_REQUIRED,
|
||||
"<device>", NULL, NULL, -1, NULL, "device" },
|
||||
|
@ -846,7 +846,7 @@ static UINT rdpsnd_process_addin_args(rdpsndPlugin* rdpsnd, const ADDIN_ARGV* ar
|
||||
{
|
||||
int status;
|
||||
DWORD flags;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
COMMAND_LINE_ARGUMENT_A rdpsnd_args[] = {
|
||||
{ "sys", COMMAND_LINE_VALUE_REQUIRED, "<subsystem>", NULL, NULL, -1, NULL, "subsystem" },
|
||||
{ "dev", COMMAND_LINE_VALUE_REQUIRED, "<device>", NULL, NULL, -1, NULL, "device" },
|
||||
|
@ -813,7 +813,7 @@ static UINT urbdrc_process_addin_args(URBDRC_PLUGIN* urbdrc, const ADDIN_ARGV* a
|
||||
|
||||
const DWORD flags =
|
||||
COMMAND_LINE_SIGIL_NONE | COMMAND_LINE_SEPARATOR_COLON | COMMAND_LINE_IGN_UNKNOWN_KEYWORD;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
status =
|
||||
CommandLineParseArgumentsA(args->argc, args->argv, urbdrc_args, flags, urbdrc, NULL, NULL);
|
||||
|
||||
|
@ -506,7 +506,7 @@ static BOOL xf_event_KeyPress(xfContext* xfc, const XKeyEvent* event, BOOL app)
|
||||
char str[256];
|
||||
WINPR_UNUSED(app);
|
||||
XLookupString((XKeyEvent*)event, str, sizeof(str), &keysym, NULL);
|
||||
xf_keyboard_key_press(xfc, event->keycode, keysym);
|
||||
xf_keyboard_key_press(xfc, event, keysym);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -516,7 +516,7 @@ static BOOL xf_event_KeyRelease(xfContext* xfc, const XKeyEvent* event, BOOL app
|
||||
char str[256];
|
||||
WINPR_UNUSED(app);
|
||||
XLookupString((XKeyEvent*)event, str, sizeof(str), &keysym, NULL);
|
||||
xf_keyboard_key_release(xfc, event->keycode, keysym);
|
||||
xf_keyboard_key_release(xfc, event, keysym);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1000,9 +1000,10 @@ static BOOL xf_gdi_update_screen(xfContext* xfc, const BYTE* pSrcData, UINT32 sc
|
||||
UINT32 top = rects[i].top;
|
||||
UINT32 width = rects[i].right - rects[i].left;
|
||||
UINT32 height = rects[i].bottom - rects[i].top;
|
||||
BYTE* src = pSrcData + top * scanline + bpp * left;
|
||||
image = XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0, src, width, height,
|
||||
xfc->scanline_pad, scanline);
|
||||
const BYTE* src = pSrcData + top * scanline + bpp * left;
|
||||
image = XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0,
|
||||
(char*)/* API does not modify */ src, width, height, xfc->scanline_pad,
|
||||
scanline);
|
||||
|
||||
if (!image)
|
||||
break;
|
||||
|
@ -227,7 +227,7 @@ static BOOL xf_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, BOOL pr
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL _xf_Pointer_GetCursorForCurrentScale(rdpContext* context, rdpPointer* pointer,
|
||||
static BOOL _xf_Pointer_GetCursorForCurrentScale(rdpContext* context, const rdpPointer* pointer,
|
||||
Cursor* cursor)
|
||||
{
|
||||
#ifdef WITH_XCURSOR
|
||||
@ -451,7 +451,7 @@ static BOOL xf_Pointer_Set(rdpContext* context, const rdpPointer* pointer)
|
||||
#ifdef WITH_XCURSOR
|
||||
xfContext* xfc = (xfContext*)context;
|
||||
Window handle = xf_Pointer_get_window(xfc);
|
||||
xfc->pointer = (const xfPointer*)pointer;
|
||||
xfc->pointer = (xfPointer*)pointer;
|
||||
|
||||
/* in RemoteApp mode, window can be null if none has had focus */
|
||||
|
||||
|
@ -142,27 +142,33 @@ void xf_keyboard_free(xfContext* xfc)
|
||||
xf_keyboard_action_script_free(xfc);
|
||||
}
|
||||
|
||||
void xf_keyboard_key_press(xfContext* xfc, BYTE keycode, KeySym keysym)
|
||||
void xf_keyboard_key_press(xfContext* xfc, const XKeyEvent* event, KeySym keysym)
|
||||
{
|
||||
if (keycode < 8)
|
||||
WINPR_ASSERT(xfc);
|
||||
WINPR_ASSERT(event);
|
||||
|
||||
if (event->keycode < 8)
|
||||
return;
|
||||
|
||||
xfc->KeyboardState[keycode] = TRUE;
|
||||
xfc->KeyboardState[event->keycode] = TRUE;
|
||||
|
||||
if (xf_keyboard_handle_special_keys(xfc, keysym))
|
||||
return;
|
||||
|
||||
xf_keyboard_send_key(xfc, TRUE, keycode);
|
||||
xf_keyboard_send_key(xfc, TRUE, event->keycode);
|
||||
}
|
||||
|
||||
void xf_keyboard_key_release(xfContext* xfc, BYTE keycode, KeySym keysym)
|
||||
void xf_keyboard_key_release(xfContext* xfc, const XKeyEvent* event, KeySym keysym)
|
||||
{
|
||||
if (keycode < 8)
|
||||
WINPR_ASSERT(xfc);
|
||||
WINPR_ASSERT(event);
|
||||
|
||||
if (event->keycode < 8)
|
||||
return;
|
||||
|
||||
xfc->KeyboardState[keycode] = FALSE;
|
||||
xfc->KeyboardState[event->keycode] = FALSE;
|
||||
xf_keyboard_handle_special_keys_release(xfc, keysym);
|
||||
xf_keyboard_send_key(xfc, FALSE, keycode);
|
||||
xf_keyboard_send_key(xfc, FALSE, event->keycode);
|
||||
}
|
||||
|
||||
void xf_keyboard_release_all_keypress(xfContext* xfc)
|
||||
|
@ -45,8 +45,9 @@ typedef struct _XF_MODIFIER_KEYS XF_MODIFIER_KEYS;
|
||||
BOOL xf_keyboard_init(xfContext* xfc);
|
||||
void xf_keyboard_free(xfContext* xfc);
|
||||
|
||||
void xf_keyboard_key_press(xfContext* xfc, BYTE keycode, KeySym keysym);
|
||||
void xf_keyboard_key_release(xfContext* xfc, BYTE keycode, KeySym keysym);
|
||||
void xf_keyboard_key_press(xfContext* xfc, const XKeyEvent* event, KeySym keysym);
|
||||
void xf_keyboard_key_release(xfContext* xfc, const XKeyEvent* event, KeySym keysym);
|
||||
|
||||
void xf_keyboard_release_all_keypress(xfContext* xfc);
|
||||
BOOL xf_keyboard_key_pressed(xfContext* xfc, KeySym keysym);
|
||||
void xf_keyboard_send_key(xfContext* xfc, BOOL down, BYTE keycode);
|
||||
|
@ -354,7 +354,7 @@ static size_t print_description(const char* text, size_t start_offset, size_t cu
|
||||
return current;
|
||||
}
|
||||
|
||||
static void freerdp_client_print_command_line_args(COMMAND_LINE_ARGUMENT_A* arg)
|
||||
static void freerdp_client_print_command_line_args(const COMMAND_LINE_ARGUMENT_A* arg)
|
||||
{
|
||||
if (!arg)
|
||||
return;
|
||||
@ -1240,7 +1240,7 @@ static int freerdp_detect_windows_style_command_line_syntax(int argc, char** arg
|
||||
int status;
|
||||
DWORD flags;
|
||||
int detect_status;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
COMMAND_LINE_ARGUMENT_A largs[ARRAYSIZE(args)];
|
||||
memcpy(largs, args, sizeof(args));
|
||||
|
||||
@ -1283,7 +1283,7 @@ static int freerdp_detect_posix_style_command_line_syntax(int argc, char** argv,
|
||||
int status;
|
||||
DWORD flags;
|
||||
int detect_status;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
COMMAND_LINE_ARGUMENT_A largs[ARRAYSIZE(args)];
|
||||
memcpy(largs, args, sizeof(args));
|
||||
|
||||
@ -1378,7 +1378,7 @@ int freerdp_client_settings_command_line_status_print_ex(rdpSettings* settings,
|
||||
int argc, char** argv,
|
||||
COMMAND_LINE_ARGUMENT_A* custom)
|
||||
{
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
COMMAND_LINE_ARGUMENT_A largs[ARRAYSIZE(args)];
|
||||
memcpy(largs, args, sizeof(args));
|
||||
|
||||
@ -1532,7 +1532,7 @@ static BOOL prepare_default_settings(rdpSettings* settings, const COMMAND_LINE_A
|
||||
for (x = 0; x < ARRAYSIZE(arguments); x++)
|
||||
{
|
||||
const char* arg = arguments[x];
|
||||
COMMAND_LINE_ARGUMENT_A* p = CommandLineFindArgumentA(args, arg);
|
||||
const COMMAND_LINE_ARGUMENT_A* p = CommandLineFindArgumentA(args, arg);
|
||||
if (p && (p->Flags & COMMAND_LINE_ARGUMENT_PRESENT))
|
||||
return FALSE;
|
||||
}
|
||||
@ -1552,7 +1552,7 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
DWORD flags = 0;
|
||||
BOOL promptForPassword = FALSE;
|
||||
BOOL compatibility = FALSE;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
COMMAND_LINE_ARGUMENT_A largs[ARRAYSIZE(args)];
|
||||
memcpy(largs, args, sizeof(args));
|
||||
|
||||
@ -2119,28 +2119,30 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
{
|
||||
char* p;
|
||||
char* atPtr;
|
||||
if (!arg->Value)
|
||||
const char* cur = arg->Value;
|
||||
|
||||
if (!cur)
|
||||
return COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||
/* value is [scheme://][user:password@]hostname:port */
|
||||
p = strstr(arg->Value, "://");
|
||||
p = strstr(cur, "://");
|
||||
|
||||
if (p)
|
||||
{
|
||||
*p = '\0';
|
||||
|
||||
if (_stricmp("no_proxy", arg->Value) == 0)
|
||||
if (_stricmp("no_proxy", cur) == 0)
|
||||
{
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_ProxyType,
|
||||
PROXY_TYPE_IGNORE))
|
||||
return COMMAND_LINE_ERROR_MEMORY;
|
||||
}
|
||||
if (_stricmp("http", arg->Value) == 0)
|
||||
if (_stricmp("http", cur) == 0)
|
||||
{
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_ProxyType,
|
||||
PROXY_TYPE_HTTP))
|
||||
return COMMAND_LINE_ERROR_MEMORY;
|
||||
}
|
||||
else if (_stricmp("socks5", arg->Value) == 0)
|
||||
else if (_stricmp("socks5", cur) == 0)
|
||||
{
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_ProxyType,
|
||||
PROXY_TYPE_SOCKS))
|
||||
@ -2152,11 +2154,11 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
return COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||
}
|
||||
|
||||
arg->Value = p + 3;
|
||||
cur = p + 3;
|
||||
}
|
||||
|
||||
/* arg->Value is now [user:password@]hostname:port */
|
||||
atPtr = strrchr(arg->Value, '@');
|
||||
/* cur is now [user:password@]hostname:port */
|
||||
atPtr = strrchr(cur, '@');
|
||||
|
||||
if (atPtr)
|
||||
{
|
||||
@ -2167,7 +2169,7 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
* ^
|
||||
* colonPtr
|
||||
*/
|
||||
char* colonPtr = strchr(arg->Value, ':');
|
||||
char* colonPtr = strchr(cur, ':');
|
||||
|
||||
if (!colonPtr || (colonPtr > atPtr))
|
||||
{
|
||||
@ -2178,7 +2180,7 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
}
|
||||
|
||||
*colonPtr = '\0';
|
||||
if (!freerdp_settings_set_string(settings, FreeRDP_ProxyUsername, arg->Value))
|
||||
if (!freerdp_settings_set_string(settings, FreeRDP_ProxyUsername, cur))
|
||||
{
|
||||
WLog_ERR(TAG, "unable to allocate proxy username");
|
||||
return COMMAND_LINE_ERROR_MEMORY;
|
||||
@ -2192,10 +2194,10 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
return COMMAND_LINE_ERROR_MEMORY;
|
||||
}
|
||||
|
||||
arg->Value = atPtr + 1;
|
||||
cur = atPtr + 1;
|
||||
}
|
||||
|
||||
p = strchr(arg->Value, ':');
|
||||
p = strchr(cur, ':');
|
||||
|
||||
if (p)
|
||||
{
|
||||
@ -2205,16 +2207,16 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
if (!value_to_int(&p[1], &val, 0, UINT16_MAX))
|
||||
return COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||
|
||||
length = (size_t)(p - arg->Value);
|
||||
length = (size_t)(p - cur);
|
||||
if (!freerdp_settings_set_uint16(settings, FreeRDP_ProxyPort, val))
|
||||
return FALSE;
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
p = strchr(arg->Value, '/');
|
||||
p = strchr(cur, '/');
|
||||
if (p)
|
||||
*p = '\0';
|
||||
if (!freerdp_settings_set_string(settings, FreeRDP_ProxyHostname, arg->Value))
|
||||
if (!freerdp_settings_set_string(settings, FreeRDP_ProxyHostname, cur))
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
|
@ -413,7 +413,7 @@ int freerdp_detect_old_command_line_syntax(int argc, char** argv, size_t* count)
|
||||
DWORD flags;
|
||||
int detect_status;
|
||||
rdpSettings* settings;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
COMMAND_LINE_ARGUMENT_A largs[ARRAYSIZE(old_args)];
|
||||
memcpy(largs, old_args, sizeof(old_args));
|
||||
|
||||
@ -478,7 +478,7 @@ int freerdp_client_parse_old_command_line_arguments(int argc, char** argv, rdpSe
|
||||
char* str;
|
||||
int status;
|
||||
DWORD flags;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
COMMAND_LINE_ARGUMENT_A largs[ARRAYSIZE(old_args)];
|
||||
memcpy(largs, old_args, sizeof(old_args));
|
||||
|
||||
|
@ -72,7 +72,8 @@ static pstatus_t sse2_yCbCrToRGB_16s16s_P3P3(const INT16* const pSrc[3], int src
|
||||
const prim_size_t* roi) /* region of interest */
|
||||
{
|
||||
__m128i zero, max, r_cr, g_cb, g_cr, b_cb, c4096;
|
||||
__m128i *y_buf, *cb_buf, *cr_buf, *r_buf, *g_buf, *b_buf;
|
||||
const __m128i *y_buf, *cb_buf, *cr_buf;
|
||||
__m128i *r_buf, *g_buf, *b_buf;
|
||||
UINT32 yp;
|
||||
int srcbump, dstbump, imax;
|
||||
|
||||
@ -600,7 +601,8 @@ static pstatus_t sse2_RGBToYCbCr_16s16s_P3P3(const INT16* const pSrc[3], int src
|
||||
const prim_size_t* roi) /* region of interest */
|
||||
{
|
||||
__m128i min, max, y_r, y_g, y_b, cb_r, cb_g, cb_b, cr_r, cr_g, cr_b;
|
||||
__m128i *r_buf, *g_buf, *b_buf, *y_buf, *cb_buf, *cr_buf;
|
||||
const __m128i *r_buf, *g_buf, *b_buf;
|
||||
__m128i *y_buf, *cb_buf, *cr_buf;
|
||||
UINT32 yp;
|
||||
int srcbump, dstbump, imax;
|
||||
|
||||
|
@ -85,13 +85,13 @@ static pstatus_t ssse3_sign_16s(const INT16* pSrc, INT16* pDst, UINT32 len)
|
||||
xmm1 = _mm_sign_epi16(xmm1, xmm5);
|
||||
xmm2 = _mm_sign_epi16(xmm2, xmm6);
|
||||
xmm3 = _mm_sign_epi16(xmm3, xmm7);
|
||||
_mm_store_si128((const __m128i*)dptr, xmm0);
|
||||
_mm_store_si128((__m128i*)dptr, xmm0);
|
||||
dptr += 8;
|
||||
_mm_store_si128((const __m128i*)dptr, xmm1);
|
||||
_mm_store_si128((__m128i*)dptr, xmm1);
|
||||
dptr += 8;
|
||||
_mm_store_si128((const __m128i*)dptr, xmm2);
|
||||
_mm_store_si128((__m128i*)dptr, xmm2);
|
||||
dptr += 8;
|
||||
_mm_store_si128((const __m128i*)dptr, xmm3);
|
||||
_mm_store_si128((__m128i*)dptr, xmm3);
|
||||
dptr += 8;
|
||||
}
|
||||
}
|
||||
@ -117,13 +117,13 @@ static pstatus_t ssse3_sign_16s(const INT16* pSrc, INT16* pDst, UINT32 len)
|
||||
xmm1 = _mm_sign_epi16(xmm1, xmm5);
|
||||
xmm2 = _mm_sign_epi16(xmm2, xmm6);
|
||||
xmm3 = _mm_sign_epi16(xmm3, xmm7);
|
||||
_mm_store_si128((const __m128i*)dptr, xmm0);
|
||||
_mm_store_si128((__m128i*)dptr, xmm0);
|
||||
dptr += 8;
|
||||
_mm_store_si128((const __m128i*)dptr, xmm1);
|
||||
_mm_store_si128((__m128i*)dptr, xmm1);
|
||||
dptr += 8;
|
||||
_mm_store_si128((const __m128i*)dptr, xmm2);
|
||||
_mm_store_si128((__m128i*)dptr, xmm2);
|
||||
dptr += 8;
|
||||
_mm_store_si128((const __m128i*)dptr, xmm3);
|
||||
_mm_store_si128((__m128i*)dptr, xmm3);
|
||||
dptr += 8;
|
||||
}
|
||||
}
|
||||
|
@ -610,7 +610,7 @@ size_t pf_config_modules_count(const proxyConfig* config)
|
||||
const char** pf_config_modules(const proxyConfig* config)
|
||||
{
|
||||
WINPR_ASSERT(config);
|
||||
return config->Modules;
|
||||
return (const char**)config->Modules;
|
||||
}
|
||||
|
||||
static BOOL pf_config_copy_string(char** dst, const char* src)
|
||||
|
@ -52,7 +52,7 @@ static int shadow_server_print_command_line_help(int argc, char** argv,
|
||||
{
|
||||
char* str;
|
||||
size_t length;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
if ((argc < 1) || !largs || !argv)
|
||||
return -1;
|
||||
|
||||
@ -152,7 +152,7 @@ int shadow_server_parse_command_line(rdpShadowServer* server, int argc, char** a
|
||||
{
|
||||
int status;
|
||||
DWORD flags;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
rdpSettings* settings = server->settings;
|
||||
|
||||
if ((argc < 2) || !argv || !cargs)
|
||||
|
@ -152,13 +152,13 @@ extern "C"
|
||||
void* context, COMMAND_LINE_PRE_FILTER_FN_W preFilter,
|
||||
COMMAND_LINE_POST_FILTER_FN_W postFilter);
|
||||
|
||||
WINPR_API COMMAND_LINE_ARGUMENT_A* CommandLineFindArgumentA(COMMAND_LINE_ARGUMENT_A* options,
|
||||
LPCSTR Name);
|
||||
WINPR_API COMMAND_LINE_ARGUMENT_W* CommandLineFindArgumentW(COMMAND_LINE_ARGUMENT_W* options,
|
||||
LPCWSTR Name);
|
||||
WINPR_API const COMMAND_LINE_ARGUMENT_A*
|
||||
CommandLineFindArgumentA(const COMMAND_LINE_ARGUMENT_A* options, LPCSTR Name);
|
||||
WINPR_API const COMMAND_LINE_ARGUMENT_W*
|
||||
CommandLineFindArgumentW(const COMMAND_LINE_ARGUMENT_W* options, LPCWSTR Name);
|
||||
|
||||
WINPR_API COMMAND_LINE_ARGUMENT_A*
|
||||
CommandLineFindNextArgumentA(COMMAND_LINE_ARGUMENT_A* argument);
|
||||
WINPR_API const COMMAND_LINE_ARGUMENT_A*
|
||||
CommandLineFindNextArgumentA(const COMMAND_LINE_ARGUMENT_A* argument);
|
||||
|
||||
WINPR_API char** CommandLineParseCommaSeparatedValues(const char* list, size_t* count);
|
||||
|
||||
|
@ -87,7 +87,7 @@ static void NdrPrintParamAttributes(PARAM_ATTRIBUTES attributes)
|
||||
}
|
||||
|
||||
static void NdrProcessParam(PMIDL_STUB_MESSAGE pStubMsg, NDR_PHASE phase, unsigned char* pMemory,
|
||||
NDR_PARAM* param)
|
||||
const NDR_PARAM* param)
|
||||
{
|
||||
unsigned char type;
|
||||
PFORMAT_STRING pFormat;
|
||||
|
@ -228,7 +228,7 @@ void NdrComplexStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMem
|
||||
unsigned char alignment;
|
||||
unsigned short memory_size;
|
||||
const unsigned char* pointer_layout;
|
||||
unsigned char* conformant_array_description;
|
||||
const unsigned char* conformant_array_description;
|
||||
unsigned short offset_to_pointer_layout;
|
||||
unsigned short offset_to_conformant_array_description;
|
||||
type = pFormat[0];
|
||||
|
@ -22,7 +22,7 @@
|
||||
#endif
|
||||
|
||||
#include <winpr/crt.h>
|
||||
|
||||
#include <winpr/assert.h>
|
||||
#include <winpr/cmdline.h>
|
||||
|
||||
#include "../log.h"
|
||||
@ -422,9 +422,13 @@ int CommandLineClearArgumentsW(COMMAND_LINE_ARGUMENT_W* options)
|
||||
return 0;
|
||||
}
|
||||
|
||||
COMMAND_LINE_ARGUMENT_A* CommandLineFindArgumentA(COMMAND_LINE_ARGUMENT_A* options, LPCSTR Name)
|
||||
const COMMAND_LINE_ARGUMENT_A* CommandLineFindArgumentA(const COMMAND_LINE_ARGUMENT_A* options,
|
||||
LPCSTR Name)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
WINPR_ASSERT(options);
|
||||
WINPR_ASSERT(Name);
|
||||
|
||||
for (i = 0; options[i].Name != NULL; i++)
|
||||
{
|
||||
@ -441,9 +445,13 @@ COMMAND_LINE_ARGUMENT_A* CommandLineFindArgumentA(COMMAND_LINE_ARGUMENT_A* optio
|
||||
return NULL;
|
||||
}
|
||||
|
||||
COMMAND_LINE_ARGUMENT_W* CommandLineFindArgumentW(COMMAND_LINE_ARGUMENT_W* options, LPCWSTR Name)
|
||||
const COMMAND_LINE_ARGUMENT_W* CommandLineFindArgumentW(const COMMAND_LINE_ARGUMENT_W* options,
|
||||
LPCWSTR Name)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
WINPR_ASSERT(options);
|
||||
WINPR_ASSERT(Name);
|
||||
|
||||
for (i = 0; options[i].Name != NULL; i++)
|
||||
{
|
||||
@ -460,9 +468,9 @@ COMMAND_LINE_ARGUMENT_W* CommandLineFindArgumentW(COMMAND_LINE_ARGUMENT_W* optio
|
||||
return NULL;
|
||||
}
|
||||
|
||||
COMMAND_LINE_ARGUMENT_A* CommandLineFindNextArgumentA(COMMAND_LINE_ARGUMENT_A* argument)
|
||||
const COMMAND_LINE_ARGUMENT_A* CommandLineFindNextArgumentA(const COMMAND_LINE_ARGUMENT_A* argument)
|
||||
{
|
||||
COMMAND_LINE_ARGUMENT_A* nextArgument;
|
||||
const COMMAND_LINE_ARGUMENT_A* nextArgument;
|
||||
|
||||
if (!argument || !argument->Name)
|
||||
return NULL;
|
||||
|
@ -124,7 +124,7 @@ static char* makecert_read_str(BIO* bio, size_t* pOffset)
|
||||
static int makecert_print_command_line_help(COMMAND_LINE_ARGUMENT_A* args, int argc, char** argv)
|
||||
{
|
||||
char* str;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
|
||||
if (!argv || (argc < 1))
|
||||
return -1;
|
||||
@ -280,7 +280,7 @@ static int makecert_context_parse_arguments(MAKECERT_CONTEXT* context,
|
||||
{
|
||||
int status;
|
||||
DWORD flags;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
|
||||
if (!context || !argv || (argc < 0))
|
||||
return -1;
|
||||
@ -838,7 +838,7 @@ int makecert_context_process(MAKECERT_CONTEXT* context, int argc, char** argv)
|
||||
long serial = 0;
|
||||
X509_NAME* name = NULL;
|
||||
const EVP_MD* md = NULL;
|
||||
COMMAND_LINE_ARGUMENT_A* arg;
|
||||
const COMMAND_LINE_ARGUMENT_A* arg;
|
||||
int ret;
|
||||
ret = makecert_context_parse_arguments(context, args, argc, argv);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user