diff options
Diffstat (limited to 'src')
-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); } } |