From 49ce3e5160a9576e797bf87cef012b09d1c54ecb Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 12 Jul 2007 21:11:10 +0000 Subject: Fixed some compile warnings and errors and improved portability in the examples. Removed ftp3rdparty.c since libcurl doesn't support 3rd party FTP transfers any longer. --- docs/examples/ghiper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/examples/ghiper.c') diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c index cd0895b5f..db7d3cb1c 100644 --- a/docs/examples/ghiper.c +++ b/docs/examples/ghiper.c @@ -91,9 +91,9 @@ typedef struct _SockInfo { /* Die if we get a bad CURLMcode somewhere */ -static void mcode_or_die(char *where, CURLMcode code) { +static void mcode_or_die(const char *where, CURLMcode code) { if ( CURLM_OK != code ) { - char *s; + const char *s; switch (code) { case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break; case CURLM_OK: s="CURLM_OK"; break; @@ -259,7 +259,7 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp) { GlobalInfo *g = (GlobalInfo*) cbp; SockInfo *fdp = (SockInfo*) sockp; - char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" }; + static const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" }; MSG_OUT("socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]); if (what == CURL_POLL_REMOVE) { @@ -402,7 +402,7 @@ static gboolean fifo_cb (GIOChannel *ch, GIOCondition condition, gpointer data) int init_fifo(void) { struct stat st; - char *fifo = "hiper.fifo"; + const char *fifo = "hiper.fifo"; int socket; if (lstat (fifo, &st) == 0) { -- cgit v1.2.3