mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Replace isnan with inequality check to avoid conversion warning in older Clang (#4438)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
parent
4c41f8ee07
commit
edb01f63d5
@ -132,7 +132,7 @@ jerryx_arg_helper_process_double (double *d, /**< [in, out] the number to be pro
|
||||
double max, /**< the max value for clamping */
|
||||
jerryx_arg_int_option_t option) /**< the converting policies */
|
||||
{
|
||||
if (isnan (*d))
|
||||
if (*d != *d) /* isnan (*d) triggers conversion warning on clang<9 */
|
||||
{
|
||||
return jerry_create_error (JERRY_ERROR_TYPE,
|
||||
(jerry_char_t *) "The number is NaN.");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user