Commit 47333c91 authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

COMP: Remove alignment warning

parent bc6ae064
...@@ -626,9 +626,15 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, ...@@ -626,9 +626,15 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
{ {
/* this "cast increases required alignment of target type" but /* this "cast increases required alignment of target type" but
we consider it OK anyway */ we consider it OK anyway */
struct curl_slist* list = array_state? struct curl_slist* list = 0;
(struct curl_slist*)array_value: if ( array_state )
va_arg(params, struct curl_slist*); {
memcpy(&list, &array_value, sizeof(struct curl_slist*));
}
else
{
list = va_arg(params, struct curl_slist*);
}
if( current_form->contentheader ) if( current_form->contentheader )
return_value = CURL_FORMADD_OPTION_TWICE; return_value = CURL_FORMADD_OPTION_TWICE;
......
...@@ -2692,7 +2692,7 @@ CURLcode ftp_regular_transfer(struct connectdata *conn) ...@@ -2692,7 +2692,7 @@ CURLcode ftp_regular_transfer(struct connectdata *conn)
cur_pos = slash_pos + 1; /* jump to the rest of the string */ cur_pos = slash_pos + 1; /* jump to the rest of the string */
if(++ftp->dirdepth >= ftp->diralloc) { if(++ftp->dirdepth >= ftp->diralloc) {
/* enlarge array */ /* enlarge array */
char *bigger; char **bigger;
ftp->diralloc *= 2; /* double the size each time */ ftp->diralloc *= 2; /* double the size each time */
bigger = realloc(ftp->dirs, ftp->diralloc * sizeof(ftp->dirs[0])); bigger = realloc(ftp->dirs, ftp->diralloc * sizeof(ftp->dirs[0]));
if(!bigger) { if(!bigger) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment