Skip to contentSkip to conversation

Change in openvpn[master]: interval: Fix conversion warning

Openvpn-devel In review flichtenheld (Code Review) 2 participants 6 messages Oct 21, 2025 – Nov 16, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1761045859000.I445b2e2cd14e55cc1ae3efdf1650b28e18992aa5@...2715...

#1 lore raw

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/+/1291?usp=email

to review the following change.

Change subject: interval: Fix conversion warning
......................................................................

interval: Fix conversion warning

Use correct return type of the function.

Change-Id I445b2e2cd14e55cc1ae3efdf1650b28e18992aa5

---
M src/openvpn/interval.c

1 file changed, 1 insertion(+), 10 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/91/1291/1

src/openvpn/interval.c +1 -10
index fbefcd9..f9953a6 100644
@@ -38,11 +38,6 @@
     top->horizon = horizon;
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
 bool
 event_timeout_trigger(struct event_timeout *et, struct timeval *tv, const int et_const_retry)
 {
@@ -52,7 +47,7 @@
     }
 
     bool ret = false;
-    time_t wakeup = event_timeout_remaining(et);
+    interval_t wakeup = event_timeout_remaining(et);
 
     if (wakeup <= 0)
     {
@@ -82,7 +77,3 @@
     }
     return ret;
 }
-
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1291?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: I445b2e2cd14e55cc1ae3efdf1650b28e18992aa5
Gerrit-Change-Number: 1291
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1291?usp=email )

Change subject: interval: Fix conversion warning
......................................................................

Patch Set 5: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I445b2e2cd14e55cc1ae3efdf1650b28e18992aa5
Gerrit-Change-Number: 1291
Gerrit-PatchSet: 5
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Sun, 16 Nov 2025 13:58:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

#3 lore raw

PATCH v5 1/1 interval: Fix conversion warning

In reply to a message not in the archive

From: Frank Lichtenheld <[email protected]...>

Use correct return type of the function.

Change-Id I445b2e2cd14e55cc1ae3efdf1650b28e18992aa5

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1291
---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1291
This mail reflects revision 5 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>

src/openvpn/interval.c +1 -10
index fbefcd9..f9953a6 100644
@@ -38,11 +38,6 @@
     top->horizon = horizon;
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
 bool
 event_timeout_trigger(struct event_timeout *et, struct timeval *tv, const int et_const_retry)
 {
@@ -52,7 +47,7 @@
     }
 
     bool ret = false;
-    time_t wakeup = event_timeout_remaining(et);
+    interval_t wakeup = event_timeout_remaining(et);
 
     if (wakeup <= 0)
     {
@@ -82,7 +77,3 @@
     }
     return ret;
 }
-
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: interval: Fix conversion warning

Stared-at-code, straightforward enough. Did not test beyond a test compile.

Your patch has been applied to the master branch.

commit eb0666c8dcd7a09528594d1ce172aadb3be2d0cf

Author: Frank Lichtenheld
Date:   Sun Nov 16 14:59:04 2025 +0100
     interval: Fix conversion warning

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1291
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg34464.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#6) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1291?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by cron2

Change subject: interval: Fix conversion warning
......................................................................

interval: Fix conversion warning

Use correct return type of the function.

Change-Id I445b2e2cd14e55cc1ae3efdf1650b28e18992aa5

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1291
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg34464.html

---
M src/openvpn/interval.c

1 file changed, 1 insertion(+), 10 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/91/1291/6

src/openvpn/interval.c +1 -10
index fbefcd9..f9953a6 100644
@@ -38,11 +38,6 @@
     top->horizon = horizon;
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
 bool
 event_timeout_trigger(struct event_timeout *et, struct timeval *tv, const int et_const_retry)
 {
@@ -52,7 +47,7 @@
     }
 
     bool ret = false;
-    time_t wakeup = event_timeout_remaining(et);
+    interval_t wakeup = event_timeout_remaining(et);
 
     if (wakeup <= 0)
     {
@@ -82,7 +77,3 @@
     }
     return ret;
 }
-
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif

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

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I445b2e2cd14e55cc1ae3efdf1650b28e18992aa5
Gerrit-Change-Number: 1291
Gerrit-PatchSet: 6
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1291?usp=email )

Change subject: interval: Fix conversion warning
......................................................................

interval: Fix conversion warning

Use correct return type of the function.

Change-Id I445b2e2cd14e55cc1ae3efdf1650b28e18992aa5

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1291
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg34464.html

---
M src/openvpn/interval.c

1 file changed, 1 insertion(+), 10 deletions(-)
src/openvpn/interval.c +1 -10
index fbefcd9..f9953a6 100644
@@ -38,11 +38,6 @@
     top->horizon = horizon;
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
 bool
 event_timeout_trigger(struct event_timeout *et, struct timeval *tv, const int et_const_retry)
 {
@@ -52,7 +47,7 @@
     }
 
     bool ret = false;
-    time_t wakeup = event_timeout_remaining(et);
+    interval_t wakeup = event_timeout_remaining(et);
 
     if (wakeup <= 0)
     {
@@ -82,7 +77,3 @@
     }
     return ret;
 }
-
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1291?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: master
Gerrit-Change-Id: I445b2e2cd14e55cc1ae3efdf1650b28e18992aa5
Gerrit-Change-Number: 1291
Gerrit-PatchSet: 6
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>