diff options
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmcurl/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Utilities/cmcurl/getdate.c | 4 | ||||
-rw-r--r-- | Utilities/cmcurl/inet_pton.c | 4 | ||||
-rw-r--r-- | Utilities/cmcurl/md5.c | 2 | ||||
-rw-r--r-- | Utilities/cmcurl/mprintf.c | 4 | ||||
-rw-r--r-- | Utilities/cmtar/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Utilities/cmtar/append.c | 6 | ||||
-rw-r--r-- | Utilities/cmtar/block.c | 8 | ||||
-rw-r--r-- | Utilities/cmtar/compat/snprintf.c | 10 | ||||
-rw-r--r-- | Utilities/cmtar/extract.c | 6 | ||||
-rw-r--r-- | Utilities/cmtar/handle.c | 4 | ||||
-rw-r--r-- | Utilities/cmtar/output.c | 2 | ||||
-rw-r--r-- | Utilities/cmxmlrpc/xmlrpc_array.c | 6 | ||||
-rw-r--r-- | Utilities/cmxmlrpc/xmlrpc_client.c | 4 | ||||
-rw-r--r-- | Utilities/cmxmlrpc/xmlrpc_data.c | 16 | ||||
-rw-r--r-- | Utilities/cmxmlrpc/xmlrpc_expat.c | 2 | ||||
-rw-r--r-- | Utilities/cmxmlrpc/xmlrpc_parse.c | 12 | ||||
-rw-r--r-- | Utilities/cmxmlrpc/xmlrpc_registry.c | 8 | ||||
-rw-r--r-- | Utilities/cmxmlrpc/xmlrpc_serialize.c | 6 | ||||
-rw-r--r-- | Utilities/cmxmlrpc/xmlrpc_struct.c | 4 | ||||
-rw-r--r-- | Utilities/cmxmlrpc/xmlrpc_strutil.c | 2 | ||||
-rw-r--r-- | Utilities/cmxmlrpc/xmlrpc_support.c | 2 |
22 files changed, 73 insertions, 59 deletions
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index b615242..6cec671 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -255,10 +255,18 @@ CHECK_INCLUDE_FILE_CONCAT("sys/utsname.h" HAVE_SYS_UTSNAME_H) CHECK_TYPE_SIZE(size_t SIZEOF_SIZE_T) CHECK_TYPE_SIZE(ssize_t SIZEOF_SSIZE_T) CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG) +CHECK_TYPE_SIZE("long" SIZEOF_LONG) +CHECK_TYPE_SIZE("__int64" SIZEOF___INT64) CHECK_TYPE_SIZE("long double" SIZEOF_LONG_DOUBLE) IF(NOT HAVE_SIZEOF_SSIZE_T) - SET(ssize_t int) + IF(SIZEOF_LONG EQUAL SIZEOF_SIZE_T) + SET(ssize_t long) + ENDIF(SIZEOF_LONG EQUAL SIZEOF_SIZE_T) + IF(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T) + SET(ssize_t __int64) + ENDIF(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T) ENDIF(NOT HAVE_SIZEOF_SSIZE_T) + IF(HAVE_SIZEOF_LONG_LONG) SET(HAVE_LONGLONG 1) ENDIF(HAVE_SIZEOF_LONG_LONG) diff --git a/Utilities/cmcurl/getdate.c b/Utilities/cmcurl/getdate.c index 6aca48e..2b97cf8 100644 --- a/Utilities/cmcurl/getdate.c +++ b/Utilities/cmcurl/getdate.c @@ -1105,7 +1105,7 @@ int yynerrs; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + YYSIZE_T yysize = (YYSIZE_T)(yyssp - yyss + 1); #ifdef yyoverflow { @@ -1281,7 +1281,7 @@ yyreduce: break; case 5: -#line 251 "getdate.y" + //#line 251 "getdate.y" { context->yyHaveZone++; } diff --git a/Utilities/cmcurl/inet_pton.c b/Utilities/cmcurl/inet_pton.c index 5e8e9b3..ed74c26 100644 --- a/Utilities/cmcurl/inet_pton.c +++ b/Utilities/cmcurl/inet_pton.c @@ -113,11 +113,11 @@ inet_pton4(const char *src, unsigned char *dst) const char *pch; if ((pch = strchr(digits, ch)) != NULL) { - u_int new = *tp * 10 + (pch - digits); + size_t new = *tp * 10 + (pch - digits); if (new > 255) return (0); - *tp = new; + *tp = (unsigned char)new; if (! saw_digit) { if (++octets > 4) return (0); diff --git a/Utilities/cmcurl/md5.c b/Utilities/cmcurl/md5.c index 269726b..a70b344 100644 --- a/Utilities/cmcurl/md5.c +++ b/Utilities/cmcurl/md5.c @@ -343,6 +343,6 @@ void Curl_md5it(unsigned char *outbuffer, /* 16 bytes */ { MD5_CTX ctx; MD5_Init(&ctx); - MD5_Update(&ctx, input, strlen((char *)input)); + MD5_Update(&ctx, input, (unsigned int)strlen((char *)input)); MD5_Final(outbuffer, &ctx); } diff --git a/Utilities/cmcurl/mprintf.c b/Utilities/cmcurl/mprintf.c index 569207a..12d1208 100644 --- a/Utilities/cmcurl/mprintf.c +++ b/Utilities/cmcurl/mprintf.c @@ -619,10 +619,10 @@ static int dprintf_formatf( char alt; /* Width of a field. */ - long width; + ssize_t width; /* Precision of a field. */ - long prec; + ssize_t prec; /* Decimal integer is negative. */ char is_neg; diff --git a/Utilities/cmtar/CMakeLists.txt b/Utilities/cmtar/CMakeLists.txt index 038c38c..3ef4100 100644 --- a/Utilities/cmtar/CMakeLists.txt +++ b/Utilities/cmtar/CMakeLists.txt @@ -169,7 +169,6 @@ ELSE(HAVE_SIZEOF_OFF_T) SET (HAVE_OFF_T 0) SET (off_t "long") ENDIF(HAVE_SIZEOF_OFF_T) - CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T) IF(HAVE_SIZEOF_SIZE_T) SET (HAVE_SIZE_T 1) @@ -183,7 +182,14 @@ IF(HAVE_SIZEOF_SSIZE_T) SET (HAVE_SSIZE_T 1) ELSE(HAVE_SIZEOF_SSIZE_T) SET (HAVE_SSIZE_T 0) - SET (ssize_t "int") + CHECK_TYPE_SIZE("long" SIZEOF_LONG) + CHECK_TYPE_SIZE("__int64" SIZEOF___INT64) + IF(SIZEOF_LONG EQUAL SIZEOF_SIZE_T) + SET(ssize_t "long") + ENDIF(SIZEOF_LONG EQUAL SIZEOF_SIZE_T) + IF(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T) + SET(ssize_t "__int64") + ENDIF(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T) ENDIF(HAVE_SIZEOF_SSIZE_T) CHECK_TYPE_SIZE("uid_t" SIZEOF_UID_T) diff --git a/Utilities/cmtar/append.c b/Utilities/cmtar/append.c index cc845ab..7cee558 100644 --- a/Utilities/cmtar/append.c +++ b/Utilities/cmtar/append.c @@ -217,7 +217,7 @@ tar_append_file(TAR *t, char *realname, char *savename) int tar_append_eof(TAR *t) { - int i, j; + ssize_t i, j; char block[T_BLOCKSIZE]; memset(&block, 0, T_BLOCKSIZE); @@ -242,7 +242,7 @@ tar_append_regfile(TAR *t, char *realname) { char block[T_BLOCKSIZE]; int filefd; - int i, j; + ssize_t i, j; size_t size; #if defined( _WIN32 ) || defined(__CYGWIN__) @@ -278,7 +278,7 @@ tar_append_regfile(TAR *t, char *realname) if (i > 0) { - j = read(filefd, &block, i); + j = (size_t)read(filefd, &block, (unsigned int)i); if (j == -1) return -1; memset(&(block[i]), 0, T_BLOCKSIZE - i); diff --git a/Utilities/cmtar/block.c b/Utilities/cmtar/block.c index f47f7ba..e618d79 100644 --- a/Utilities/cmtar/block.c +++ b/Utilities/cmtar/block.c @@ -27,7 +27,7 @@ int th_read_internal(TAR *t) { - int i; + ssize_t i; int num_zero_blocks = 0; #ifdef DEBUG @@ -82,7 +82,7 @@ th_read_internal(TAR *t) #ifdef DEBUG printf("<== th_read_internal(): returning %d\n", i); #endif - return i; + return (int)i; } @@ -90,7 +90,7 @@ th_read_internal(TAR *t) int th_read(TAR *t) { - int i, j; + ssize_t i, j; size_t sz; char *ptr; @@ -247,7 +247,7 @@ th_read(TAR *t) int th_write(TAR *t) { - int i, j; + ssize_t i, j; char type2; size_t sz, sz2; char *ptr; diff --git a/Utilities/cmtar/compat/snprintf.c b/Utilities/cmtar/compat/snprintf.c index 26a203e..ef6e2f1 100644 --- a/Utilities/cmtar/compat/snprintf.c +++ b/Utilities/cmtar/compat/snprintf.c @@ -316,7 +316,7 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) case 's': strvalue = va_arg (args, char *); if (max < 0) - max = maxlen; /* ie, no max */ + max = (int)maxlen; /* ie, no max */ fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); break; case 'p': @@ -328,19 +328,19 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) { short int *num; num = va_arg (args, short int *); - *num = currlen; + *num = (int)currlen; } else if (cflags == DP_C_LONG) { long int *num; num = va_arg (args, long int *); - *num = currlen; + *num = (int)currlen; } else { int *num; num = va_arg (args, int *); - *num = currlen; + *num = (int)currlen; } break; case '%': @@ -713,7 +713,7 @@ int mutt_snprintf (va_alist) va_dcl (void) mutt_vsnprintf(str, count, fmt, ap); #endif VA_END; - return(strlen(str)); + return((int)strlen(str)); } #ifdef TEST_SNPRINTF diff --git a/Utilities/cmtar/extract.c b/Utilities/cmtar/extract.c index 6d37659..3ebdeeb 100644 --- a/Utilities/cmtar/extract.c +++ b/Utilities/cmtar/extract.c @@ -224,7 +224,7 @@ tar_extract_regfile(TAR *t, char *realname) uid_t uid; gid_t gid; int fdout; - int i, k; + ssize_t i, k; char buf[T_BLOCKSIZE]; char *filename; char *pathname = 0; @@ -334,7 +334,7 @@ tar_extract_regfile(TAR *t, char *realname) /* write block to output file */ if (write(fdout, buf, - ((i > T_BLOCKSIZE) ? T_BLOCKSIZE : i)) == -1) + ((i > T_BLOCKSIZE) ? T_BLOCKSIZE : (unsigned int)i)) == -1) { if (pathname) { @@ -375,7 +375,7 @@ tar_extract_regfile(TAR *t, char *realname) int tar_skip_regfile(TAR *t) { - int i, k; + ssize_t i, k; size_t size; char buf[T_BLOCKSIZE]; diff --git a/Utilities/cmtar/handle.c b/Utilities/cmtar/handle.c index de324cb..4f6dd10 100644 --- a/Utilities/cmtar/handle.c +++ b/Utilities/cmtar/handle.c @@ -56,12 +56,12 @@ static int libtar_close(void* call_data) static ssize_t libtar_read(void* call_data, void* buf, size_t count) { struct libtar_fd_file* lf = (struct libtar_fd_file*)call_data; - return read(lf->fd, buf, count); + return (ssize_t)read(lf->fd, buf, (unsigned int)count); } static ssize_t libtar_write(void* call_data, const void* buf, size_t count) { struct libtar_fd_file* lf = (struct libtar_fd_file*)call_data; - return write(lf->fd, buf, count); + return (ssize_t) write(lf->fd, buf, (unsigned int)count); } static tartype_t default_type = { libtar_open, libtar_close, libtar_read, libtar_write, &libtar_fd_file_pointer }; diff --git a/Utilities/cmtar/output.c b/Utilities/cmtar/output.c index 56e5a74..283c594 100644 --- a/Utilities/cmtar/output.c +++ b/Utilities/cmtar/output.c @@ -118,7 +118,7 @@ th_print_long_ls(TAR *t) mtime = th_get_mtime(t); mtm = localtime(&mtime); #ifdef HAVE_STRFTIME - strftime(timebuf, sizeof(timebuf), "%h %e %H:%M %Y", mtm); + strftime(timebuf, sizeof(timebuf), "%b %d %H:%M %Y", mtm); printf("%s", timebuf); #else printf("%.3s %2d %2d:%02d %4d", diff --git a/Utilities/cmxmlrpc/xmlrpc_array.c b/Utilities/cmxmlrpc/xmlrpc_array.c index 31576f0..36010c6 100644 --- a/Utilities/cmxmlrpc/xmlrpc_array.c +++ b/Utilities/cmxmlrpc/xmlrpc_array.c @@ -22,7 +22,7 @@ xmlrpc_abort_if_array_bad(xmlrpc_value * const arrayP) { else if (arrayP->_type != XMLRPC_TYPE_ARRAY) abort(); else { - unsigned int const arraySize = + size_t const arraySize = XMLRPC_MEMBLOCK_SIZE(xmlrpc_value*, &arrayP->_block); xmlrpc_value ** const contents = XMLRPC_MEMBLOCK_CONTENTS(xmlrpc_value*, &arrayP->_block); @@ -51,7 +51,7 @@ xmlrpc_destroyArrayContents(xmlrpc_value * const arrayP) { Dispose of the contents of an array (but not the array value itself). The value is not valid after this. -----------------------------------------------------------------------------*/ - unsigned int const arraySize = + size_t const arraySize = XMLRPC_MEMBLOCK_SIZE(xmlrpc_value*, &arrayP->_block); xmlrpc_value ** const contents = XMLRPC_MEMBLOCK_CONTENTS(xmlrpc_value*, &arrayP->_block); @@ -83,7 +83,7 @@ xmlrpc_array_size(xmlrpc_env * const env, XMLRPC_ASSERT_VALUE_OK(array); XMLRPC_TYPE_CHECK(env, array, XMLRPC_TYPE_ARRAY); - retval = XMLRPC_TYPED_MEM_BLOCK_SIZE(xmlrpc_value*, &array->_block); + retval = (int)XMLRPC_TYPED_MEM_BLOCK_SIZE(xmlrpc_value*, &array->_block); cleanup: if (env->fault_occurred) diff --git a/Utilities/cmxmlrpc/xmlrpc_client.c b/Utilities/cmxmlrpc/xmlrpc_client.c index 329b160..a5ad65c 100644 --- a/Utilities/cmxmlrpc/xmlrpc_client.c +++ b/Utilities/cmxmlrpc/xmlrpc_client.c @@ -269,7 +269,7 @@ call_info_new(xmlrpc_env * const envP, if (!envP->fault_occurred) { xmlrpc_traceXml("XML-RPC CALL", XMLRPC_MEMBLOCK_CONTENTS(char, callXmlP), - XMLRPC_MEMBLOCK_SIZE(char, callXmlP)); + (unsigned int)XMLRPC_MEMBLOCK_SIZE(char, callXmlP)); callInfoP->serialized_xml = callXmlP; @@ -312,7 +312,7 @@ clientCallServerParams(xmlrpc_env * const envP, if (!envP->fault_occurred) { xmlrpc_traceXml("XML-RPC RESPONSE", XMLRPC_MEMBLOCK_CONTENTS(char, respXmlP), - XMLRPC_MEMBLOCK_SIZE(char, respXmlP)); + (unsigned int)XMLRPC_MEMBLOCK_SIZE(char, respXmlP)); *resultPP = xmlrpc_parse_response( envP, diff --git a/Utilities/cmxmlrpc/xmlrpc_data.c b/Utilities/cmxmlrpc/xmlrpc_data.c index fc6840f..0d3c3ca 100644 --- a/Utilities/cmxmlrpc/xmlrpc_data.c +++ b/Utilities/cmxmlrpc/xmlrpc_data.c @@ -254,12 +254,12 @@ xmlrpc_read_string(xmlrpc_env * const envP, -----------------------------------------------------------------------------*/ validateType(envP, valueP, XMLRPC_TYPE_STRING); if (!envP->fault_occurred) { - unsigned int const size = + size_t const size = XMLRPC_MEMBLOCK_SIZE(char, &valueP->_block); const char * const contents = XMLRPC_MEMBLOCK_CONTENTS(char, &valueP->_block); - verifyNoNulls(envP, contents, size); + verifyNoNulls(envP, contents, (unsigned int)size); if (!envP->fault_occurred) { char * stringValue; @@ -289,7 +289,7 @@ xmlrpc_read_string_lp(xmlrpc_env * const envP, validateType(envP, valueP, XMLRPC_TYPE_STRING); if (!envP->fault_occurred) { - unsigned int const size = + size_t const size = XMLRPC_MEMBLOCK_SIZE(char, &valueP->_block); const char * const contents = XMLRPC_MEMBLOCK_CONTENTS(char, &valueP->_block); @@ -304,7 +304,7 @@ xmlrpc_read_string_lp(xmlrpc_env * const envP, else { memcpy(stringValue, contents, size); *stringValueP = stringValue; - *lengthP = size; + *lengthP = (unsigned int)size; } } } @@ -449,7 +449,7 @@ getString(xmlrpc_env * const envP, xmlrpc_value ** const valPP) { const char * str; - unsigned int len; + size_t len; str = (const char*) va_arg(*args, char*); if (**formatP == '#') { @@ -458,7 +458,7 @@ getString(xmlrpc_env * const envP, } else len = strlen(str); - mkString(envP, str, len, valPP); + mkString(envP, str, (unsigned int)len, valPP); } @@ -1143,7 +1143,7 @@ parsevalue(xmlrpc_env * const envP, (*format)++; *sizeptr = len; } else - verifyNoNulls(envP, contents, len); + verifyNoNulls(envP, contents, (unsigned int)len); *strptr = contents; } break; @@ -1173,7 +1173,7 @@ parsevalue(xmlrpc_env * const envP, (*format)++; *sizeptr = len; } else - verifyNoNullsW(envP, wcontents, len); + verifyNoNullsW(envP, wcontents, (unsigned int)len); *wcsptr = wcontents; } } diff --git a/Utilities/cmxmlrpc/xmlrpc_expat.c b/Utilities/cmxmlrpc/xmlrpc_expat.c index 7fbc0c9..cb467d1 100644 --- a/Utilities/cmxmlrpc/xmlrpc_expat.c +++ b/Utilities/cmxmlrpc/xmlrpc_expat.c @@ -139,7 +139,7 @@ void xml_element_free (xml_element *elem) /* Deallocate all of our children recursively. */ children = &elem->_children; contents = XMLRPC_TYPED_MEM_BLOCK_CONTENTS(xml_element*, children); - size = XMLRPC_TYPED_MEM_BLOCK_SIZE(xml_element*, children); + size = (int)XMLRPC_TYPED_MEM_BLOCK_SIZE(xml_element*, children); for (i = 0; i < size; i++) xml_element_free(contents[i]); diff --git a/Utilities/cmxmlrpc/xmlrpc_parse.c b/Utilities/cmxmlrpc/xmlrpc_parse.c index 74e4c2d..0999eb6 100644 --- a/Utilities/cmxmlrpc/xmlrpc_parse.c +++ b/Utilities/cmxmlrpc/xmlrpc_parse.c @@ -248,7 +248,7 @@ static xmlrpc_value * convert_value(xmlrpc_env *env, unsigned *depth, xml_element *elem) { xml_element *child; - int child_count; + size_t child_count; char *cdata, *child_name; size_t cdata_size, ascii_len; xmlrpc_mem_block *decoded; @@ -356,7 +356,7 @@ convert_array(xmlrpc_env *env, unsigned *depth, xml_element *elem) { xml_element *data, **values, *value; xmlrpc_value *array, *item; - int size, i; + size_t size, i; XMLRPC_ASSERT_ENV_OK(env); XMLRPC_ASSERT(elem != NULL); @@ -413,7 +413,7 @@ convert_struct(xmlrpc_env *env, unsigned *depth, xml_element *elem) { xmlrpc_value *strct, *key, *value; xml_element **members, *member, *name_elem, *value_elem; - int size, i; + size_t size, i; char *cdata; size_t cdata_size; @@ -490,7 +490,7 @@ static xmlrpc_value * convert_params(xmlrpc_env *env, unsigned *depth, xml_element *elem) { xmlrpc_value *array, *item; - int size, i; + size_t size, i; xml_element **params, *param, *value; XMLRPC_ASSERT_ENV_OK(env); @@ -546,7 +546,7 @@ parseCallXml(xmlrpc_env * const envP, xmlrpc_env env; xmlrpc_env_init(&env); - *callElemP = xml_parse(&env, xmlData, xmlLen); + *callElemP = xml_parse(&env, xmlData, (int)xmlLen); if (env.fault_occurred) xmlrpc_env_set_fault_formatted( envP, env.fault_code, "Call is not valid XML. %s", @@ -697,7 +697,7 @@ xmlrpc_parse_response(xmlrpc_env *env, depth = 0; /* Parse our XML data. */ - response = xml_parse(env, xml_data, xml_len); + response = xml_parse(env, xml_data, (int)xml_len); XMLRPC_FAIL_IF_FAULT(env); /* Pick apart and verify our structure. */ diff --git a/Utilities/cmxmlrpc/xmlrpc_registry.c b/Utilities/cmxmlrpc/xmlrpc_registry.c index a0498b1..ae3b21c 100644 --- a/Utilities/cmxmlrpc/xmlrpc_registry.c +++ b/Utilities/cmxmlrpc/xmlrpc_registry.c @@ -367,7 +367,7 @@ xmlrpc_registry_process_call(xmlrpc_env * const envP, XMLRPC_ASSERT_ENV_OK(envP); XMLRPC_ASSERT_PTR_OK(xml_data); - xmlrpc_traceXml("XML-RPC CALL", xml_data, xml_len); + xmlrpc_traceXml("XML-RPC CALL", xml_data, (unsigned int)xml_len); /* Allocate our output buffer. ** If this fails, we need to die in a special fashion. */ @@ -412,7 +412,7 @@ xmlrpc_registry_process_call(xmlrpc_env * const envP, else xmlrpc_traceXml("XML-RPC RESPONSE", XMLRPC_MEMBLOCK_CONTENTS(char, output), - XMLRPC_MEMBLOCK_SIZE(char, output)); + (unsigned int)XMLRPC_MEMBLOCK_SIZE(char, output)); } return output; } @@ -507,7 +507,7 @@ system_multicall(xmlrpc_env *env, size = xmlrpc_array_size(env, methlist); XMLRPC_ASSERT_ENV_OK(env); for (i = 0; i < size; i++) { - methinfo = xmlrpc_array_get_item(env, methlist, i); + methinfo = xmlrpc_array_get_item(env, methlist, (int)i); XMLRPC_ASSERT_ENV_OK(env); /* Call our method. */ @@ -588,7 +588,7 @@ system_listMethods(xmlrpc_env *env, size = xmlrpc_struct_size(env, registry->_methods); XMLRPC_FAIL_IF_FAULT(env); for (i = 0; i < size; i++) { - xmlrpc_struct_get_key_and_value(env, registry->_methods, i, + xmlrpc_struct_get_key_and_value(env, registry->_methods, (int)i, &method_name, &method_info); XMLRPC_FAIL_IF_FAULT(env); xmlrpc_array_append_item(env, method_names, method_name); diff --git a/Utilities/cmxmlrpc/xmlrpc_serialize.c b/Utilities/cmxmlrpc/xmlrpc_serialize.c index debf218..5315ff9 100644 --- a/Utilities/cmxmlrpc/xmlrpc_serialize.c +++ b/Utilities/cmxmlrpc/xmlrpc_serialize.c @@ -295,7 +295,7 @@ xmlrpc_serialize_struct(xmlrpc_env *env, size = xmlrpc_struct_size(env, strct); XMLRPC_FAIL_IF_FAULT(env); for (i = 0; i < size; i++) { - xmlrpc_struct_get_key_and_value(env, strct, i, &key, &value); + xmlrpc_struct_get_key_and_value(env, strct, (int)i, &key, &value); XMLRPC_FAIL_IF_FAULT(env); format_out(env, output, "<member><name>"); XMLRPC_FAIL_IF_FAULT(env); @@ -379,7 +379,7 @@ xmlrpc_serialize_value(xmlrpc_env *env, size = xmlrpc_array_size(env, value); XMLRPC_FAIL_IF_FAULT(env); for (i = 0; i < size; i++) { - item = xmlrpc_array_get_item(env, value, i); + item = xmlrpc_array_get_item(env, value, (int)i); XMLRPC_FAIL_IF_FAULT(env); xmlrpc_serialize_value(env, output, item); XMLRPC_FAIL_IF_FAULT(env); @@ -469,7 +469,7 @@ xmlrpc_serialize_params(xmlrpc_env *env, for (i = 0; i < size; i++) { format_out(env, output, "<param>"); XMLRPC_FAIL_IF_FAULT(env); - item = xmlrpc_array_get_item(env, param_array, i); + item = xmlrpc_array_get_item(env, param_array, (int)i); XMLRPC_FAIL_IF_FAULT(env); xmlrpc_serialize_value(env, output, item); XMLRPC_FAIL_IF_FAULT(env); diff --git a/Utilities/cmxmlrpc/xmlrpc_struct.c b/Utilities/cmxmlrpc/xmlrpc_struct.c index 6dbbd66..50cc6db 100644 --- a/Utilities/cmxmlrpc/xmlrpc_struct.c +++ b/Utilities/cmxmlrpc/xmlrpc_struct.c @@ -120,7 +120,7 @@ xmlrpc_struct_size(xmlrpc_env* env, xmlrpc_value* strct) XMLRPC_ASSERT_VALUE_OK(strct); XMLRPC_TYPE_CHECK(env, strct, XMLRPC_TYPE_STRUCT); - retval = XMLRPC_MEMBLOCK_SIZE(_struct_member, &strct->_block); + retval = (int)XMLRPC_MEMBLOCK_SIZE(_struct_member, &strct->_block); cleanup: if (env->fault_occurred) @@ -186,7 +186,7 @@ find_member(xmlrpc_value * const strctP, keystr = XMLRPC_MEMBLOCK_CONTENTS(char, &keyval->_block); keystr_size = XMLRPC_MEMBLOCK_SIZE(char, &keyval->_block)-1; if (key_len == keystr_size && memcmp(key, keystr, key_len) == 0) - return i; + return (int)i; } } return -1; diff --git a/Utilities/cmxmlrpc/xmlrpc_strutil.c b/Utilities/cmxmlrpc/xmlrpc_strutil.c index 1f1b9a7..8efdb40 100644 --- a/Utilities/cmxmlrpc/xmlrpc_strutil.c +++ b/Utilities/cmxmlrpc/xmlrpc_strutil.c @@ -19,7 +19,7 @@ xmlrpc_makePrintable(const char * const input) { get the storage. -----------------------------------------------------------------------------*/ char * output; - const unsigned int inputLength = strlen(input); + const size_t inputLength = strlen(input); output = malloc(inputLength*4+1); diff --git a/Utilities/cmxmlrpc/xmlrpc_support.c b/Utilities/cmxmlrpc/xmlrpc_support.c index 4b0923a..ac29a12 100644 --- a/Utilities/cmxmlrpc/xmlrpc_support.c +++ b/Utilities/cmxmlrpc/xmlrpc_support.c @@ -326,7 +326,7 @@ xmlrpc_mem_block_append(xmlrpc_env * const env, void * const data, size_t const len) { - int size; + size_t size; XMLRPC_ASSERT_ENV_OK(env); XMLRPC_ASSERT(block != NULL); |