Skip to content

Commit

Permalink
status: add more casts to suppress narrowing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Dec 21, 2023
1 parent d4045f4 commit 70e3a11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,13 @@ mpd_status_feed(struct mpd_status *status, const struct mpd_pair *pair)
else if (strcmp(pair->name, "state") == 0)
status->state = parse_mpd_state(pair->value);
else if (strcmp(pair->name, "song") == 0)
status->song_pos = strtoimax(pair->value, NULL, 10);
status->song_pos = (int)strtoimax(pair->value, NULL, 10);
else if (strcmp(pair->name, "songid") == 0)
status->song_id = strtoimax(pair->value, NULL, 10);
status->song_id = (int)strtoimax(pair->value, NULL, 10);
else if (strcmp(pair->name, "nextsong") == 0)
status->next_song_pos = strtoimax(pair->value, NULL, 10);
status->next_song_pos = (int)strtoimax(pair->value, NULL, 10);
else if (strcmp(pair->name, "nextsongid") == 0)
status->next_song_id = strtoimax(pair->value, NULL, 10);
status->next_song_id = (int)strtoimax(pair->value, NULL, 10);
else if (strcmp(pair->name, "time") == 0) {
char *endptr;

Expand Down

0 comments on commit 70e3a11

Please sign in to comment.