Fixed uninitialized warnings

This commit is contained in:
Armin Novak 2021-09-08 15:47:03 +02:00 committed by akallabeth
parent 0fe1e2359e
commit 673fb46836
13 changed files with 29 additions and 29 deletions

View File

@ -862,7 +862,7 @@ static BOOL poll_libusb_events(UDEVMAN* udevman)
static DWORD poll_thread(LPVOID lpThreadParameter)
{
libusb_hotplug_callback_handle handle;
libusb_hotplug_callback_handle handle = 0;
UDEVMAN* udevman = (UDEVMAN*)lpThreadParameter;
BOOL hasHotplug = libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG);

View File

@ -702,7 +702,7 @@ static void xf_cliprdr_process_requested_data(xfClipboard* clipboard, BOOL hasDa
{
BOOL bSuccess;
UINT32 SrcSize;
UINT32 DstSize;
UINT32 DstSize = 0;
UINT32 srcFormatId;
UINT32 dstFormatId;
BYTE* pDstData = NULL;
@ -1393,7 +1393,7 @@ xf_cliprdr_server_file_contents_response(CliprdrClientContext* context,
UINT32 count;
UINT32 index;
BOOL found = FALSE;
xfCliprdrFuseStream* stream;
xfCliprdrFuseStream* stream = NULL;
xfCliprdrFuseInode* ino;
xfClipboard* clipboard = (xfClipboard*)context->custom;
UINT32 stream_id = fileContentsResponse->streamId;
@ -1413,7 +1413,7 @@ xf_cliprdr_server_file_contents_response(CliprdrClientContext* context,
break;
}
}
if (!found)
if (!found || !stream)
{
ArrayList_Unlock(clipboard->stream_list);
return CHANNEL_RC_OK;
@ -1775,7 +1775,7 @@ static BOOL xf_cliprdr_fuse_create_nodes(xfClipboard* clipboard, wStream* s, siz
char* curName = NULL;
char* dirName = NULL;
char* baseName = NULL;
xfCliprdrFuseInode* inode;
xfCliprdrFuseInode* inode = NULL;
wHashTable* mapDir = HashTable_New(TRUE);
if (!mapDir)
{
@ -2565,7 +2565,7 @@ static void xf_cliprdr_fuse_lookup(fuse_req_t req, fuse_ino_t parent, const char
BOOL found = FALSE;
struct fuse_entry_param e;
xfCliprdrFuseInode* parent_node;
xfCliprdrFuseInode* child_node;
xfCliprdrFuseInode* child_node = NULL;
xfClipboard* clipboard = (xfClipboard*)fuse_req_userdata(req);
ArrayList_Lock(clipboard->ino_list);
@ -2592,7 +2592,7 @@ static void xf_cliprdr_fuse_lookup(fuse_req_t req, fuse_ino_t parent, const char
}
ArrayList_Unlock(parent_node->child_inos);
if (!found)
if (!found || !child_node)
{
ArrayList_Unlock(clipboard->ino_list);
fuse_reply_err(req, ENOENT);

View File

@ -616,11 +616,11 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear, wStream* s, UINT32
UINT16 yEnd;
UINT32 colorBkg;
UINT16 vBarHeader;
UINT16 vBarYOn;
UINT16 vBarYOn = 0;
UINT16 vBarYOff;
UINT32 vBarCount;
UINT32 vBarPixelCount;
UINT32 vBarShortPixelCount;
UINT32 vBarShortPixelCount = 0;
if (Stream_GetRemainingLength(s) < 11)
{
@ -656,7 +656,7 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear, wStream* s, UINT32
{
UINT32 vBarHeight;
CLEAR_VBAR_ENTRY* vBarEntry = NULL;
CLEAR_VBAR_ENTRY* vBarShortEntry;
CLEAR_VBAR_ENTRY* vBarShortEntry = NULL;
BOOL vBarUpdate = FALSE;
const BYTE* cpSrcPixel;

View File

@ -1456,7 +1456,7 @@ RFX_MESSAGE* rfx_encode_message(RFX_CONTEXT* context, const RFX_RECT* rects, siz
const UINT32 width = (UINT32)w;
const UINT32 height = (UINT32)h;
const UINT32 scanline = (UINT32)s;
UINT32 i, maxNbTiles, maxTilesX, maxTilesY;
UINT32 i, maxNbTiles = 0, maxTilesX, maxTilesY;
UINT32 xIdx, yIdx, regionNbRects;
UINT32 gridRelX, gridRelY, ax, ay, bytesPerPixel;
RFX_TILE* tile;

View File

@ -1413,7 +1413,7 @@ const BYTE tssk_exponent[] = { 0x5b, 0x7b, 0x88, 0xc0 };
BOOL gcc_write_server_security_data(wStream* s, rdpMcs* mcs)
{
BYTE* sigData;
size_t expLen, keyLen, sigDataLen;
size_t expLen = 0, keyLen, sigDataLen;
BYTE encryptedSignature[TSSK_KEY_LENGTH];
BYTE signature[sizeof(initial_signature)];
UINT32 headerLen, serverRandomLen, serverCertLen, wPublicKeyBlobLen;

View File

@ -1094,7 +1094,7 @@ static int nla_server_authenticate(rdpNla* nla)
{
int res = -1;
if (nla_server_init(nla) < 1)
goto fail;
goto fail_auth;
/* Client is starting, here es the state machine:
*
@ -1135,13 +1135,13 @@ static int nla_server_authenticate(rdpNla* nla)
inputBufferDesc.pBuffers = &inputBuffer;
if (nla_server_recv(nla) < 0)
goto fail;
goto fail_auth;
WLog_DBG(TAG, "Receiving Authentication Token");
if (!nla_sec_buffer_alloc_from_buffer(&inputBuffer, &nla->negoToken, 0))
{
WLog_ERR(TAG, "CredSSP: invalid negoToken!");
goto fail;
goto fail_auth;
}
outputBufferDesc.ulVersion = SECBUFFER_VERSION;
@ -1149,7 +1149,7 @@ static int nla_server_authenticate(rdpNla* nla)
outputBufferDesc.pBuffers = &outputBuffer;
if (!nla_sec_buffer_alloc(&outputBuffer, nla->cbMaxToken))
goto fail;
goto fail_auth;
nla->status = nla->table->AcceptSecurityContext(
&nla->credentials, nla->haveContext ? &nla->context : NULL, &inputBufferDesc,
@ -1159,7 +1159,7 @@ static int nla_server_authenticate(rdpNla* nla)
GetSecurityStatusString(nla->status), nla->status);
if (!nla_sec_buffer_alloc_from_buffer(&nla->negoToken, &outputBuffer, 0))
goto fail;
goto fail_auth;
if ((nla->status == SEC_I_COMPLETE_AND_CONTINUE) || (nla->status == SEC_I_COMPLETE_NEEDED))
{
@ -1193,7 +1193,7 @@ static int nla_server_authenticate(rdpNla* nla)
}
if (!nla_complete_auth(nla, &outputBufferDesc))
goto fail;
goto fail_auth;
}
if (nla->status == SEC_E_OK)

View File

@ -113,8 +113,8 @@ FREERDP_LOCAL BOOL transport_set_connected_event(rdpTransport* transport);
FREERDP_LOCAL BOOL transport_set_recv_callbacks(rdpTransport* transport, TransportRecv recv,
void* extra);
FREERDP_LOCAL transport_tcp_connect(rdpTransport* transport, const char* hostname, int port,
DWORD timeout);
FREERDP_LOCAL int transport_tcp_connect(rdpTransport* transport, const char* hostname, int port,
DWORD timeout);
FREERDP_LOCAL rdpTransport* transport_new(rdpContext* context);
FREERDP_LOCAL void transport_free(rdpTransport* transport);

View File

@ -553,7 +553,7 @@ static INLINE void ssse3_RGBToAVC444YUV_BGRX_DOUBLE_ROW(const BYTE* srcEven, con
*
* We need to split these according to
* 3.3.8.3.2 YUV420p Stream Combination for YUV444 mode */
__m128i ue, uo;
__m128i ue, uo = { 0 };
{
const __m128i ue1 =
_mm_srai_epi16(_mm_hadd_epi16(_mm_maddubs_epi16(xe1, u_factors),
@ -628,7 +628,7 @@ static INLINE void ssse3_RGBToAVC444YUV_BGRX_DOUBLE_ROW(const BYTE* srcEven, con
*
* We need to split these according to
* 3.3.8.3.2 YUV420p Stream Combination for YUV444 mode */
__m128i ve, vo;
__m128i ve, vo = { 0 };
{
const __m128i ve1 =
_mm_srai_epi16(_mm_hadd_epi16(_mm_maddubs_epi16(xe1, v_factors),

View File

@ -41,4 +41,4 @@ struct proxy_server
HANDLE stopEvent; /* an event used to signal the main thread to stop */
};
#endif /* FREERDP_SERVER_PROXY_SERVER_H */
#endif /* INT_FREERDP_SERVER_PROXY_SERVER_H */

View File

@ -93,7 +93,7 @@ static UwacReturnCode set_cursor_image(UwacSeat* seat, uint32_t serial)
{
struct wl_buffer* buffer = NULL;
struct wl_cursor* cursor;
struct wl_cursor_image* image;
struct wl_cursor_image* image = NULL;
struct wl_surface* surface = NULL;
int32_t x = 0, y = 0;
int buffer_add_listener_success = -1;

View File

@ -220,9 +220,9 @@ void NdrComplexStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMem
* FC_END
* [pointer_layout<>]
*/
ULONG_PTR MaxCount;
unsigned long Offset;
unsigned long ActualCount;
ULONG_PTR MaxCount = 0;
unsigned long Offset = 0;
unsigned long ActualCount = 0;
unsigned char* pMemoryCopy;
unsigned char type;
unsigned char alignment;

View File

@ -225,7 +225,7 @@ void* BufferPool_Take(wBufferPool* pool, SSIZE_T size)
SSIZE_T index;
SSIZE_T maxSize;
SSIZE_T maxIndex;
SSIZE_T foundIndex;
SSIZE_T foundIndex = -1;
BOOL found = FALSE;
void* buffer = NULL;

View File

@ -1507,7 +1507,7 @@ typedef struct Hash
static unsigned hash_init(Hash* hash, unsigned windowsize)
{
unsigned i;
unsigned i = 0;
hash->head = (int*)calloc(sizeof(int), HASH_NUM_VALUES);
hash->val = (int*)calloc(sizeof(int), windowsize);
hash->chain = (unsigned short*)calloc(sizeof(unsigned short), windowsize);