Просмотр исходного кода

COMP: Remove warnings on borland

Andy Cedilnik 21 лет назад
Родитель
Сommit
ade034a747

+ 0 - 1
Utilities/cmxmlrpc/xmlrpc_authcookie.c

@@ -45,7 +45,6 @@ void xmlrpc_authcookie_set ( xmlrpc_env *env,
 
     /* Clear out memory. */
     unencoded = (char *) malloc ( sizeof ( char * ) );
-    token = NULL;
 
     /* Create unencoded string/hash. */
     sprintf(unencoded, "%s:%s", username, password);

+ 1 - 7
Utilities/cmxmlrpc/xmlrpc_client.c

@@ -497,9 +497,6 @@ call_info_set_asynch_data(xmlrpc_env *   const env,
 
     xmlrpc_value *holder;
 
-    /* Error-handling preconditions. */
-    holder = NULL;
-
     XMLRPC_ASSERT_ENV_OK(env);
     XMLRPC_ASSERT_PTR_OK(info);
     XMLRPC_ASSERT(info->_asynch_data_holder == NULL);
@@ -552,7 +549,6 @@ xmlrpc_server_info_new (xmlrpc_env * const env,
     char *url_copy;
 
     /* Error-handling preconditions. */
-    server = NULL;
     url_copy = NULL;
 
     XMLRPC_ASSERT_ENV_OK(env);
@@ -593,7 +589,6 @@ xmlrpc_server_info * xmlrpc_server_info_copy(xmlrpc_env *env,
     XMLRPC_ASSERT_PTR_OK(aserver);
 
     /* Error-handling preconditions. */
-    server = NULL;
     url_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;
 
     /* Error-handling preconditions. */
-    raw_token = NULL;
     token = NULL;
-    token_data = auth_type = auth_header = NULL;
+    auth_header = NULL;
 
     XMLRPC_ASSERT_ENV_OK(envP);
     XMLRPC_ASSERT_PTR_OK(serverP);

+ 0 - 1
Utilities/cmxmlrpc/xmlrpc_data.c

@@ -479,7 +479,6 @@ mkWideString(xmlrpc_env *    const envP,
     size_t utf8_len;
 
     /* Error-handling preconditions. */
-    valP = NULL;
     utf8_block = NULL;
     block_is_inited = 0;
 

+ 0 - 5
Utilities/cmxmlrpc/xmlrpc_expat.c

@@ -73,7 +73,6 @@ static xml_element *xml_element_new (xmlrpc_env *env, char *name)
     XMLRPC_ASSERT(name != NULL);
 
     /* Set up our error-handling preconditions. */
-    retval = NULL;
     name_valid = cdata_valid = children_valid = 0;
 
     /* 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;
     if (!context->env->fault_occurred) {
 
-        /* Set up our error-handling preconditions. */
-        elem = NULL;
-
         /* Build a new element. */
         elem = xml_element_new(context->env, name);
         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);
 
     /* Set up our error-handling preconditions. */
-    parser = NULL;
     context.root = NULL;
     
     /* Set up the rest of our parse context. */

+ 3 - 3
Utilities/cmxmlrpc/xmlrpc_parse.c

@@ -362,7 +362,7 @@ convert_array(xmlrpc_env *env, unsigned *depth, xml_element *elem)
     XMLRPC_ASSERT(elem != NULL);
 
     /* Set up our error-handling preconditions. */
-    array = item = NULL;
+    item = NULL;
     (*depth)++;
 
     /* 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);
 
     /* Set up our error-handling preconditions. */
-    strct = key = value = NULL;
+    key = value = NULL;
     (*depth)++;
 
     /* 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);
 
     /* Set up our error-handling preconditions. */
-    array = item = NULL;
+    item = NULL;
 
     /* Allocate an array to hold our parameters. */
     array = xmlrpc_build_value(env, "()");

+ 0 - 10
Utilities/cmxmlrpc/xmlrpc_registry.c

@@ -55,7 +55,6 @@ xmlrpc_registry_new(xmlrpc_env *env) {
     XMLRPC_ASSERT_ENV_OK(env);
     
     /* Error-handling preconditions. */
-    methods = NULL;
     registry = NULL;
     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);
 
-    /* Error-handling preconditions. */
-    method_info = NULL;
-
     /* Store our method and user data into our hash table. */
     method_info = xmlrpc_build_value(env, "(ppss)", (void*) method, user_data,
                                      signature, help);
@@ -198,9 +194,6 @@ xmlrpc_registry_set_default_method(xmlrpc_env *env,
     XMLRPC_ASSERT_PTR_OK(registry);
     XMLRPC_ASSERT_PTR_OK(handler);
 
-    /* Error-handling preconditions. */
-    method_info = NULL;
-    
     /* Store our method and user data into our hash table. */
     method_info = xmlrpc_build_value(env, "(pp)", (void*) handler, user_data);
     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(handler);
 
-    /* Error-handling preconditions. */
-    method_info = NULL;
-
     /* Store our method and user data into our hash table. */
     method_info = xmlrpc_build_value(env, "(pp)", (void*) handler, user_data);
     XMLRPC_FAIL_IF_FAULT(env);

+ 0 - 6
Utilities/cmxmlrpc/xmlrpc_serialize.c

@@ -133,9 +133,6 @@ escape_string(xmlrpc_env * const env,
     XMLRPC_ASSERT_ENV_OK(env);
     XMLRPC_ASSERT(str != NULL);
 
-    /* Set up our error-handling preconditions. */
-    retval = NULL;
-
     /* Sanity-check this string before we print it. */
 #if !defined NDEBUG && defined HAVE_UNICODE_WCHAR
     sanity_check_utf8(str, len);
@@ -597,9 +594,6 @@ xmlrpc_serialize_fault(xmlrpc_env *env,
     XMLRPC_ASSERT(output != NULL);
     XMLRPC_ASSERT(fault != NULL && fault->fault_occurred);
 
-    /* Set up our error-handling preconditions. */
-    strct = NULL;
-
     /* Build a fault structure. */
     strct = xmlrpc_build_value(env, "{s:i,s:s}",
                    "faultCode", (xmlrpc_int32) fault->fault_code,

+ 0 - 1
Utilities/cmxmlrpc/xmlrpc_struct.c

@@ -74,7 +74,6 @@ xmlrpc_struct_new(xmlrpc_env* env)
     XMLRPC_ASSERT_ENV_OK(env);
 
     /* Set up error handling preconditions. */
-    strct = NULL;
     strct_valid = 0;
 
     /* Allocate and fill out an empty structure. */

+ 1 - 1
Utilities/cmxmlrpc/xmlrpc_strutil.c

@@ -49,7 +49,7 @@ xmlrpc_makePrintable(const char * const input) {
                          input[inputCursor]);
             }
         }
-        output[outputCursor++] = '\0';
+        output[outputCursor+1] = '\0';
     }
     return output;
 }

+ 0 - 6
Utilities/cmxmlrpc/xmlrpc_utf8.c

@@ -277,9 +277,6 @@ xmlrpc_mem_block *xmlrpc_utf8_to_wcs (xmlrpc_env *env,
     xmlrpc_mem_block *output;
     size_t wcs_length;
 
-    /* Error-handling preconditions. */
-    output = NULL;
-
     /* 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. */
     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_PTR_OK(wcs_data);
 
-    /* Error-handling preconditions. */
-    output = NULL;
-
     /* Allocate a memory block large enough to hold any possible output.
     ** We assume that every wchar might encode to the maximum length. */
     estimate = wcs_len * MAX_ENCODED_BYTES;