diff --git a/lib/airplay_video.c b/lib/airplay_video.c index b9f8534..ad579ff 100644 --- a/lib/airplay_video.c +++ b/lib/airplay_video.c @@ -892,7 +892,7 @@ char *adjust_yt_condensed_playlist(const char *media_playlist) { new_pos += len; old_pos += len; - assert(byte_count == new_len); + assert(byte_count == (int) new_len); free (prefix); free (base_uri); diff --git a/lib/logger.c b/lib/logger.c index e6858b5..ab27e11 100644 --- a/lib/logger.c +++ b/lib/logger.c @@ -104,7 +104,7 @@ logger_log(logger_t *logger, int level, const char *fmt, ...) va_start(ap, fmt); int message_len = vsnprintf(buffer, sizeof(buffer), fmt, ap); va_end(ap); - if (message_len >= sizeof(buffer)) { + if (message_len >= (int) sizeof(buffer)) { snprintf(err_buf, sizeof(err_buf), err_fmt, message_len, (int) sizeof(buffer) -1); } MUTEX_LOCK(logger->cb_mutex); diff --git a/lib/pairing.c b/lib/pairing.c index f737ef2..c83200e 100644 --- a/lib/pairing.c +++ b/lib/pairing.c @@ -198,7 +198,7 @@ pairing_session_get_public_key(pairing_session_t *session, unsigned char ecdh_ke int pairing_session_make_nonce(pairing_session_t *session, uint64_t *local_time, const char *client_data, unsigned char *nonce, int len) { unsigned char hash[SHA512_DIGEST_LENGTH]; - if (len > sizeof(hash)) { + if (len > (int) sizeof(hash)) { return -1; } if (!client_data || !local_time || !session || !nonce || len <= 0) { diff --git a/lib/raop_buffer.c b/lib/raop_buffer.c index 96fd8b0..dc87b40 100644 --- a/lib/raop_buffer.c +++ b/lib/raop_buffer.c @@ -211,7 +211,7 @@ raop_buffer_enqueue(raop_buffer_t *raop_buffer, unsigned char *data, unsigned sh entry->payload_data = malloc(payload_size); int decrypt_ret = raop_buffer_decrypt(raop_buffer, data, entry->payload_data, payload_size, &entry->payload_size); assert(decrypt_ret >= 0); - assert(entry->payload_size <= payload_size); + assert((int) entry->payload_size <= payload_size); /* Update the raop_buffer seqnums */ if (raop_buffer->is_empty) { diff --git a/lib/raop_handlers.h b/lib/raop_handlers.h index 1d9ccdb..2ba264a 100644 --- a/lib/raop_handlers.h +++ b/lib/raop_handlers.h @@ -271,8 +271,6 @@ raop_handler_pairpinstart(raop_conn_t *conn, raop->callbacks.display_pin(raop->callbacks.cls, pin); } logger_log(raop->logger, LOGGER_INFO, "*** CLIENT MUST NOW ENTER PIN = \"%s\" AS AIRPLAY PASSWORD", pin); - *response_data = NULL; - response_datalen = 0; } static void @@ -320,10 +318,8 @@ raop_handler_pairsetup_pin(raop_conn_t *conn, plist_get_string_val(req_method_node, &method); if (strncmp(method, "pin", strlen (method))) { logger_log(raop->logger, LOGGER_ERR, "error, required method is \"pin\", client requested \"%s\"", method); - *response_data = NULL; - response_datalen = 0; - free (method); - plist_free (req_root_node); + free (method); + plist_free (req_root_node); return; } plist_mem_free(method); @@ -908,7 +904,7 @@ raop_handler_setup(raop_conn_t *conn, conn->raop_rtp_mirror = NULL; char remote[40] = { 0 }; int len = utils_ipaddress_to_string(conn->remotelen, conn->remote, conn->zone_id, remote, (int) sizeof(remote)); - if (!len || len > sizeof(remote)) { + if (!len || len > (int) sizeof(remote)) { char *str = utils_data_to_string(conn->remote, conn->remotelen, 16); logger_log(raop->logger, LOGGER_ERR, "failed to extract valid client ip address:\n" "*** UxPlay will be unable to send communications to client.\n" diff --git a/lib/raop_rtp_mirror.c b/lib/raop_rtp_mirror.c index 9f23ade..12792fd 100644 --- a/lib/raop_rtp_mirror.c +++ b/lib/raop_rtp_mirror.c @@ -371,7 +371,7 @@ raop_rtp_mirror_thread(void *arg) readstart = 0; } - while (readstart < payload_size) { + while ((int) readstart < payload_size) { // Payload data unsigned char *pos = payload + readstart; ret = recv(stream_fd, CAST pos, payload_size - readstart, 0); diff --git a/lib/srp.c b/lib/srp.c index 26a278c..7fd752c 100644 --- a/lib/srp.c +++ b/lib/srp.c @@ -526,7 +526,7 @@ static int hash_session_key( SRP_HashAlgorithm alg, const BIGNUM * n, unsigned c static void calculate_M( SRP_HashAlgorithm alg, NGConstant *ng, unsigned char * dest, const char * I, const BIGNUM * s, const BIGNUM * A, const BIGNUM * B, const unsigned char * K ) { - unsigned char H_N[ SHA512_DIGEST_LENGTH ] = {0}; + unsigned char H_N[ SHA512_DIGEST_LENGTH ] = {0}; unsigned char H_g[ SHA512_DIGEST_LENGTH ] = {0}; unsigned char H_I[ SHA512_DIGEST_LENGTH ] = {0}; unsigned char H_xor[ SHA512_DIGEST_LENGTH ] = {0}; diff --git a/lib/utils.c b/lib/utils.c index 061557c..a4d1571 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -211,7 +211,7 @@ char *utils_data_to_string(const unsigned char *data, int datalen, int chars_per n--; p++; assert(p == &(str[len])); - assert(len == strlen(str)); + assert(len == (int) strlen(str)); return str; }