[clang-tidy] clang-analyzer-core.uninitialized.Assign
This commit is contained in:
parent
81d2c1f057
commit
b8598728a6
@ -934,13 +934,11 @@ fail:
|
||||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
static UINT rdpgfx_load_cache_import_reply(RDPGFX_PLUGIN* gfx, RDPGFX_CACHE_IMPORT_REPLY_PDU* reply)
|
||||
static UINT rdpgfx_load_cache_import_reply(RDPGFX_PLUGIN* gfx,
|
||||
const RDPGFX_CACHE_IMPORT_REPLY_PDU* reply)
|
||||
{
|
||||
int idx = 0;
|
||||
int count = 0;
|
||||
UINT16 cacheSlot = 0;
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
PERSISTENT_CACHE_ENTRY entry;
|
||||
rdpPersistentCache* persistent = NULL;
|
||||
WINPR_ASSERT(gfx);
|
||||
WINPR_ASSERT(gfx->rdpcontext);
|
||||
@ -980,16 +978,16 @@ static UINT rdpgfx_load_cache_import_reply(RDPGFX_PLUGIN* gfx, RDPGFX_CACHE_IMPO
|
||||
|
||||
WLog_DBG(TAG, "Receiving Cache Import Reply: %d", count);
|
||||
|
||||
for (idx = 0; idx < count; idx++)
|
||||
for (int idx = 0; idx < count; idx++)
|
||||
{
|
||||
PERSISTENT_CACHE_ENTRY entry = { 0 };
|
||||
if (persistent_cache_read_entry(persistent, &entry) < 1)
|
||||
{
|
||||
error = ERROR_INVALID_DATA;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
cacheSlot = reply->cacheSlots[idx];
|
||||
|
||||
const UINT16 cacheSlot = reply->cacheSlots[idx];
|
||||
if (context && context->ImportCacheEntry)
|
||||
context->ImportCacheEntry(context, cacheSlot, &entry);
|
||||
}
|
||||
@ -1010,7 +1008,7 @@ fail:
|
||||
static UINT rdpgfx_recv_cache_import_reply_pdu(GENERIC_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
{
|
||||
UINT16 idx = 0;
|
||||
RDPGFX_CACHE_IMPORT_REPLY_PDU pdu;
|
||||
RDPGFX_CACHE_IMPORT_REPLY_PDU pdu = { 0 };
|
||||
WINPR_ASSERT(callback);
|
||||
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*)callback->plugin;
|
||||
WINPR_ASSERT(gfx);
|
||||
|
@ -73,7 +73,7 @@ extern "C"
|
||||
typedef UINT (*pcRdpgfxEvictCacheEntry)(RdpgfxClientContext* context,
|
||||
const RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry);
|
||||
typedef UINT (*pcRdpgfxImportCacheEntry)(RdpgfxClientContext* context, UINT16 cacheSlot,
|
||||
PERSISTENT_CACHE_ENTRY* importCacheEntry);
|
||||
const PERSISTENT_CACHE_ENTRY* importCacheEntry);
|
||||
typedef UINT (*pcRdpgfxExportCacheEntry)(RdpgfxClientContext* context, UINT16 cacheSlot,
|
||||
PERSISTENT_CACHE_ENTRY* importCacheEntry);
|
||||
typedef UINT (*pcRdpgfxMapSurfaceToOutput)(
|
||||
|
@ -237,7 +237,8 @@ BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action)
|
||||
return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_CONTROL, rdp->mcs->userId);
|
||||
}
|
||||
|
||||
static BOOL rdp_write_client_persistent_key_list_pdu(wStream* s, RDP_BITMAP_PERSISTENT_INFO* info)
|
||||
static BOOL rdp_write_client_persistent_key_list_pdu(wStream* s,
|
||||
const RDP_BITMAP_PERSISTENT_INFO* info)
|
||||
{
|
||||
WINPR_ASSERT(s);
|
||||
WINPR_ASSERT(info);
|
||||
@ -332,13 +333,11 @@ error:
|
||||
|
||||
BOOL rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp)
|
||||
{
|
||||
UINT32 keyCount = 0;
|
||||
UINT32 keyMaxFrag = 2042;
|
||||
UINT64* keyList = NULL;
|
||||
RDP_BITMAP_PERSISTENT_INFO info;
|
||||
RDP_BITMAP_PERSISTENT_INFO info = { 0 };
|
||||
rdpSettings* settings = rdp->settings;
|
||||
|
||||
keyCount = rdp_load_persistent_key_list(rdp, &keyList);
|
||||
UINT32 keyCount = rdp_load_persistent_key_list(rdp, &keyList);
|
||||
|
||||
WLog_DBG(TAG, "Persistent Key List: TotalKeyCount: %" PRIu32 " MaxKeyFrag: %" PRIu32, keyCount,
|
||||
keyMaxFrag);
|
||||
|
@ -1599,7 +1599,7 @@ static UINT gdi_CacheImportReply(RdpgfxClientContext* context,
|
||||
}
|
||||
|
||||
static UINT gdi_ImportCacheEntry(RdpgfxClientContext* context, UINT16 cacheSlot,
|
||||
PERSISTENT_CACHE_ENTRY* importCacheEntry)
|
||||
const PERSISTENT_CACHE_ENTRY* importCacheEntry)
|
||||
{
|
||||
UINT error = ERROR_INTERNAL_ERROR;
|
||||
gdiGfxCacheEntry* cacheEntry = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user