Skip to content

Commit

Permalink
Get rid of warning messages generated by GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Oct 10, 2018
1 parent 4261f3a commit 6866c12
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/libscrobbler2.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ const char *scrobbler_strerror(scrobbler_session_t *sbs) {
return "Authentication callback failure";
case SCROBBLER_STATUS_ERR_TRACKINF:
return "Missing required data for track";
default:
return "Unknown status";
}
}

Expand Down
20 changes: 12 additions & 8 deletions test/test-server.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const char *cmusfm_socket_file = NULL;
scrobbler_trackinfo_t scrobbler_scrobble_sbt = { 0 };
int scrobbler_scrobble_count = 0;
scrobbler_status_t scrobbler_scrobble(scrobbler_session_t *sbs, scrobbler_trackinfo_t *sbt) {
(void)sbs;
memcpy(&scrobbler_scrobble_sbt, sbt, sizeof(scrobbler_scrobble_sbt));
scrobbler_scrobble_count++;
return SCROBBLER_STATUS_OK;
Expand All @@ -32,6 +33,7 @@ scrobbler_status_t scrobbler_scrobble(scrobbler_session_t *sbs, scrobbler_tracki
scrobbler_trackinfo_t scrobbler_update_now_playing_sbt = { 0 };
int scrobbler_update_now_playing_count = 0;
scrobbler_status_t scrobbler_update_now_playing(scrobbler_session_t *sbs, scrobbler_trackinfo_t *sbt) {
(void)sbs;
memcpy(&scrobbler_update_now_playing_sbt, sbt, sizeof(scrobbler_update_now_playing_sbt));
scrobbler_update_now_playing_count++;
return SCROBBLER_STATUS_OK;
Expand All @@ -41,6 +43,8 @@ scrobbler_status_t scrobbler_update_now_playing(scrobbler_session_t *sbs, scrobb
scrobbler_trackinfo_t cmusfm_notify_show_sbt = { 0 };
int cmusfm_notify_show_count = 0;
void cmusfm_notify_show(const scrobbler_trackinfo_t *sbt, const char *icon) {
(void)icon;
memcpy(&scrobbler_update_now_playing_sbt, sbt, sizeof(scrobbler_update_now_playing_sbt));
memcpy(&cmusfm_notify_show_sbt, sbt, sizeof(cmusfm_notify_show_sbt));
cmusfm_notify_show_count++;
}
Expand All @@ -52,14 +56,14 @@ void cmusfm_server_update_record_checksum(struct cmusfm_data_record *record) {
}

/* other (irrelevant) functions used by the server code */
void cmusfm_cache_update(const scrobbler_trackinfo_t *sbt) {}
void cmusfm_cache_submit(scrobbler_session_t *sbs) {}
int cmusfm_config_read(const char *fname, struct cmusfm_config *conf) { return 0; }
int cmusfm_config_add_watch(int fd) { return 0; }
void cmusfm_cache_update(const scrobbler_trackinfo_t *sbt) { (void)sbt; }
void cmusfm_cache_submit(scrobbler_session_t *sbs) { (void)sbs; }
int cmusfm_config_read(const char *fname, struct cmusfm_config *conf) { (void)fname; (void)conf; return 0; }
int cmusfm_config_add_watch(int fd) { (void)fd; return 0; }
void cmusfm_notify_initialize() {}
void cmusfm_notify_free() {}
scrobbler_session_t *scrobbler_initialize(const char *api_url, const char *auth_url,
uint8_t api_key[16], uint8_t secret[16]) { return NULL; }
void scrobbler_free(scrobbler_session_t *sbs) {}
void scrobbler_set_session_key(scrobbler_session_t *sbs, const char *str) {}
scrobbler_status_t scrobbler_test_session_key(scrobbler_session_t *sbs) { return 0; }
uint8_t api_key[16], uint8_t secret[16]) { (void)api_url; (void)auth_url; (void)api_key; (void)secret; return NULL; }
void scrobbler_free(scrobbler_session_t *sbs) { (void)sbs; }
void scrobbler_set_session_key(scrobbler_session_t *sbs, const char *str) { (void)sbs; (void)str; }
scrobbler_status_t scrobbler_test_session_key(scrobbler_session_t *sbs) { (void)sbs; return 0; }

0 comments on commit 6866c12

Please sign in to comment.