[warnings] fix format warnings
This commit is contained in:
parent
782f349bd7
commit
8b3f807a0a
@ -85,8 +85,13 @@ static UINT32 audin_oss_get_format(const AUDIO_FORMAT* format)
|
||||
|
||||
case 16:
|
||||
return AFMT_S16_LE;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ static void printer_cups_get_printjob_name(char* buf, size_t size, size_t id)
|
||||
WINPR_ASSERT(buf);
|
||||
WINPR_ASSERT(size > 0);
|
||||
|
||||
(void)sprintf_s(buf, size - 1, "FreeRDP Print %04d-%02d-%02d %02d-%02d-%02d - Job %" PRIdz,
|
||||
(void)sprintf_s(buf, size - 1, "FreeRDP Print %04d-%02d-%02d %02d-%02d-%02d - Job %" PRIuz,
|
||||
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec,
|
||||
id);
|
||||
}
|
||||
|
@ -972,7 +972,7 @@ static UINT printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrint
|
||||
if (!printer_dev->device.data)
|
||||
goto error_out;
|
||||
|
||||
(void)sprintf_s(printer_dev->port, sizeof(printer_dev->port), "PRN%" PRIdz, printer->id);
|
||||
(void)sprintf_s(printer_dev->port, sizeof(printer_dev->port), "PRN%" PRIuz, printer->id);
|
||||
printer_dev->device.type = RDPDR_DTYP_PRINT;
|
||||
printer_dev->device.name = printer_dev->port;
|
||||
printer_dev->device.IRPRequest = printer_irp_request;
|
||||
|
@ -338,6 +338,8 @@ static BOOL rdpsnd_alsa_format_supported(rdpsndDevicePlugin* device, const AUDIO
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -85,6 +85,8 @@ static int rdpsnd_oss_get_format(const AUDIO_FORMAT* format)
|
||||
return AFMT_S16_LE;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -390,7 +390,7 @@ static BOOL rdpsnd_apply_volume(rdpsndPlugin* rdpsnd)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL rdpsnd_ensure_device_is_open(rdpsndPlugin* rdpsnd, UINT32 wFormatNo,
|
||||
static BOOL rdpsnd_ensure_device_is_open(rdpsndPlugin* rdpsnd, UINT16 wFormatNo,
|
||||
const AUDIO_FORMAT* format)
|
||||
{
|
||||
if (!rdpsnd)
|
||||
|
@ -391,6 +391,8 @@ static UINT rdpsnd_server_select_format(RdpsndServerContext* context, UINT16 cli
|
||||
if (context->priv->out_frames < bs)
|
||||
context->priv->out_frames = bs;
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -319,14 +319,14 @@ BOOL sdlDispContext::handle_display_event(const SDL_DisplayEvent* ev)
|
||||
{
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 14)
|
||||
case SDL_DISPLAYEVENT_CONNECTED:
|
||||
SDL_Log("A new display with id %d was connected", ev->display);
|
||||
SDL_Log("A new display with id %u was connected", ev->display);
|
||||
return TRUE;
|
||||
case SDL_DISPLAYEVENT_DISCONNECTED:
|
||||
SDL_Log("The display with id %d was disconnected", ev->display);
|
||||
SDL_Log("The display with id %u was disconnected", ev->display);
|
||||
return TRUE;
|
||||
#endif
|
||||
case SDL_DISPLAYEVENT_ORIENTATION:
|
||||
SDL_Log("The orientation of display with id %d was changed", ev->display);
|
||||
SDL_Log("The orientation of display with id %u was changed", ev->display);
|
||||
return TRUE;
|
||||
default:
|
||||
return TRUE;
|
||||
|
@ -317,13 +317,13 @@ BOOL sdlDispContext::handle_display_event(const SDL_DisplayEvent* ev)
|
||||
switch (ev->type)
|
||||
{
|
||||
case SDL_EVENT_DISPLAY_ADDED:
|
||||
SDL_Log("A new display with id %d was connected", ev->displayID);
|
||||
SDL_Log("A new display with id %u was connected", ev->displayID);
|
||||
return TRUE;
|
||||
case SDL_EVENT_DISPLAY_REMOVED:
|
||||
SDL_Log("The display with id %d was disconnected", ev->displayID);
|
||||
SDL_Log("The display with id %u was disconnected", ev->displayID);
|
||||
return TRUE;
|
||||
case SDL_EVENT_DISPLAY_ORIENTATION:
|
||||
SDL_Log("The orientation of display with id %d was changed", ev->displayID);
|
||||
SDL_Log("The orientation of display with id %u was changed", ev->displayID);
|
||||
return TRUE;
|
||||
default:
|
||||
return TRUE;
|
||||
|
@ -73,7 +73,7 @@ int sdl_list_monitors(SdlContext* sdl)
|
||||
|
||||
if (brc != 0)
|
||||
continue;
|
||||
printf(" %s [%d] [%s] %dx%d\t+%d+%d\n", (i == 0) ? "*" : " ", id, name, rect.w, rect.h,
|
||||
printf(" %s [%u] [%s] %dx%d\t+%d+%d\n", (i == 0) ? "*" : " ", id, name, rect.w, rect.h,
|
||||
rect.x, rect.y);
|
||||
}
|
||||
SDL_free(ids);
|
||||
|
@ -447,7 +447,7 @@ int wlf_list_monitors(wlfContext* wlc)
|
||||
UwacOutputGetPosition(monitor, &pos);
|
||||
UwacOutputGetResolution(monitor, &resolution);
|
||||
|
||||
printf(" %s [%d] %dx%d\t+%d+%d\n", (i == 0) ? "*" : " ", i, resolution.width,
|
||||
printf(" %s [%u] %dx%d\t+%d+%d\n", (i == 0) ? "*" : " ", i, resolution.width,
|
||||
resolution.height, pos.x, pos.y);
|
||||
}
|
||||
|
||||
|
@ -546,7 +546,7 @@ static char* xf_window_get_title(rdpSettings* settings)
|
||||
if (!port)
|
||||
(void)sprintf_s(windowTitle, size, "%s %s", prefix, name);
|
||||
else
|
||||
(void)sprintf_s(windowTitle, size, "%s %s:%i", prefix, name,
|
||||
(void)sprintf_s(windowTitle, size, "%s %s:%" PRIu32, prefix, name,
|
||||
freerdp_settings_get_uint32(settings, FreeRDP_ServerPort));
|
||||
|
||||
return windowTitle;
|
||||
|
@ -1726,7 +1726,7 @@ static void freerdp_client_print_tune_list(const rdpSettings* settings)
|
||||
freerdp_settings_get_int16(settings, (FreeRDP_Settings_Keys_Int16)x));
|
||||
break;
|
||||
case RDP_SETTINGS_TYPE_UINT32:
|
||||
printf("%" PRIuz "\t%50s\tUINT32\t%" PRIu32 "\n", x, name,
|
||||
printf("%" PRIdz "\t%50s\tUINT32\t%" PRIu32 "\n", x, name,
|
||||
freerdp_settings_get_uint32(settings, (FreeRDP_Settings_Keys_UInt32)x));
|
||||
break;
|
||||
case RDP_SETTINGS_TYPE_INT32:
|
||||
|
@ -111,10 +111,10 @@ const char* audio_format_get_tag_string(UINT16 wFormatTag)
|
||||
|
||||
case WAVE_FORMAT_AAC_MS:
|
||||
return "WAVE_FORMAT_AAC_MS";
|
||||
}
|
||||
|
||||
default:
|
||||
return "WAVE_FORMAT_UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
void audio_format_print(wLog* log, DWORD level, const AUDIO_FORMAT* format)
|
||||
{
|
||||
|
@ -785,23 +785,18 @@ out_fail:
|
||||
|
||||
char* freerdp_assistance_construct_expert_blob(const char* name, const char* pass)
|
||||
{
|
||||
size_t size = 0;
|
||||
size_t nameLength = 0;
|
||||
size_t passLength = 0;
|
||||
char* ExpertBlob = NULL;
|
||||
|
||||
if (!name || !pass)
|
||||
return NULL;
|
||||
|
||||
nameLength = strlen(name) + strlen("NAME=");
|
||||
passLength = strlen(pass) + strlen("PASS=");
|
||||
size = nameLength + passLength + 64;
|
||||
ExpertBlob = (char*)calloc(1, size);
|
||||
const size_t nameLength = strlen(name) + strlen("NAME=");
|
||||
const size_t passLength = strlen(pass) + strlen("PASS=");
|
||||
const size_t size = nameLength + passLength + 64;
|
||||
char* ExpertBlob = (char*)calloc(1, size);
|
||||
|
||||
if (!ExpertBlob)
|
||||
return NULL;
|
||||
|
||||
(void)sprintf_s(ExpertBlob, size, "%" PRIdz ";NAME=%s%" PRIdz ";PASS=%s", nameLength, name,
|
||||
(void)sprintf_s(ExpertBlob, size, "%" PRIuz ";NAME=%s%" PRIuz ";PASS=%s", nameLength, name,
|
||||
passLength, pass);
|
||||
return ExpertBlob;
|
||||
}
|
||||
|
@ -588,7 +588,7 @@ static BOOL http_encode_body_line(wStream* s, const char* param, const char* val
|
||||
|
||||
static BOOL http_encode_content_length_line(wStream* s, size_t ContentLength)
|
||||
{
|
||||
return http_encode_print(s, "Content-Length: %" PRIdz "\r\n", ContentLength);
|
||||
return http_encode_print(s, "Content-Length: %" PRIuz "\r\n", ContentLength);
|
||||
}
|
||||
|
||||
static BOOL http_encode_header_line(wStream* s, const char* Method, const char* URI)
|
||||
|
Loading…
Reference in New Issue
Block a user