mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-22 17:49:13 +00:00
rtc.c test: fix for clang
clang complains:
> clang -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -iquote ../lib/arch/x86/include -I../lib rtc.c ../lib/libzdtmtst.a ../lib/libzdtmtst.a -o rtc
> rtc.c:50:7: error: taking the absolute value of unsigned type 'unsigned long' has no effect [-Werror,-Wabsolute-value]
> if (labs(delta - 1000000 / TEST_HZ ) > 100000) {
> ^
Declare delta as long.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
21c4675304
commit
514ca4e93b
1 changed files with 2 additions and 1 deletions
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
unsigned long data, delta;
|
||||
unsigned long data;
|
||||
long delta;
|
||||
int fd, fail = NR_FAILS, to_pass = NR_FAILS;
|
||||
struct timeval start, end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue