[ovs-git] [openvswitch/ovs] 18df18: ovsdb: Fix timeout type for wait operation.
Ilya Maximets
noreply at github.com
Mon Jun 1 11:27:46 UTC 2020
Branch: refs/heads/branch-2.6
Home: https://github.com/openvswitch/ovs
Commit: 18df181ac791b2b5a1e8b6bdecd9650bdae3ca85
https://github.com/openvswitch/ovs/commit/18df181ac791b2b5a1e8b6bdecd9650bdae3ca85
Author: Ilya Maximets <i.maximets at ovn.org>
Date: 2020-06-01 (Mon, 01 Jun 2020)
Changed paths:
M ovsdb/execution.c
Log Message:
-----------
ovsdb: Fix timeout type for wait operation.
According to RFC 7047, 'timeout' is an integer field:
5.2.6. Wait
The "wait" object contains the following members:
"op": "wait" required
"timeout": <integer> optional
...
For some reason initial implementation treated it as a real number.
This causes a build issue with clang that complains that LLONG_MAX
could not be represented as double:
ovsdb/execution.c:733:32: error: implicit conversion from 'long long'
to 'double' changes value from
9223372036854775807 to 9223372036854775808
timeout_msec = MIN(LLONG_MAX, json_real(timeout));
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/limits.h:69:19: note: expanded from macro 'LLONG_MAX'
#define LLONG_MAX __LLONG_MAX /* max for a long long */
^~~~~~~~~~~
/usr/include/x86/_limits.h:74:21: note: expanded from macro '__LLONG_MAX'
#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */
^~~~~~~~~~~~~~~~~~~~
./lib/util.h:90:21: note: expanded from macro 'MIN'
#define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
^ ~
Fix that by changing parser to treat 'timeout' as integer.
Fixes clang build on FreeBSD 12.1 in CirrusCI.
Fixes: f85f8ebbfac9 ("Initial implementation of OVSDB.")
Acked-by: Han Zhou <hzhou at ovn.org>
Acked-by: Numan Siddique <numans at ovn.org>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
More information about the git
mailing list