fixed compiler warnings on 64bit
authorMartin Willi <martin@strongswan.org>
Wed, 22 Apr 2009 08:26:54 +0000 (08:26 -0000)
committerMartin Willi <martin@strongswan.org>
Wed, 22 Apr 2009 08:26:54 +0000 (08:26 -0000)
src/charon/config/attributes/attribute_manager.h
src/charon/config/auth_cfg.c
src/charon/config/proposal.c
src/libstrongswan/crypto/rngs/rng.h

index 0ac37e7..750f83c 100644 (file)
@@ -69,9 +69,9 @@ struct attribute_manager_t {
        void (*remove_provider)(attribute_manager_t *this,
                                                        attribute_provider_t *provider);
        /**
-     * Destroy a attribute_manager instance.
-     */
-    void (*destroy)(attribute_manager_t *this);
+        * Destroy a attribute_manager instance.
+        */
+       void (*destroy)(attribute_manager_t *this);
 };
 
 /**
index 90fe987..87aca38 100644 (file)
@@ -183,7 +183,7 @@ static void replace(auth_cfg_t *this, entry_enumerator_t *enumerator,
                        case AUTH_RULE_CRL_VALIDATION:
                        case AUTH_RULE_OCSP_VALIDATION:
                                /* integer type */
-                               enumerator->current->value = (void*)va_arg(args, u_int);
+                               enumerator->current->value = (void*)(uintptr_t)va_arg(args, u_int);
                                break;
                        case AUTH_RULE_IDENTITY:
                        case AUTH_RULE_EAP_IDENTITY:
@@ -283,7 +283,7 @@ static void add(private_auth_cfg_t *this, auth_rule_t type, ...)
                case AUTH_RULE_CRL_VALIDATION:
                case AUTH_RULE_OCSP_VALIDATION:
                        /* integer type */
-                       entry->value = (void*)va_arg(args, u_int);
+                       entry->value = (void*)(uintptr_t)va_arg(args, u_int);
                        break;
                case AUTH_RULE_IDENTITY:
                case AUTH_RULE_EAP_IDENTITY:
index 7bddff1..813c298 100644 (file)
@@ -643,7 +643,7 @@ static status_t add_string_algo(private_proposal_t *this, chunk_t alg)
 /**
  * print all algorithms of a kind to buffer
  */
-static int print_alg(private_proposal_t *this, char **dst, int *len,
+static int print_alg(private_proposal_t *this, char **dst, size_t *len,
                                         u_int kind, void *names, bool *first)
 {
        enumerator_t *enumerator;
index 1c4d204..862c7a4 100644 (file)
@@ -56,7 +56,7 @@ struct rng_t {
         * @param len           number of bytes to get
         * @param buffer        pointer where the generated bytes will be written
         */
-       void (*get_bytes) (rng_t *this, u_int len, u_int8_t *buffer);
+       void (*get_bytes) (rng_t *this, size_t len, u_int8_t *buffer);
        
        /**
         * Generates random bytes and allocate space for them.
@@ -64,7 +64,7 @@ struct rng_t {
         * @param len           number of bytes to get
         * @param chunk         chunk which will hold generated bytes
         */
-       void (*allocate_bytes) (rng_t *this, u_int len, chunk_t *chunk);
+       void (*allocate_bytes) (rng_t *this, size_t len, chunk_t *chunk);
        
        /**
         * Destroys a rng object.