summaryrefslogtreecommitdiffstats
path: root/Source/CTest/Curl/formdata.c
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-10-11 14:10:53 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-10-11 14:10:53 (GMT)
commit47333c91135e8b67674252748a19c9f3992d50b8 (patch)
tree652e7b0bf8f32be1b9007f649ec9c09913a80552 /Source/CTest/Curl/formdata.c
parentbc6ae0649b849b4c7df3977f449d84f6d319f66e (diff)
downloadCMake-47333c91135e8b67674252748a19c9f3992d50b8.zip
CMake-47333c91135e8b67674252748a19c9f3992d50b8.tar.gz
CMake-47333c91135e8b67674252748a19c9f3992d50b8.tar.bz2
COMP: Remove alignment warning
Diffstat (limited to 'Source/CTest/Curl/formdata.c')
-rw-r--r--Source/CTest/Curl/formdata.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/CTest/Curl/formdata.c b/Source/CTest/Curl/formdata.c
index 42ed0ec..8f9b41e 100644
--- a/Source/CTest/Curl/formdata.c
+++ b/Source/CTest/Curl/formdata.c
@@ -626,9 +626,15 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
{
/* this "cast increases required alignment of target type" but
we consider it OK anyway */
- struct curl_slist* list = array_state?
- (struct curl_slist*)array_value:
- va_arg(params, struct curl_slist*);
+ struct curl_slist* list = 0;
+ if ( array_state )
+ {
+ memcpy(&list, &array_value, sizeof(struct curl_slist*));
+ }
+ else
+ {
+ list = va_arg(params, struct curl_slist*);
+ }
if( current_form->contentheader )
return_value = CURL_FORMADD_OPTION_TWICE;