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/+/1270?usp=email
to review the following change.
Change subject: schedule: Fix conversion warning
......................................................................
schedule: Fix conversion warning
Return value of random() is safe to cast.
Change-Id: I5e6cb3a287a2e8e1584036307b4c21bb68050c6a
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M src/openvpn/schedule.c
1 file changed, 1 insertion(+), 10 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/70/1270/1
diff --git a/src/openvpn/schedule.c b/src/openvpn/schedule.c
index 1389889..bf6693f 100644
--- a/src/openvpn/schedule.c
+++ b/src/openvpn/schedule.c
@@ -65,25 +65,16 @@
}
#endif
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
static inline void
schedule_set_pri(struct schedule_entry *e)
{
- e->pri = random();
+ e->pri = (unsigned int)random();
if (e->pri < 1)
{
e->pri = 1;
}
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
/* This is the master key comparison routine. A key is
* simply a struct timeval containing the absolute time for
* an event. The unique treap priority (pri) is used to ensure
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1270?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: I5e6cb3a287a2e8e1584036307b4c21bb68050c6a
Gerrit-Change-Number: 1270
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