Merge pull request #495 from chme/fixwarnings

Fix compiler warnings
This commit is contained in:
ejurgensen 2018-02-22 21:52:17 +01:00 committed by GitHub
commit 6c2ee276de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -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; struct db_media_file_info dbmfi;
int queue_version; int queue_version;
int pos; int pos;
int new_item_id; int new_item_id = 0; // Quell compiler warning about uninitialized use of new_item_id
int ret; int ret;
queue_version = queue_transaction_begin(); queue_version = queue_transaction_begin();
@ -4356,7 +4356,7 @@ db_queue_add_by_query(struct query_params *qp, char reshuffle, uint32_t item_id)
* @param plid Id of the stored playlist * @param plid Id of the stored playlist
* @param reshuffle If 1 queue will be reshuffled after adding new items * @param reshuffle If 1 queue will be reshuffled after adding new items
* @param item_id The base item id, all items after this will be reshuffled * @param item_id The base item id, all items after this will be reshuffled
* @return 0 on success, -1 on failure * @return Item id of the last inserted item on success, -1 on failure
*/ */
int int
db_queue_add_by_playlistid(int plid, char reshuffle, uint32_t item_id) db_queue_add_by_playlistid(int plid, char reshuffle, uint32_t item_id)
@ -4380,7 +4380,7 @@ db_queue_add_by_playlistid(int plid, char reshuffle, uint32_t item_id)
* @param id Id of the file * @param id Id of the file
* @param reshuffle If 1 queue will be reshuffled after adding new items * @param reshuffle If 1 queue will be reshuffled after adding new items
* @param item_id The base item id, all items after this will be reshuffled * @param item_id The base item id, all items after this will be reshuffled
* @return 0 on success, -1 on failure * @return Item id of the last inserted item on success, -1 on failure
*/ */
int int
db_queue_add_by_fileid(int id, char reshuffle, uint32_t item_id) db_queue_add_by_fileid(int id, char reshuffle, uint32_t item_id)
@ -4419,7 +4419,7 @@ db_queue_add_item(struct db_queue_item *queue_item, char reshuffle, uint32_t ite
int queue_version; int queue_version;
char *query; char *query;
int pos; int pos;
int new_item_id; int new_item_id = 0; // Quell compiler warning about uninitialized use of new_item_id
int ret; int ret;
queue_version = queue_transaction_begin(); queue_version = queue_transaction_begin();

View File

@ -3469,7 +3469,7 @@ static struct mpd_sticker_command mpd_sticker_handlers[] =
static int static int
mpd_command_sticker(struct evbuffer *evbuf, int argc, char **argv, char **errmsg, struct mpd_client_ctx *ctx) 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; char *virtual_path = NULL;
int i; int i;
int ret; int ret;