]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix printf format modifier to build properly with CLANG.
authorUser Decke <decke@bluelife.at>
Mon, 6 May 2013 13:57:14 +0000 (15:57 +0200)
committerAdam Sutton <dev@adamsutton.me.uk>
Fri, 31 May 2013 13:19:26 +0000 (14:19 +0100)
src/htsp_server.c:485:55: error: format specifies type 'short' but the argument has type 'int' [-Werror,-Wformat]
        p += snprintf(url+p, sizeof(url)-p, "%s%s%s:%hd%s",
                                                    ~~^
                                                    %d

src/htsp_server.c

index 0261e5d43776919bf28b54f900c66538c0e04917..1931fb838ee5cc63e29dc8c1f54f44982f0b0ee8 100644 (file)
@@ -527,7 +527,7 @@ htsp_build_channel(channel_t *ch, const char *method, htsp_connection_t *htsp)
         tcp_get_ip_str((struct sockaddr*)&addr, buf, 50);
         strcpy(url, "http://");
         p = strlen(url);
-        p += snprintf(url+p, sizeof(url)-p, "%s%s%s:%hd%s",
+        p += snprintf(url+p, sizeof(url)-p, "%s%s%s:%d%s",
                       (addr.ss_family == AF_INET6)?"[":"",
                       buf,
                       (addr.ss_family == AF_INET6)?"]":"",