Fixed warnings for -Og

This commit is contained in:
Martin Pulec
2022-01-17 15:02:43 +01:00
parent 12ee84143f
commit 35bfc4cced
4 changed files with 9 additions and 10 deletions

View File

@@ -318,7 +318,7 @@ static bool is_utf8(int64_t ch) {
return false;
}
unsigned char first_byte;
unsigned char first_byte = 0U;
while (ch != 0) {
first_byte = ch & 0xff;
ch >>= 8;

View File

@@ -243,12 +243,10 @@ void pbuf_destroy(struct pbuf *playout_buf) {
*/
static void add_coded_unit(struct pbuf_node *node, rtp_packet * pkt)
{
struct coded_data *tmp, *curr, *prv;
assert(node->rtp_timestamp == pkt->ts);
assert(node->cdata != NULL);
tmp = (struct coded_data *) malloc(sizeof(struct coded_data));
struct coded_data *tmp = (struct coded_data *) malloc(sizeof(struct coded_data));
if (tmp == NULL) {
/* this is bad, out of memory, drop the packet... */
free(pkt);
@@ -264,7 +262,8 @@ static void add_coded_unit(struct pbuf_node *node, rtp_packet * pkt)
node->cdata->prv = tmp;
node->cdata = tmp;
} else {
curr = node->cdata;
struct coded_data *curr = node->cdata;
struct coded_data *prv = NULL;
while (curr != NULL && ((int16_t)(tmp->seqno - curr->seqno) < 0)){
prv = curr;
curr = curr->nxt;

View File

@@ -1494,7 +1494,7 @@ int decode_video_frame(struct coded_data *cdata, void *decoder_data, struct pbuf
rtp_packet *pckt = NULL;
int prints=0;
int max_substreams = decoder->max_substreams;
uint32_t ssrc;
uint32_t ssrc = 0U;
unsigned int frame_size = 0;
vector<uint32_t> buffer_num(max_substreams);
@@ -1506,9 +1506,9 @@ int decode_video_frame(struct coded_data *cdata, void *decoder_data, struct pbuf
unique_ptr<map<int, int>[]> pckt_list(new map<int, int>[max_substreams]);
int k = 0, m = 0, c = 0, seed = 0; // LDGM
int buffer_number, buffer_length;
int pt;
int buffer_number = 0;
int buffer_length = 0;
int pt = 0;
bool buffer_swapped = false;
perf_record(UVP_DECODEFRAME, cdata);

View File

@@ -186,7 +186,7 @@ static int
display_deltacast_reconfigure(void *state, struct video_desc desc)
{
struct state_deltacast *s = (struct state_deltacast *)state;
int VideoStandard;
int VideoStandard = 0;
int i;
ULONG Result;