Fixed unused-but-set-variable and reserved identifier warnings
This commit is contained in:
parent
c51224e923
commit
ca30e749e9
@ -1466,13 +1466,13 @@ static BOOL read_pem_file(rdpSettings* settings, size_t id, const char* file)
|
||||
if (!fp)
|
||||
return FALSE;
|
||||
rs = _fseeki64(fp, 0, SEEK_END);
|
||||
if (rc < 0)
|
||||
if (rs < 0)
|
||||
goto fail;
|
||||
s = _ftelli64(fp);
|
||||
if (s < 0)
|
||||
goto fail;
|
||||
rs = _fseeki64(fp, 0, SEEK_SET);
|
||||
if (rc < 0)
|
||||
if (rs < 0)
|
||||
goto fail;
|
||||
|
||||
if (!freerdp_settings_set_string_len(settings, id, NULL, s + 1ull))
|
||||
|
@ -313,10 +313,6 @@ static BOOL freerdp_image_copy_from_pointer_data_1bpp(BYTE* pDstData, UINT32 Dst
|
||||
UINT32 andBit;
|
||||
UINT32 xorPixel;
|
||||
UINT32 andPixel;
|
||||
UINT32 dstBitsPerPixel;
|
||||
UINT32 dstBytesPerPixel;
|
||||
dstBitsPerPixel = GetBitsPerPixel(DstFormat);
|
||||
dstBytesPerPixel = GetBytesPerPixel(DstFormat);
|
||||
|
||||
vFlip = (xorBpp == 1) ? FALSE : TRUE;
|
||||
andStep = (nWidth + 7) / 8;
|
||||
@ -406,10 +402,8 @@ static BOOL freerdp_image_copy_from_pointer_data_xbpp(BYTE* pDstData, UINT32 Dst
|
||||
UINT32 xorPixel;
|
||||
UINT32 andPixel;
|
||||
UINT32 dstBitsPerPixel;
|
||||
UINT32 dstBytesPerPixel;
|
||||
UINT32 xorBytesPerPixel;
|
||||
dstBitsPerPixel = GetBitsPerPixel(DstFormat);
|
||||
dstBytesPerPixel = GetBytesPerPixel(DstFormat);
|
||||
|
||||
vFlip = (xorBpp == 1) ? FALSE : TRUE;
|
||||
andStep = (nWidth + 7) / 8;
|
||||
|
@ -328,7 +328,6 @@ static UINT16 dsp_decode_ima_adpcm_sample(ADPCM* adpcm, unsigned int channel, BY
|
||||
static BOOL freerdp_dsp_decode_ima_adpcm(FREERDP_DSP_CONTEXT* context, const BYTE* src, size_t size,
|
||||
wStream* out)
|
||||
{
|
||||
size_t pos;
|
||||
BYTE sample;
|
||||
UINT16 decoded;
|
||||
size_t out_size = size * 4;
|
||||
@ -340,8 +339,6 @@ static BOOL freerdp_dsp_decode_ima_adpcm(FREERDP_DSP_CONTEXT* context, const BYT
|
||||
if (!Stream_EnsureCapacity(out, out_size))
|
||||
return FALSE;
|
||||
|
||||
pos = Stream_GetPosition(out);
|
||||
|
||||
while (size > 0)
|
||||
{
|
||||
if (size % block_size == 0)
|
||||
@ -715,9 +712,7 @@ static BOOL freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context, const BYT
|
||||
size_t start;
|
||||
INT16 sample;
|
||||
BYTE encoded;
|
||||
size_t out_size;
|
||||
size_t align;
|
||||
out_size = size / 2;
|
||||
|
||||
if (!Stream_EnsureRemainingCapacity(out, size))
|
||||
return FALSE;
|
||||
@ -945,9 +940,7 @@ static BOOL freerdp_dsp_encode_ms_adpcm(FREERDP_DSP_CONTEXT* context, const BYTE
|
||||
{
|
||||
size_t start;
|
||||
INT32 sample;
|
||||
size_t out_size;
|
||||
const size_t step = 8 + ((context->format.nChannels > 1) ? 4 : 0);
|
||||
out_size = size / 2;
|
||||
|
||||
if (!Stream_EnsureRemainingCapacity(out, size))
|
||||
return FALSE;
|
||||
|
@ -3588,11 +3588,13 @@ fail:
|
||||
static BOOL rdp_read_capability_sets(wStream* s, rdpSettings* settings, UINT16 totalLength)
|
||||
{
|
||||
BOOL treated;
|
||||
size_t capstart, start, end, len;
|
||||
size_t start, end, len;
|
||||
UINT16 numberCapabilities;
|
||||
UINT16 count;
|
||||
|
||||
capstart = Stream_GetPosition(s);
|
||||
#ifdef WITH_DEBUG_CAPABILITIES
|
||||
const size_t capstart = Stream_GetPosition(s);
|
||||
#endif
|
||||
if (Stream_GetRemainingLength(s) < 4)
|
||||
return FALSE;
|
||||
|
||||
|
@ -822,14 +822,10 @@ static int print_bio_error(const char* str, size_t len, void* bp)
|
||||
|
||||
HttpResponse* http_response_recv(rdpTls* tls, BOOL readContentLength)
|
||||
{
|
||||
size_t size;
|
||||
size_t position;
|
||||
size_t bodyLength = 0;
|
||||
size_t payloadOffset;
|
||||
HttpResponse* response;
|
||||
size = 2048;
|
||||
payloadOffset = 0;
|
||||
response = http_response_new();
|
||||
size_t payloadOffset = 0;
|
||||
HttpResponse* response = http_response_new();
|
||||
|
||||
if (!response)
|
||||
return NULL;
|
||||
|
@ -718,7 +718,6 @@ static int nla_client_init(rdpNla* nla)
|
||||
static BOOL nla_client_send_token(rdpNla* nla, SecBufferDesc* token)
|
||||
{
|
||||
BOOL rc = FALSE;
|
||||
SecBuffer* buffer;
|
||||
|
||||
if (!nla || !token)
|
||||
{
|
||||
@ -732,8 +731,6 @@ static BOOL nla_client_send_token(rdpNla* nla, SecBufferDesc* token)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
buffer = token->pBuffers;
|
||||
|
||||
if (!nla_sec_buffer_alloc_from_buffer(&nla->negoToken, &token->pBuffers[0], 0))
|
||||
goto fail;
|
||||
|
||||
|
@ -601,8 +601,12 @@ 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;
|
||||
const __m128i *r_buf, *g_buf, *b_buf;
|
||||
__m128i *y_buf, *cb_buf, *cr_buf;
|
||||
const __m128i* r_buf = (const __m128i*)(pSrc[0]);
|
||||
const __m128i* g_buf = (const __m128i*)(pSrc[1]);
|
||||
const __m128i* b_buf = (const __m128i*)(pSrc[2]);
|
||||
__m128i* y_buf = (__m128i*)(pDst[0]);
|
||||
__m128i* cb_buf = (__m128i*)(pDst[1]);
|
||||
__m128i* cr_buf = (__m128i*)(pDst[2]);
|
||||
UINT32 yp;
|
||||
int srcbump, dstbump, imax;
|
||||
|
||||
@ -617,12 +621,7 @@ static pstatus_t sse2_RGBToYCbCr_16s16s_P3P3(const INT16* const pSrc[3], int src
|
||||
|
||||
min = _mm_set1_epi16(-128 * 32);
|
||||
max = _mm_set1_epi16(127 * 32);
|
||||
r_buf = (const __m128i*)(pSrc[0]);
|
||||
g_buf = (const __m128i*)(pSrc[1]);
|
||||
b_buf = (const __m128i*)(pSrc[2]);
|
||||
y_buf = (__m128i*)(pDst[0]);
|
||||
cb_buf = (__m128i*)(pDst[1]);
|
||||
cr_buf = (__m128i*)(pDst[2]);
|
||||
|
||||
y_r = _mm_set1_epi16(9798); /* 0.299000 << 15 */
|
||||
y_g = _mm_set1_epi16(19235); /* 0.587000 << 15 */
|
||||
y_b = _mm_set1_epi16(3735); /* 0.114000 << 15 */
|
||||
|
@ -273,7 +273,7 @@ typedef LONG HRESULT;
|
||||
typedef LONG SCODE;
|
||||
typedef SCODE* PSCODE;
|
||||
|
||||
typedef struct _POINTL /* ptl */
|
||||
typedef struct s_POINTL /* ptl */
|
||||
{
|
||||
LONG x;
|
||||
LONG y;
|
||||
@ -287,7 +287,7 @@ typedef struct tagSIZE
|
||||
|
||||
typedef SIZE SIZEL;
|
||||
|
||||
typedef struct _GUID
|
||||
typedef struct s_GUID
|
||||
{
|
||||
UINT32 Data1;
|
||||
UINT16 Data2;
|
||||
@ -296,7 +296,7 @@ typedef struct _GUID
|
||||
} GUID, UUID, *PGUID, *LPGUID, *LPCGUID;
|
||||
typedef GUID CLSID;
|
||||
|
||||
typedef struct _LUID
|
||||
typedef struct s_LUID
|
||||
{
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
@ -323,7 +323,7 @@ typedef LPSTR LPTSTR;
|
||||
typedef LPCSTR LPCTSTR;
|
||||
#endif
|
||||
|
||||
typedef union _ULARGE_INTEGER
|
||||
typedef union u_ULARGE_INTEGER
|
||||
{
|
||||
struct
|
||||
{
|
||||
@ -340,7 +340,7 @@ typedef union _ULARGE_INTEGER
|
||||
ULONGLONG QuadPart;
|
||||
} ULARGE_INTEGER, *PULARGE_INTEGER;
|
||||
|
||||
typedef union _LARGE_INTEGER
|
||||
typedef union u_LARGE_INTEGER
|
||||
{
|
||||
struct
|
||||
{
|
||||
@ -357,13 +357,13 @@ typedef union _LARGE_INTEGER
|
||||
LONGLONG QuadPart;
|
||||
} LARGE_INTEGER, *PLARGE_INTEGER;
|
||||
|
||||
typedef struct _FILETIME
|
||||
typedef struct s_FILETIME
|
||||
{
|
||||
DWORD dwLowDateTime;
|
||||
DWORD dwHighDateTime;
|
||||
} FILETIME, *PFILETIME, *LPFILETIME;
|
||||
|
||||
typedef struct _SYSTEMTIME
|
||||
typedef struct s_SYSTEMTIME
|
||||
{
|
||||
WORD wYear;
|
||||
WORD wMonth;
|
||||
@ -375,14 +375,14 @@ typedef struct _SYSTEMTIME
|
||||
WORD wMilliseconds;
|
||||
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
|
||||
|
||||
typedef struct _RPC_SID_IDENTIFIER_AUTHORITY
|
||||
typedef struct s_RPC_SID_IDENTIFIER_AUTHORITY
|
||||
{
|
||||
BYTE Value[6];
|
||||
} RPC_SID_IDENTIFIER_AUTHORITY;
|
||||
|
||||
typedef DWORD SECURITY_INFORMATION, *PSECURITY_INFORMATION;
|
||||
|
||||
typedef struct _RPC_SID
|
||||
typedef struct s_RPC_SID
|
||||
{
|
||||
UCHAR Revision;
|
||||
UCHAR SubAuthorityCount;
|
||||
@ -390,7 +390,7 @@ typedef struct _RPC_SID
|
||||
ULONG SubAuthority[1];
|
||||
} RPC_SID, *PRPC_SID, *PSID;
|
||||
|
||||
typedef struct _ACL
|
||||
typedef struct s_ACL
|
||||
{
|
||||
UCHAR AclRevision;
|
||||
UCHAR Sbz1;
|
||||
@ -399,7 +399,7 @@ typedef struct _ACL
|
||||
USHORT Sbz2;
|
||||
} ACL, *PACL;
|
||||
|
||||
typedef struct _SECURITY_DESCRIPTOR
|
||||
typedef struct s_SECURITY_DESCRIPTOR
|
||||
{
|
||||
UCHAR Revision;
|
||||
UCHAR Sbz1;
|
||||
@ -412,14 +412,14 @@ typedef struct _SECURITY_DESCRIPTOR
|
||||
|
||||
typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
|
||||
|
||||
typedef struct _SECURITY_ATTRIBUTES
|
||||
typedef struct s_SECURITY_ATTRIBUTES
|
||||
{
|
||||
DWORD nLength;
|
||||
LPVOID lpSecurityDescriptor;
|
||||
BOOL bInheritHandle;
|
||||
} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
|
||||
|
||||
typedef struct _PROCESS_INFORMATION
|
||||
typedef struct s_PROCESS_INFORMATION
|
||||
{
|
||||
HANDLE hProcess;
|
||||
HANDLE hThread;
|
||||
|
@ -638,7 +638,6 @@ BOOL CancelWaitableTimer(HANDLE hTimer)
|
||||
{
|
||||
ULONG Type;
|
||||
WINPR_HANDLE* Object;
|
||||
WINPR_TIMER* timer;
|
||||
|
||||
if (!winpr_Handle_GetInfo(hTimer, &Type, &Object))
|
||||
return FALSE;
|
||||
@ -646,13 +645,14 @@ BOOL CancelWaitableTimer(HANDLE hTimer)
|
||||
if (Type != HANDLE_TYPE_TIMER)
|
||||
return FALSE;
|
||||
|
||||
timer = (WINPR_TIMER*)Object;
|
||||
#if defined(__APPLE__)
|
||||
{
|
||||
WINPR_TIMER* timer = (WINPR_TIMER*)Object;
|
||||
if (timer->running)
|
||||
dispatch_suspend(timer->source);
|
||||
|
||||
if (timer->running)
|
||||
dispatch_suspend(timer->source);
|
||||
|
||||
timer->running = FALSE;
|
||||
timer->running = FALSE;
|
||||
}
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user