[XS] Change in openvpn[release/2.7]: Make test_misc compile with -Werror again.

"cron2 \(Code Review\) via Openvpn-devel" <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1839?usp=email )

Change subject: Make test_misc compile with -Werror again.
......................................................................

Make test_misc compile with -Werror again.

Commit 5978a46e3 (master)/3402f9aa0 (release/2.7) removed the
local prototype/function get_random in test_misc and use the
global prototype in crypto.h.

This made get_random return uint64_t instead of uint32_t.
Adjust the calls in test_list accordingly.

On master the general hash rewrite/cleanup completely
removes the iv argument from hash_init and therefore
only 2.7 requires this patch.

Change-Id: I1a6a0ca8beba3214b21047755246ceeb30141c2a
Signed-off-by: Arne Schwabe <[email protected]>
Acked-by: Gert Doering <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1839
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg38167.html
Signed-off-by: Gert Doering <[email protected]>
---
M tests/unit_tests/openvpn/test_misc.c
1 file changed, 2 insertions(+), 2 deletions(-)




diff --git a/tests/unit_tests/openvpn/test_misc.c b/tests/unit_tests/openvpn/test_misc.c
index b9e2db0..a9c3845 100644
--- a/tests/unit_tests/openvpn/test_misc.c
+++ b/tests/unit_tests/openvpn/test_misc.c
@@ -170,8 +170,8 @@
      */
 
     struct gc_arena gc = gc_new();
-    struct hash *hash = hash_init(10000, get_random(), word_hash_function, word_compare_function);
-    struct hash *nhash = hash_init(256, get_random(), word_hash_function, word_compare_function);
+    struct hash *hash = hash_init(10000, (uint32_t)get_random(), word_hash_function, word_compare_function);
+    struct hash *nhash = hash_init(256, (uint32_t)get_random(), word_hash_function, word_compare_function);
 
     printf("hash_init n_buckets=%u mask=0x%08x\n", hash->n_buckets, hash->mask);
 

-- 
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1839?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: release/2.7
Gerrit-Change-Id: I1a6a0ca8beba3214b21047755246ceeb30141c2a
Gerrit-Change-Number: 1839
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]>
Gerrit-Reviewer: cron2 <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.