Silicondust / libhdhomerun

Silicondust library and cli utility for controlling HDHomeRun tuners
GNU Lesser General Public License v2.1
110 stars 44 forks source link

gcc compiler warning with cross compile for windows #7

Closed garybuhrmaster closed 7 years ago

garybuhrmaster commented 7 years ago

When attempting to cross compile libhdhomerun for windows, I received the following warning:

hdhomerun_sock_windows.c:338:6: warning: no previous prototype for 'hdhomerun_sock_event_select' [-Wmissing-prototypes] bool hdhomerun_sock_event_select(struct hdhomerun_sock_t *sock, long events)

Proposed patch (the function appears local to this source file, so just make it static)

diff --git a/hdhomerun_sock_windows.c b/hdhomerun_sock_windows.c
index 810c0bc..ea5d232 100644
--- a/hdhomerun_sock_windows.c
+++ b/hdhomerun_sock_windows.c
@@ -335,7 +335,7 @@ bool hdhomerun_sock_bind(struct hdhomerun_sock_t *sock, uint32_t local_addr, uin
        return true;
 }

-bool hdhomerun_sock_event_select(struct hdhomerun_sock_t *sock, long events)
+static bool hdhomerun_sock_event_select(struct hdhomerun_sock_t *sock, long events)
 {
        if (sock->events_selected != events) {
                if (WSAEventSelect(sock->sock, sock->event, events) == SOCKET_ERROR) {
nickkelsey commented 7 years ago

Fixed - thanks