mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
[warnings] clean up unused parameter and dead code
This commit is contained in:
@@ -316,7 +316,7 @@ int freerdp_client_settings_parse_command_line_ex(
|
||||
if (!freerdp_client_settings_post_process(settings))
|
||||
status = -1;
|
||||
|
||||
const char* name = (argc > 0) ? argv[0] : "argc < 1";
|
||||
const char* name = argv[0];
|
||||
WLog_DBG(TAG, "This is [%s] %s %s", name, freerdp_get_version_string(),
|
||||
freerdp_get_build_config());
|
||||
return status;
|
||||
|
||||
@@ -551,9 +551,8 @@ static BOOL ffmpeg_decode(AVCodecContext* dec_ctx, AVPacket* pkt, AVFrame* frame
|
||||
AVAudioResampleContext* resampleContext, AVFrame* resampled, wStream* out)
|
||||
#endif
|
||||
{
|
||||
int ret = 0;
|
||||
/* send the packet with the compressed data to the decoder */
|
||||
ret = avcodec_send_packet(dec_ctx, pkt);
|
||||
int ret = avcodec_send_packet(dec_ctx, pkt);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
@@ -568,8 +567,9 @@ static BOOL ffmpeg_decode(AVCodecContext* dec_ctx, AVPacket* pkt, AVFrame* frame
|
||||
ret = avcodec_receive_frame(dec_ctx, frame);
|
||||
|
||||
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
|
||||
return TRUE;
|
||||
else if (ret < 0)
|
||||
break;
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
const char* err = av_err2str(ret);
|
||||
WLog_ERR(TAG, "Error during decoding %s [%d]", err, ret);
|
||||
@@ -593,10 +593,11 @@ static BOOL ffmpeg_decode(AVCodecContext* dec_ctx, AVPacket* pkt, AVFrame* frame
|
||||
}
|
||||
|
||||
#if defined(SWRESAMPLE_FOUND)
|
||||
if ((ret = (swr_init(resampleContext))) < 0)
|
||||
ret = (swr_init(resampleContext));
|
||||
#else
|
||||
if ((ret = (avresample_open(resampleContext))) < 0)
|
||||
ret = (avresample_open(resampleContext));
|
||||
#endif
|
||||
if (ret < 0)
|
||||
{
|
||||
const char* err = av_err2str(ret);
|
||||
WLog_ERR(TAG, "Error during resampling %s [%d]", err, ret);
|
||||
@@ -605,10 +606,11 @@ static BOOL ffmpeg_decode(AVCodecContext* dec_ctx, AVPacket* pkt, AVFrame* frame
|
||||
}
|
||||
|
||||
#if defined(SWRESAMPLE_FOUND)
|
||||
if ((ret = swr_convert_frame(resampleContext, resampled, frame)) < 0)
|
||||
ret = swr_convert_frame(resampleContext, resampled, frame);
|
||||
#else
|
||||
if ((ret = avresample_convert_frame(resampleContext, resampled, frame)) < 0)
|
||||
ret = avresample_convert_frame(resampleContext, resampled, frame);
|
||||
#endif
|
||||
if (ret < 0)
|
||||
{
|
||||
const char* err = av_err2str(ret);
|
||||
WLog_ERR(TAG, "Error during resampling %s [%d]", err, ret);
|
||||
|
||||
@@ -2555,7 +2555,7 @@ BOOL license_send_platform_challenge_response(rdpLicense* license)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL license_read_platform_challenge_response(rdpLicense* license)
|
||||
BOOL license_read_platform_challenge_response(WINPR_ATTR_UNUSED rdpLicense* license)
|
||||
{
|
||||
WINPR_ASSERT(license);
|
||||
WINPR_ASSERT(license->PlatformChallenge);
|
||||
|
||||
@@ -154,8 +154,7 @@ static BOOL rdp_set_monitor_layout_pdu_state_(rdpRdp* rdp, BOOL value, const cha
|
||||
if (WLog_IsLevelActive(rdp->log, log_level))
|
||||
{
|
||||
WLog_PrintMessage(rdp->log, WLOG_MESSAGE_TEXT, log_level, line, file, fkt,
|
||||
"rdp->monitor_layout_pdu == %s, expected FALSE",
|
||||
value ? "TRUE" : "FALSE");
|
||||
"rdp->monitor_layout_pdu == TRUE, expected FALSE");
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user