From 692fd2f1f56eab73dacc6e991070ec0236496417 Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 30 Oct 2001 13:57:57 +0000 Subject: Fixed const pointer issue in the advertised file structure. Fixed warnings on unused arguments. git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPDExtra/trunk@33 61ea717e-8e0c-4c3c-b38e-e9c67f54f1f1 --- src/IO.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/IO.c b/src/IO.c index d979594..4a392cd 100644 --- a/src/IO.c +++ b/src/IO.c @@ -52,7 +52,7 @@ struct httpuMimeType ********************* Local Routine Prototypes ********************* ********************************************************************/ -static int IOFileListener(cGH *GH, const char *filename, +static int IOFileListener(const cGH *GH, const char *filename, const ioAdvertisedFileDesc *description); static int AdvertisedFilePage(cGH *cctkGH, httpRequest *request, void *data); @@ -120,13 +120,17 @@ int HTTP_util_RegisterIOPages(void) @endhistory @@*/ -static int IOFileListener(cGH *GH, const char *filename, +static int IOFileListener(const cGH *GH, const char *filename, const ioAdvertisedFileDesc *description) { struct httpuFileList *entry; struct httpuMimeType *type; char *position; + + /* avoid compiler warning about unused parameter */ + GH = GH; + entry = (struct httpuFileList *)malloc(sizeof(struct httpuFileList)); if(entry) @@ -199,6 +203,10 @@ static int AdvertisedFilePage(cGH *cctkGH, httpRequest *request, void *data) char message[4098]; struct httpuFileList *list; + + /* avoid compiler warning about unused parameter */ + data = data; + /* Status message */ strcpy(message,"HTTP/1.0 200 OK\r\n"); @@ -287,6 +295,11 @@ static int SendFilePage(cGH *cctkGH, httpRequest *request, void *data) struct httpuFileList *list; int filedes; + + /* avoid compiler warning about unused parameters */ + cctkGH = cctkGH; + data = data; + for (list = filelist; list; list = list->next) { if(!strcmp(list->linkname, request->residual)) @@ -368,6 +381,11 @@ static int ViewportFilePage(cGH *cctkGH, httpRequest *request, void *data) char message[4098]; struct httpuFileList *list; + + /* avoid compiler warning about unused parameters */ + cctkGH = cctkGH; + data = data; + /* Status message */ strcpy(message,"HTTP/1.0 200 OK\r\n"); -- cgit v1.2.3