diff options
author | tradke <tradke@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2001-04-22 17:11:42 +0000 |
---|---|---|
committer | tradke <tradke@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2001-04-22 17:11:42 +0000 |
commit | 0ce1ba080af11013a2f8450438ce6322ef85c68b (patch) | |
tree | 59dffc00e6200958e99596d92599ecd2ed18862c /src/Parameters.c | |
parent | 04c49872fd97d93e637ddb92d72d06059d145b1d (diff) |
T3E compiler refuses to implicitly cast 'const <something> *' pointers
to 'void *'. Putting both types into a union also fixes this nasty compiler
warning about cast discarding 'const' from pointer target value.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@122 1faa4e14-9dd3-4be0-9f0e-ffe519881164
Diffstat (limited to 'src/Parameters.c')
-rw-r--r-- | src/Parameters.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Parameters.c b/src/Parameters.c index 1130d85..ffc3b3e 100644 --- a/src/Parameters.c +++ b/src/Parameters.c @@ -95,7 +95,11 @@ int HTTPi_RegisterParameterPages(void) char pagename[27+20+100]; /* Thorns have maximum length then added 100 for parameters */ char *namecopy; - const cParamData *pData; + union + { + const cParamData *pData; + void *non_const_pData; + } u; /* Two ways to do this - can either just have one function * registered as /Parameters which then checks request->residual, @@ -123,11 +127,11 @@ int HTTPi_RegisterParameterPages(void) /* Walk through all parameters of given implementation. */ first = 1; - while(CCTK_ParameterWalk(first, thorn, NULL, &pData) == 0) + while(CCTK_ParameterWalk(first, thorn, NULL, &u.pData) == 0) { first = 0; - sprintf(pagename,"/Parameters/%s/%s",thorn,pData->name); - HTTP_RegisterPage(pagename, ParameterPage, pData); + sprintf(pagename,"/Parameters/%s/%s",thorn,u.pData->name); + HTTP_RegisterPage(pagename, ParameterPage, u.non_const_pData); } } |