diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-07-16 02:14:59 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-07-16 02:47:50 +0200 |
commit | 990f99658bb060ac2ac4e1cff2966eab1e96f9d9 (patch) | |
tree | ef8091f6426b96352fe614a3f3c01185506cae4f /src | |
parent | 0156e6b8106ee1f6aa147555c89bc4f3bafb2d3d (diff) | |
download | rneovim-990f99658bb060ac2ac4e1cff2966eab1e96f9d9.tar.gz rneovim-990f99658bb060ac2ac4e1cff2966eab1e96f9d9.tar.bz2 rneovim-990f99658bb060ac2ac4e1cff2966eab1e96f9d9.zip |
viml/profile: cast os_hrtime() result
Temporary measure to avoid QuickBuild CI failure:
8:42:54,702 INFO - Executing post-execute action...
18:42:54,702 ERROR - Step 'master>buildall>build-node?testNode=freebsd-64>build-and-run-tests>build-and-run-tests-parameterized?buildType=Release>configure-neovim-and-build-nvim' is failed: Failed to run command: mkdir -p build/Release && cd build/Release && cmake -G "Unix Makefiles" -DBUSTED_OUTPUT_TYPE=TAP -DMIN_LOG_LEVEL=3 -DCMAKE_BUILD_TYPE=Release -DTRAVIS_CI_BUILD=ON ../.. && gmake VERBOSE=1 nvim unittest-prereqs functionaltest-prereqs
Command return code: 2
Command error output: /usr/home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/profile.c:70:27: error: implicit conversion changes signedness: 'proftime_T' (aka 'long') to 'unsigned long' [-Werror,-Wsign-conversion]
STRICT_ADD(os_hrtime(), nsec, &rv, int64_t);
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/usr/home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/assert.h:150:26: note: expanded from macro 'STRICT_ADD'
do { *(c) = (t)((a) + (b)); } while (0)
^
1 error generated.
gma...
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/profile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/profile.c b/src/nvim/profile.c index e486095fe7..52e03c895e 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -66,8 +66,10 @@ proftime_T profile_setlimit(int64_t msec) FUNC_ATTR_WARN_UNUSED_RESULT } assert(msec <= (INT64_MAX / 1000000LL) - 1); proftime_T nsec = msec * 1000000LL; + uint64_t now = os_hrtime(); + assert(now <= INT64_MAX); int64_t rv; - STRICT_ADD(os_hrtime(), nsec, &rv, int64_t); + STRICT_ADD((proftime_T)now, nsec, &rv, int64_t); return rv; } |