warnings: Fix some mostly spurious warnings
authorpopcornmix <popcornmix@gmail.com>
Tue, 21 Mar 2017 20:52:52 +0000 (20:52 +0000)
committerpopcornmix <popcornmix@gmail.com>
Tue, 21 Mar 2017 20:55:48 +0000 (20:55 +0000)
These are triggered when building with -O2 (with firmware compiler)

containers/core/containers_bytestream.h
interface/vmcs_host/vcilcs.c

index 1f208639e4fbaa47e59754fe2a03e75d801ac482..95b3a6172dd2f804e2fd61b5b6ec82cf63c074ad 100644 (file)
@@ -329,9 +329,9 @@ STATIC_INLINE VC_CONTAINER_STATUS_T packet_get_byte( VC_CONTAINER_BYTESTREAM_T *
 STATIC_INLINE VC_CONTAINER_STATUS_T bytestream_find_startcode( VC_CONTAINER_BYTESTREAM_T *stream,
    size_t *search_offset, const uint8_t *startcode, unsigned int length )
 {
-   VC_CONTAINER_PACKET_T *packet, *backup_packet;
+   VC_CONTAINER_PACKET_T *packet, *backup_packet = NULL;
    size_t position, start_offset = position = *search_offset;
-   size_t offset, backup_offset;
+   size_t offset, backup_offset = 0;
    unsigned int match = 0;
 
    if( stream->bytes - stream->current_offset - stream->offset < start_offset + length )
index ee78a2484c7c04d8ecce4ee5c6a9e44ae41ff2e7..980a21d070a2897cd2ade2b566944d9fb7becb2e 100644 (file)
@@ -543,7 +543,7 @@ static int ilcs_process_message(ILCS_SERVICE_T *st, int block)
  * -------------------------------------------------------------------- */
 static void ilcs_response(ILCS_SERVICE_T *st, uint32_t xid, const unsigned char *msg, int len)
 {
-   ILCS_WAIT_T *wait;
+   ILCS_WAIT_T *wait = NULL;
    int i, copy = len;
 
    // atomically retrieve given ->wait entry