Skip to content

Commit

Permalink
test: fix Clang warning in LuaJIT-tests
Browse files Browse the repository at this point in the history
This patch fixes the warning in <libctest.c> produced by Clang:
| warning: plain '_Complex' requires a type specifier; assuming
| '_Complex double'
by adding the `double` type specifier where it is needed.

Reviewed-by: Maxim Kokryashkin <[email protected]>
Reviewed-by: Sergey Bronnikov <[email protected]>
Signed-off-by: Sergey Kaplun <[email protected]>
(cherry picked from commit 3cd5078)
  • Loading branch information
Buristan committed Dec 12, 2024
1 parent 730db5b commit b910b50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/LuaJIT-tests/src/libctest.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ LUA_API double call_ividi(int a, ...)
}

#ifdef complex
LUA_API complex call_dd_cd(double a, double b) { return a+b*2i; }
LUA_API complex call_cd(complex a) { return a+1-2i; }
LUA_API complex call_cdcd(complex a, complex b) { return a+b; }
LUA_API complex double call_dd_cd(double a, double b) { return a+b*2i; }
LUA_API complex double call_cd(complex double a) { return a+1-2i; }
LUA_API complex double call_cdcd(complex double a, complex double b) { return a+b; }

LUA_API complex float call_ff_cf(float a, float b) { return a+b*2i; }
LUA_API complex float call_cf(complex float a) { return a+1-2i; }
Expand Down

0 comments on commit b910b50

Please sign in to comment.