]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Remove a few compiler warnings.
authorMike Brady <mikebrady@eircom.net>
Sun, 21 Oct 2018 16:00:56 +0000 (17:00 +0100)
committerMike Brady <mikebrady@eircom.net>
Sun, 21 Oct 2018 16:00:56 +0000 (17:00 +0100)
player.c
player.h
rtsp.c

index 7c055a5cc0288da63a70716adf205651a3f4fc86..ac799409a724a05663c3ac135f5a8515b57c4e85 100644 (file)
--- a/player.c
+++ b/player.c
@@ -1610,7 +1610,7 @@ void *player_thread_func(void *arg) {
   signed short *inbuf;
   int inbuflength;
 
-  int output_bit_depth = 16; // default;
+  unsigned int output_bit_depth = 16; // default;
 
   switch (config.output_format) {
   case SPS_FORMAT_S8:
index 43d93c052970b606909f15a50131252d040bb093..5c0adc242dd82709f6a14015ad5066310066a46f 100644 (file)
--- a/player.h
+++ b/player.h
@@ -111,7 +111,7 @@ typedef struct {
   // other stuff...
   pthread_t *player_thread;
   abuf_t audio_buffer[BUFFER_FRAMES];
-  int max_frames_per_packet, input_num_channels, input_bit_depth, input_rate;
+  unsigned int max_frames_per_packet, input_num_channels, input_bit_depth, input_rate;
   int input_bytes_per_frame, output_bytes_per_frame, output_sample_ratio;
   int max_frame_size_change;
   int64_t previous_random_number;
diff --git a/rtsp.c b/rtsp.c
index 32759d43d38d79338474fffbf4b461f13052bfe5..834e56e89b2c3e936148dd40898772a2c9900e85 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -285,7 +285,7 @@ void cancel_all_RTSP_threads(void) {
   }
 }
 
-static void cleanup_threads(void) {
+void cleanup_threads(void) {
   void *retval;
   int i;
   // debug(2, "culling threads.");
@@ -348,7 +348,7 @@ static char *nextline(char *in, int inbuf) {
   return out;
 }
 
-static void msg_retain(rtsp_message *msg) {
+void msg_retain(rtsp_message *msg) {
   if (msg) {
     int rc = pthread_mutex_lock(&reference_counter_lock);
     if (rc)
@@ -362,7 +362,7 @@ static void msg_retain(rtsp_message *msg) {
   }
 }
 
-static rtsp_message *msg_init(void) {
+rtsp_message *msg_init(void) {
   rtsp_message *msg = malloc(sizeof(rtsp_message));
   if (msg) {
     memset(msg, 0, sizeof(rtsp_message));
@@ -373,7 +373,7 @@ static rtsp_message *msg_init(void) {
   return msg;
 }
 
-static int msg_add_header(rtsp_message *msg, char *name, char *value) {
+int msg_add_header(rtsp_message *msg, char *name, char *value) {
   if (msg->nheaders >= sizeof(msg->name) / sizeof(char *)) {
     warn("too many headers?!");
     return 1;
@@ -386,7 +386,7 @@ static int msg_add_header(rtsp_message *msg, char *name, char *value) {
   return 0;
 }
 
-static char *msg_get_header(rtsp_message *msg, char *name) {
+char *msg_get_header(rtsp_message *msg, char *name) {
   unsigned int i;
   for (i = 0; i < msg->nheaders; i++)
     if (!strcasecmp(msg->name[i], name))
@@ -394,7 +394,7 @@ static char *msg_get_header(rtsp_message *msg, char *name) {
   return NULL;
 }
 
-static void debug_print_msg_headers(int level, rtsp_message *msg) {
+void debug_print_msg_headers(int level, rtsp_message *msg) {
   unsigned int i;
   for (i = 0; i < msg->nheaders; i++) {
     debug(level, "  Type: \"%s\", content: \"%s\"", msg->name[i], msg->value[i]);
@@ -424,7 +424,7 @@ static void debug_print_msg_content(int level, rtsp_message *msg) {
 }
 */
 
-static void msg_free(rtsp_message *msg) {
+void msg_free(rtsp_message *msg) {
 
   if (msg) {
     int rc = pthread_mutex_lock(&reference_counter_lock);
@@ -452,7 +452,7 @@ static void msg_free(rtsp_message *msg) {
   }
 }
 
-static int msg_handle_line(rtsp_message **pmsg, char *line) {
+int msg_handle_line(rtsp_message **pmsg, char *line) {
   rtsp_message *msg = *pmsg;
 
   if (!msg) {
@@ -507,7 +507,7 @@ fail:
   return 0;
 }
 
-static enum rtsp_read_request_response rtsp_read_request(rtsp_conn_info *conn,
+enum rtsp_read_request_response rtsp_read_request(rtsp_conn_info *conn,
                                                          rtsp_message **the_packet) {
   enum rtsp_read_request_response reply = rtsp_read_request_response_ok;
   ssize_t buflen = 4096;
@@ -649,7 +649,7 @@ shutdown:
   return reply;
 }
 
-static void msg_write_response(int fd, rtsp_message *resp) {
+void msg_write_response(int fd, rtsp_message *resp) {
   char pkt[2048];
   int pktfree = sizeof(pkt);
   char *p = pkt;
@@ -697,7 +697,7 @@ static void msg_write_response(int fd, rtsp_message *resp) {
     debug(1, "Error writing an RTSP packet -- requested bytes not fully written.");
 }
 
-static void handle_record(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
+void handle_record(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
   debug(2, "Connection %d: RECORD", conn->connection_number);
 
   if (conn->player_thread)
@@ -737,7 +737,7 @@ static void handle_record(rtsp_conn_info *conn, rtsp_message *req, rtsp_message
   }
 }
 
-static void handle_options(rtsp_conn_info *conn, __attribute__((unused)) rtsp_message *req,
+void handle_options(rtsp_conn_info *conn, __attribute__((unused)) rtsp_message *req,
                            rtsp_message *resp) {
   debug(3, "Connection %d: OPTIONS", conn->connection_number);
   resp->respcode = 200;
@@ -746,7 +746,7 @@ static void handle_options(rtsp_conn_info *conn, __attribute__((unused)) rtsp_me
                                  "OPTIONS, GET_PARAMETER, SET_PARAMETER");
 }
 
-static void handle_teardown(rtsp_conn_info *conn, __attribute__((unused)) rtsp_message *req,
+void handle_teardown(rtsp_conn_info *conn, __attribute__((unused)) rtsp_message *req,
                             rtsp_message *resp) {
   debug(2, "Connection %d: TEARDOWN", conn->connection_number);
   // if (!rtsp_playing())
@@ -763,7 +763,7 @@ static void handle_teardown(rtsp_conn_info *conn, __attribute__((unused)) rtsp_m
         conn->connection_number);
 }
 
-static void handle_flush(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
+void handle_flush(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
   debug(3, "Connection %d: FLUSH", conn->connection_number);
   //  if (!rtsp_playing())
   //    debug(1, "This RTSP conversation thread (%d) doesn't think it's playing, but "
@@ -793,7 +793,7 @@ static void handle_flush(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *
   resp->respcode = 200;
 }
 
-static void handle_setup(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
+void handle_setup(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
   debug(3, "Connection %d: SETUP", conn->connection_number);
   uint16_t cport, tport;
 
@@ -903,7 +903,7 @@ static void handle_ignore(rtsp_conn_info *conn, rtsp_message *req, rtsp_message
 }
 */
 
-static void handle_set_parameter_parameter(rtsp_conn_info *conn, rtsp_message *req,
+void handle_set_parameter_parameter(rtsp_conn_info *conn, rtsp_message *req,
                                            __attribute__((unused)) rtsp_message *resp) {
   char *cp = req->content;
   int cp_left = req->contentlength;