summaryrefslogtreecommitdiff
path: root/net/libfetch
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2012-04-07 15:09:23 +0000
committerwiz <wiz@pkgsrc.org>2012-04-07 15:09:23 +0000
commit62b384b9be0515d0f562bb8a50fbb9ded2f28d06 (patch)
treef83ec298bde3fd7351eaa24f5ca6413e3b55206b /net/libfetch
parentfc845eeb3d1556f11997504b0a007408c3c73bc9 (diff)
downloadpkgsrc-62b384b9be0515d0f562bb8a50fbb9ded2f28d06.tar.gz
Fix build with clang.
Diffstat (limited to 'net/libfetch')
-rw-r--r--net/libfetch/files/common.h4
-rw-r--r--net/libfetch/files/ftp.c5
-rw-r--r--net/libfetch/files/http.c3
3 files changed, 7 insertions, 5 deletions
diff --git a/net/libfetch/files/common.h b/net/libfetch/files/common.h
index 4a9bbb07a37..de2964a661d 100644
--- a/net/libfetch/files/common.h
+++ b/net/libfetch/files/common.h
@@ -1,4 +1,4 @@
-/* $NetBSD: common.h,v 1.17 2011/11/06 20:03:50 tcort Exp $ */
+/* $NetBSD: common.h,v 1.18 2012/04/07 15:09:23 wiz Exp $ */
/*-
* Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
* All rights reserved.
@@ -90,7 +90,7 @@ struct fetcherr {
void fetch_seterr(struct fetcherr *, int);
void fetch_syserr(void);
-void fetch_info(const char *, ...);
+void fetch_info(const char *, ...) __printflike(1, 2);
int fetch_default_port(const char *);
int fetch_default_proxy_port(const char *);
int fetch_bind(int, int, const char *);
diff --git a/net/libfetch/files/ftp.c b/net/libfetch/files/ftp.c
index 7b1da11fd82..d9e41241ec4 100644
--- a/net/libfetch/files/ftp.c
+++ b/net/libfetch/files/ftp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ftp.c,v 1.40 2011/11/08 18:02:27 joerg Exp $ */
+/* $NetBSD: ftp.c,v 1.41 2012/04/07 15:09:23 wiz Exp $ */
/*-
* Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
* Copyright (c) 2008, 2009, 2010 Joerg Sonnenberger <joerg@NetBSD.org>
@@ -98,6 +98,7 @@
#include "common.h"
#include "ftperr.h"
+static int ftp_cmd(conn_t *, const char *, ...) __printflike(2, 3);
#define FTP_ANONYMOUS_USER "anonymous"
#define FTP_CONNECTION_ALREADY_OPEN 125
@@ -387,7 +388,7 @@ ftp_cwd(conn_t *conn, const char *path, int subdir)
++beg, ++i;
for (++i; dst + i < end && dst[i] != '/'; ++i)
/* nothing */ ;
- e = ftp_cmd(conn, "CWD %.*s\r\n", dst + i - beg, beg);
+ e = ftp_cmd(conn, "CWD %.*s\r\n", (int)(dst + i - beg), beg);
if (e != FTP_FILE_ACTION_OK) {
free(dst);
ftp_seterr(e);
diff --git a/net/libfetch/files/http.c b/net/libfetch/files/http.c
index c6d0d80ccfc..882fc4108aa 100644
--- a/net/libfetch/files/http.c
+++ b/net/libfetch/files/http.c
@@ -1,4 +1,4 @@
-/* $NetBSD: http.c,v 1.30 2011/01/23 18:37:31 agc Exp $ */
+/* $NetBSD: http.c,v 1.31 2012/04/07 15:09:23 wiz Exp $ */
/*-
* Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav
* Copyright (c) 2003 Thomas Klausner <wiz@NetBSD.org>
@@ -133,6 +133,7 @@
#define HTTP_ERROR(xyz) ((xyz) > 400 && (xyz) < 599)
+static int http_cmd(conn_t *, const char *, ...) __printflike(2, 3);
/*****************************************************************************
* I/O functions for decoding chunked streams