Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1281?usp=email
to review the following change.
Change subject: ssl_util: Fix conversion warning in get_num_elements
......................................................................
ssl_util: Fix conversion warning in get_num_elements
Just use correct type.
Change-Id: I2d1fbe7ec080beb931253d09c1b5227e9bf4e756
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M src/openvpn/ssl_util.c
1 file changed, 2 insertions(+), 11 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/81/1281/1
diff --git a/src/openvpn/ssl_util.c b/src/openvpn/ssl_util.c
index 50e8c03..fb7cf3e 100644
--- a/src/openvpn/ssl_util.c
+++ b/src/openvpn/ssl_util.c
@@ -290,21 +290,16 @@
return NULL;
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
int
get_num_elements(const char *string, char delimiter)
{
- int string_len = strlen(string);
+ const size_t string_len = strlen(string);
ASSERT(0 != string_len);
int element_count = 1;
/* Get number of ciphers */
- for (int i = 0; i < string_len; i++)
+ for (size_t i = 0; i < string_len; i++)
{
if (string[i] == delimiter)
{
@@ -314,7 +309,3 @@
return element_count;
}
-
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1281?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2d1fbe7ec080beb931253d09c1b5227e9bf4e756
Gerrit-Change-Number: 1281
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel