From 8b2d40d46fe52af589302d77c143db5e826a1667 Mon Sep 17 00:00:00 2001 From: chme Date: Thu, 22 Feb 2018 21:35:38 +0100 Subject: [PATCH] Initialize local variables to silence OpenWrt compiler warnings --- src/db.c | 4 ++-- src/mpd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/db.c b/src/db.c index 29616d68..9005a15a 100644 --- a/src/db.c +++ b/src/db.c @@ -4292,7 +4292,7 @@ db_queue_add_by_query(struct query_params *qp, char reshuffle, uint32_t item_id) struct db_media_file_info dbmfi; int queue_version; int pos; - int new_item_id; + int new_item_id = 0; // Quell compiler warning about uninitialized use of new_item_id int ret; queue_version = queue_transaction_begin(); @@ -4419,7 +4419,7 @@ db_queue_add_item(struct db_queue_item *queue_item, char reshuffle, uint32_t ite int queue_version; char *query; int pos; - int new_item_id; + int new_item_id = 0; // Quell compiler warning about uninitialized use of new_item_id int ret; queue_version = queue_transaction_begin(); diff --git a/src/mpd.c b/src/mpd.c index 4ed69eb1..2c9d6609 100644 --- a/src/mpd.c +++ b/src/mpd.c @@ -3469,7 +3469,7 @@ static struct mpd_sticker_command mpd_sticker_handlers[] = static int mpd_command_sticker(struct evbuffer *evbuf, int argc, char **argv, char **errmsg, struct mpd_client_ctx *ctx) { - struct mpd_sticker_command *cmd_param; + struct mpd_sticker_command *cmd_param = NULL; // Quell compiler warning about uninitialized use of cmd_param char *virtual_path = NULL; int i; int ret;