diff options
| author | 2009-08-04 19:13:08 +0200 | |
|---|---|---|
| committer | 2009-08-04 19:13:08 +0200 | |
| commit | ba107891b3ecb52fccc656bdd611142ffebef86d (patch) | |
| tree | ec2b182f9b47955747460a5d28f3fc89f7e3581a | |
| parent | 679f6cd2904aa84f65a4f0fc38a353f5ac7b9e46 (diff) | |
| download | usbmuxd-ba107891b3ecb52fccc656bdd611142ffebef86d.tar.gz usbmuxd-ba107891b3ecb52fccc656bdd611142ffebef86d.tar.bz2 | |
Fix compile-time warnings
Signed-off-by: Nikias Bassen <nikias@gmx.li>
| -rw-r--r-- | src/usbmux.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/usbmux.c b/src/usbmux.c index 29f9879..20c1298 100644 --- a/src/usbmux.c +++ b/src/usbmux.c | |||
| @@ -119,7 +119,7 @@ void usbmux_set_debug(int e) | |||
| 119 | toto_debug = e; | 119 | toto_debug = e; |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | void log_debug_msg(const char *format, ...) | 122 | static void log_debug_msg(const char *format, ...) |
| 123 | { | 123 | { |
| 124 | #ifndef STRIP_DEBUG_CODE | 124 | #ifndef STRIP_DEBUG_CODE |
| 125 | va_list args; | 125 | va_list args; |
| @@ -170,7 +170,7 @@ static void print_buffer(const char *data, const int length) | |||
| 170 | printf("\n"); | 170 | printf("\n"); |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | void hton_header(usbmux_tcp_header * hdr) | 173 | static void hton_header(usbmux_tcp_header * hdr) |
| 174 | { | 174 | { |
| 175 | if (hdr) { | 175 | if (hdr) { |
| 176 | hdr->length = htonl(hdr->length); | 176 | hdr->length = htonl(hdr->length); |
| @@ -180,7 +180,7 @@ void hton_header(usbmux_tcp_header * hdr) | |||
| 180 | } | 180 | } |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | void ntoh_header(usbmux_tcp_header * hdr) | 183 | static void ntoh_header(usbmux_tcp_header * hdr) |
| 184 | { | 184 | { |
| 185 | if (hdr) { | 185 | if (hdr) { |
| 186 | hdr->length = ntohl(hdr->length); | 186 | hdr->length = ntohl(hdr->length); |
| @@ -194,7 +194,7 @@ void ntoh_header(usbmux_tcp_header * hdr) | |||
| 194 | * | 194 | * |
| 195 | * @return A USBMux header | 195 | * @return A USBMux header |
| 196 | */ | 196 | */ |
| 197 | usbmux_version_header *version_header() | 197 | static usbmux_version_header *version_header() |
| 198 | { | 198 | { |
| 199 | usbmux_version_header *version = | 199 | usbmux_version_header *version = |
| 200 | (usbmux_version_header *) malloc(sizeof(usbmux_version_header)); | 200 | (usbmux_version_header *) malloc(sizeof(usbmux_version_header)); |
| @@ -423,7 +423,7 @@ int usbmux_free_device(usbmux_device_t device) | |||
| 423 | * @param datalen The length of the data | 423 | * @param datalen The length of the data |
| 424 | * @return The number of bytes sent, or -ERRNO on error | 424 | * @return The number of bytes sent, or -ERRNO on error |
| 425 | */ | 425 | */ |
| 426 | int send_to_device(usbmux_device_t device, char *data, int datalen) | 426 | static int send_to_device(usbmux_device_t device, char *data, int datalen) |
| 427 | { | 427 | { |
| 428 | if (!device) | 428 | if (!device) |
| 429 | return -EINVAL; | 429 | return -EINVAL; |
| @@ -505,7 +505,7 @@ if (toto_debug > 0) { | |||
| 505 | * | 505 | * |
| 506 | * @return How many bytes were read in, or -1 on error. | 506 | * @return How many bytes were read in, or -1 on error. |
| 507 | */ | 507 | */ |
| 508 | int recv_from_device_timeout(usbmux_device_t device, char *data, | 508 | static int recv_from_device_timeout(usbmux_device_t device, char *data, |
| 509 | int datalen, int timeoutmillis) | 509 | int datalen, int timeoutmillis) |
| 510 | { | 510 | { |
| 511 | if (!device) | 511 | if (!device) |
| @@ -551,7 +551,7 @@ int recv_from_device_timeout(usbmux_device_t device, char *data, | |||
| 551 | * | 551 | * |
| 552 | * @return A USBMux packet | 552 | * @return A USBMux packet |
| 553 | */ | 553 | */ |
| 554 | usbmux_tcp_header *new_mux_packet(uint16_t s_port, uint16_t d_port) | 554 | static usbmux_tcp_header *new_mux_packet(uint16_t s_port, uint16_t d_port) |
| 555 | { | 555 | { |
| 556 | usbmux_tcp_header *conn = | 556 | usbmux_tcp_header *conn = |
| 557 | (usbmux_tcp_header *) malloc(sizeof(usbmux_tcp_header)); | 557 | (usbmux_tcp_header *) malloc(sizeof(usbmux_tcp_header)); |
| @@ -883,7 +883,7 @@ int usbmux_send(usbmux_client_t client, const char *data, uint32_t datalen, | |||
| 883 | * | 883 | * |
| 884 | * @return number of bytes consumed (header + data) | 884 | * @return number of bytes consumed (header + data) |
| 885 | */ | 885 | */ |
| 886 | uint32_t append_receive_buffer(usbmux_client_t client, char *packet) | 886 | static uint32_t append_receive_buffer(usbmux_client_t client, char *packet) |
| 887 | { | 887 | { |
| 888 | if (client == NULL || packet == NULL) | 888 | if (client == NULL || packet == NULL) |
| 889 | return 0; | 889 | return 0; |
| @@ -1035,7 +1035,7 @@ uint32_t append_receive_buffer(usbmux_client_t client, char *packet) | |||
| 1035 | * because we're only called from one location, pullbulk, where the lock | 1035 | * because we're only called from one location, pullbulk, where the lock |
| 1036 | * is already held. | 1036 | * is already held. |
| 1037 | */ | 1037 | */ |
| 1038 | usbmux_client_t find_client(usbmux_tcp_header * recv_header) | 1038 | static usbmux_client_t find_client(usbmux_tcp_header * recv_header) |
| 1039 | { | 1039 | { |
| 1040 | // remember, as we're looking for the client, the receive header is | 1040 | // remember, as we're looking for the client, the receive header is |
| 1041 | // coming from the USB into our client. This means that when we check | 1041 | // coming from the USB into our client. This means that when we check |
