1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 00:08:50 -05:00

Fix compile error when curl is not used

Noticed in my PowerPC Linux VM:

    cc1: warnings being treated as errors
    dload.c:45: error: 'get_filename' defined but not used
    make[3]: *** [dload.lo] Error 1

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-08-09 15:21:02 -05:00
parent 40ea6cd607
commit 6803260f26

View File

@ -42,6 +42,9 @@
#include "util.h" #include "util.h"
#include "handle.h" #include "handle.h"
#ifdef HAVE_LIBCURL
static double prevprogress; /* last download amount */
static const char *get_filename(const char *url) static const char *get_filename(const char *url)
{ {
char *filename = strrchr(url, '/'); char *filename = strrchr(url, '/');
@ -51,9 +54,6 @@ static const char *get_filename(const char *url)
return filename; return filename;
} }
#ifdef HAVE_LIBCURL
static double prevprogress; /* last download amount */
static char *get_fullpath(const char *path, const char *filename, static char *get_fullpath(const char *path, const char *filename,
const char *suffix) const char *suffix)
{ {