COMP: Remove warnings on borland
This commit is contained in:
parent
78ca400d33
commit
ade034a747
@ -45,7 +45,6 @@ void xmlrpc_authcookie_set ( xmlrpc_env *env,
|
|||||||
|
|
||||||
/* Clear out memory. */
|
/* Clear out memory. */
|
||||||
unencoded = (char *) malloc ( sizeof ( char * ) );
|
unencoded = (char *) malloc ( sizeof ( char * ) );
|
||||||
token = NULL;
|
|
||||||
|
|
||||||
/* Create unencoded string/hash. */
|
/* Create unencoded string/hash. */
|
||||||
sprintf(unencoded, "%s:%s", username, password);
|
sprintf(unencoded, "%s:%s", username, password);
|
||||||
|
@ -497,9 +497,6 @@ call_info_set_asynch_data(xmlrpc_env * const env,
|
|||||||
|
|
||||||
xmlrpc_value *holder;
|
xmlrpc_value *holder;
|
||||||
|
|
||||||
/* Error-handling preconditions. */
|
|
||||||
holder = NULL;
|
|
||||||
|
|
||||||
XMLRPC_ASSERT_ENV_OK(env);
|
XMLRPC_ASSERT_ENV_OK(env);
|
||||||
XMLRPC_ASSERT_PTR_OK(info);
|
XMLRPC_ASSERT_PTR_OK(info);
|
||||||
XMLRPC_ASSERT(info->_asynch_data_holder == NULL);
|
XMLRPC_ASSERT(info->_asynch_data_holder == NULL);
|
||||||
@ -552,7 +549,6 @@ xmlrpc_server_info_new (xmlrpc_env * const env,
|
|||||||
char *url_copy;
|
char *url_copy;
|
||||||
|
|
||||||
/* Error-handling preconditions. */
|
/* Error-handling preconditions. */
|
||||||
server = NULL;
|
|
||||||
url_copy = NULL;
|
url_copy = NULL;
|
||||||
|
|
||||||
XMLRPC_ASSERT_ENV_OK(env);
|
XMLRPC_ASSERT_ENV_OK(env);
|
||||||
@ -593,7 +589,6 @@ xmlrpc_server_info * xmlrpc_server_info_copy(xmlrpc_env *env,
|
|||||||
XMLRPC_ASSERT_PTR_OK(aserver);
|
XMLRPC_ASSERT_PTR_OK(aserver);
|
||||||
|
|
||||||
/* Error-handling preconditions. */
|
/* Error-handling preconditions. */
|
||||||
server = NULL;
|
|
||||||
url_copy = NULL;
|
url_copy = NULL;
|
||||||
auth_copy = NULL;
|
auth_copy = NULL;
|
||||||
|
|
||||||
@ -923,9 +918,8 @@ xmlrpc_server_info_set_basic_auth(xmlrpc_env * const envP,
|
|||||||
size_t token_len, auth_type_len, auth_header_len;
|
size_t token_len, auth_type_len, auth_header_len;
|
||||||
|
|
||||||
/* Error-handling preconditions. */
|
/* Error-handling preconditions. */
|
||||||
raw_token = NULL;
|
|
||||||
token = NULL;
|
token = NULL;
|
||||||
token_data = auth_type = auth_header = NULL;
|
auth_header = NULL;
|
||||||
|
|
||||||
XMLRPC_ASSERT_ENV_OK(envP);
|
XMLRPC_ASSERT_ENV_OK(envP);
|
||||||
XMLRPC_ASSERT_PTR_OK(serverP);
|
XMLRPC_ASSERT_PTR_OK(serverP);
|
||||||
|
@ -479,7 +479,6 @@ mkWideString(xmlrpc_env * const envP,
|
|||||||
size_t utf8_len;
|
size_t utf8_len;
|
||||||
|
|
||||||
/* Error-handling preconditions. */
|
/* Error-handling preconditions. */
|
||||||
valP = NULL;
|
|
||||||
utf8_block = NULL;
|
utf8_block = NULL;
|
||||||
block_is_inited = 0;
|
block_is_inited = 0;
|
||||||
|
|
||||||
|
@ -73,7 +73,6 @@ static xml_element *xml_element_new (xmlrpc_env *env, char *name)
|
|||||||
XMLRPC_ASSERT(name != NULL);
|
XMLRPC_ASSERT(name != NULL);
|
||||||
|
|
||||||
/* Set up our error-handling preconditions. */
|
/* Set up our error-handling preconditions. */
|
||||||
retval = NULL;
|
|
||||||
name_valid = cdata_valid = children_valid = 0;
|
name_valid = cdata_valid = children_valid = 0;
|
||||||
|
|
||||||
/* Allocate our xml_element structure. */
|
/* Allocate our xml_element structure. */
|
||||||
@ -256,9 +255,6 @@ start_element (void *user_data, XML_Char *name, XML_Char **atts ATTR_UNUSED)
|
|||||||
context = (parse_context*) user_data;
|
context = (parse_context*) user_data;
|
||||||
if (!context->env->fault_occurred) {
|
if (!context->env->fault_occurred) {
|
||||||
|
|
||||||
/* Set up our error-handling preconditions. */
|
|
||||||
elem = NULL;
|
|
||||||
|
|
||||||
/* Build a new element. */
|
/* Build a new element. */
|
||||||
elem = xml_element_new(context->env, name);
|
elem = xml_element_new(context->env, name);
|
||||||
XMLRPC_FAIL_IF_FAULT(context->env);
|
XMLRPC_FAIL_IF_FAULT(context->env);
|
||||||
@ -352,7 +348,6 @@ xml_element *xml_parse (xmlrpc_env *env, const char *xml_data, int xml_len)
|
|||||||
XMLRPC_ASSERT(xml_data != NULL && xml_len >= 0);
|
XMLRPC_ASSERT(xml_data != NULL && xml_len >= 0);
|
||||||
|
|
||||||
/* Set up our error-handling preconditions. */
|
/* Set up our error-handling preconditions. */
|
||||||
parser = NULL;
|
|
||||||
context.root = NULL;
|
context.root = NULL;
|
||||||
|
|
||||||
/* Set up the rest of our parse context. */
|
/* Set up the rest of our parse context. */
|
||||||
|
@ -362,7 +362,7 @@ convert_array(xmlrpc_env *env, unsigned *depth, xml_element *elem)
|
|||||||
XMLRPC_ASSERT(elem != NULL);
|
XMLRPC_ASSERT(elem != NULL);
|
||||||
|
|
||||||
/* Set up our error-handling preconditions. */
|
/* Set up our error-handling preconditions. */
|
||||||
array = item = NULL;
|
item = NULL;
|
||||||
(*depth)++;
|
(*depth)++;
|
||||||
|
|
||||||
/* Allocate an array to hold our values. */
|
/* Allocate an array to hold our values. */
|
||||||
@ -421,7 +421,7 @@ convert_struct(xmlrpc_env *env, unsigned *depth, xml_element *elem)
|
|||||||
XMLRPC_ASSERT(elem != NULL);
|
XMLRPC_ASSERT(elem != NULL);
|
||||||
|
|
||||||
/* Set up our error-handling preconditions. */
|
/* Set up our error-handling preconditions. */
|
||||||
strct = key = value = NULL;
|
key = value = NULL;
|
||||||
(*depth)++;
|
(*depth)++;
|
||||||
|
|
||||||
/* Allocate an array to hold our members. */
|
/* Allocate an array to hold our members. */
|
||||||
@ -497,7 +497,7 @@ convert_params(xmlrpc_env *env, unsigned *depth, xml_element *elem)
|
|||||||
XMLRPC_ASSERT(elem != NULL);
|
XMLRPC_ASSERT(elem != NULL);
|
||||||
|
|
||||||
/* Set up our error-handling preconditions. */
|
/* Set up our error-handling preconditions. */
|
||||||
array = item = NULL;
|
item = NULL;
|
||||||
|
|
||||||
/* Allocate an array to hold our parameters. */
|
/* Allocate an array to hold our parameters. */
|
||||||
array = xmlrpc_build_value(env, "()");
|
array = xmlrpc_build_value(env, "()");
|
||||||
|
@ -55,7 +55,6 @@ xmlrpc_registry_new(xmlrpc_env *env) {
|
|||||||
XMLRPC_ASSERT_ENV_OK(env);
|
XMLRPC_ASSERT_ENV_OK(env);
|
||||||
|
|
||||||
/* Error-handling preconditions. */
|
/* Error-handling preconditions. */
|
||||||
methods = NULL;
|
|
||||||
registry = NULL;
|
registry = NULL;
|
||||||
registry_valid = 0;
|
registry_valid = 0;
|
||||||
|
|
||||||
@ -163,9 +162,6 @@ xmlrpc_registry_add_method_w_doc(xmlrpc_env *env,
|
|||||||
XMLRPC_ASSERT_PTR_OK(method_name);
|
XMLRPC_ASSERT_PTR_OK(method_name);
|
||||||
XMLRPC_ASSERT_PTR_OK(method);
|
XMLRPC_ASSERT_PTR_OK(method);
|
||||||
|
|
||||||
/* Error-handling preconditions. */
|
|
||||||
method_info = NULL;
|
|
||||||
|
|
||||||
/* Store our method and user data into our hash table. */
|
/* Store our method and user data into our hash table. */
|
||||||
method_info = xmlrpc_build_value(env, "(ppss)", (void*) method, user_data,
|
method_info = xmlrpc_build_value(env, "(ppss)", (void*) method, user_data,
|
||||||
signature, help);
|
signature, help);
|
||||||
@ -198,9 +194,6 @@ xmlrpc_registry_set_default_method(xmlrpc_env *env,
|
|||||||
XMLRPC_ASSERT_PTR_OK(registry);
|
XMLRPC_ASSERT_PTR_OK(registry);
|
||||||
XMLRPC_ASSERT_PTR_OK(handler);
|
XMLRPC_ASSERT_PTR_OK(handler);
|
||||||
|
|
||||||
/* Error-handling preconditions. */
|
|
||||||
method_info = NULL;
|
|
||||||
|
|
||||||
/* Store our method and user data into our hash table. */
|
/* Store our method and user data into our hash table. */
|
||||||
method_info = xmlrpc_build_value(env, "(pp)", (void*) handler, user_data);
|
method_info = xmlrpc_build_value(env, "(pp)", (void*) handler, user_data);
|
||||||
XMLRPC_FAIL_IF_FAULT(env);
|
XMLRPC_FAIL_IF_FAULT(env);
|
||||||
@ -236,9 +229,6 @@ xmlrpc_registry_set_preinvoke_method(xmlrpc_env *env,
|
|||||||
XMLRPC_ASSERT_PTR_OK(registry);
|
XMLRPC_ASSERT_PTR_OK(registry);
|
||||||
XMLRPC_ASSERT_PTR_OK(handler);
|
XMLRPC_ASSERT_PTR_OK(handler);
|
||||||
|
|
||||||
/* Error-handling preconditions. */
|
|
||||||
method_info = NULL;
|
|
||||||
|
|
||||||
/* Store our method and user data into our hash table. */
|
/* Store our method and user data into our hash table. */
|
||||||
method_info = xmlrpc_build_value(env, "(pp)", (void*) handler, user_data);
|
method_info = xmlrpc_build_value(env, "(pp)", (void*) handler, user_data);
|
||||||
XMLRPC_FAIL_IF_FAULT(env);
|
XMLRPC_FAIL_IF_FAULT(env);
|
||||||
|
@ -133,9 +133,6 @@ escape_string(xmlrpc_env * const env,
|
|||||||
XMLRPC_ASSERT_ENV_OK(env);
|
XMLRPC_ASSERT_ENV_OK(env);
|
||||||
XMLRPC_ASSERT(str != NULL);
|
XMLRPC_ASSERT(str != NULL);
|
||||||
|
|
||||||
/* Set up our error-handling preconditions. */
|
|
||||||
retval = NULL;
|
|
||||||
|
|
||||||
/* Sanity-check this string before we print it. */
|
/* Sanity-check this string before we print it. */
|
||||||
#if !defined NDEBUG && defined HAVE_UNICODE_WCHAR
|
#if !defined NDEBUG && defined HAVE_UNICODE_WCHAR
|
||||||
sanity_check_utf8(str, len);
|
sanity_check_utf8(str, len);
|
||||||
@ -597,9 +594,6 @@ xmlrpc_serialize_fault(xmlrpc_env *env,
|
|||||||
XMLRPC_ASSERT(output != NULL);
|
XMLRPC_ASSERT(output != NULL);
|
||||||
XMLRPC_ASSERT(fault != NULL && fault->fault_occurred);
|
XMLRPC_ASSERT(fault != NULL && fault->fault_occurred);
|
||||||
|
|
||||||
/* Set up our error-handling preconditions. */
|
|
||||||
strct = NULL;
|
|
||||||
|
|
||||||
/* Build a fault structure. */
|
/* Build a fault structure. */
|
||||||
strct = xmlrpc_build_value(env, "{s:i,s:s}",
|
strct = xmlrpc_build_value(env, "{s:i,s:s}",
|
||||||
"faultCode", (xmlrpc_int32) fault->fault_code,
|
"faultCode", (xmlrpc_int32) fault->fault_code,
|
||||||
|
@ -74,7 +74,6 @@ xmlrpc_struct_new(xmlrpc_env* env)
|
|||||||
XMLRPC_ASSERT_ENV_OK(env);
|
XMLRPC_ASSERT_ENV_OK(env);
|
||||||
|
|
||||||
/* Set up error handling preconditions. */
|
/* Set up error handling preconditions. */
|
||||||
strct = NULL;
|
|
||||||
strct_valid = 0;
|
strct_valid = 0;
|
||||||
|
|
||||||
/* Allocate and fill out an empty structure. */
|
/* Allocate and fill out an empty structure. */
|
||||||
|
@ -49,7 +49,7 @@ xmlrpc_makePrintable(const char * const input) {
|
|||||||
input[inputCursor]);
|
input[inputCursor]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
output[outputCursor++] = '\0';
|
output[outputCursor+1] = '\0';
|
||||||
}
|
}
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
@ -277,9 +277,6 @@ xmlrpc_mem_block *xmlrpc_utf8_to_wcs (xmlrpc_env *env,
|
|||||||
xmlrpc_mem_block *output;
|
xmlrpc_mem_block *output;
|
||||||
size_t wcs_length;
|
size_t wcs_length;
|
||||||
|
|
||||||
/* Error-handling preconditions. */
|
|
||||||
output = NULL;
|
|
||||||
|
|
||||||
/* Allocate a memory block large enough to hold any possible output.
|
/* Allocate a memory block large enough to hold any possible output.
|
||||||
** We assume that each byte of the input may decode to a whcar_t. */
|
** We assume that each byte of the input may decode to a whcar_t. */
|
||||||
output = XMLRPC_TYPED_MEM_BLOCK_NEW(wchar_t, env, utf8_len);
|
output = XMLRPC_TYPED_MEM_BLOCK_NEW(wchar_t, env, utf8_len);
|
||||||
@ -326,9 +323,6 @@ xmlrpc_mem_block *xmlrpc_wcs_to_utf8 (xmlrpc_env *env,
|
|||||||
XMLRPC_ASSERT_ENV_OK(env);
|
XMLRPC_ASSERT_ENV_OK(env);
|
||||||
XMLRPC_ASSERT_PTR_OK(wcs_data);
|
XMLRPC_ASSERT_PTR_OK(wcs_data);
|
||||||
|
|
||||||
/* Error-handling preconditions. */
|
|
||||||
output = NULL;
|
|
||||||
|
|
||||||
/* Allocate a memory block large enough to hold any possible output.
|
/* Allocate a memory block large enough to hold any possible output.
|
||||||
** We assume that every wchar might encode to the maximum length. */
|
** We assume that every wchar might encode to the maximum length. */
|
||||||
estimate = wcs_len * MAX_ENCODED_BYTES;
|
estimate = wcs_len * MAX_ENCODED_BYTES;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user