From edb01f63d5815c052cb57f0367edb6720b56fac8 Mon Sep 17 00:00:00 2001 From: Akos Kiss Date: Mon, 11 Jan 2021 12:29:00 +0100 Subject: [PATCH] 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 --- jerry-ext/arg/arg-transform-functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jerry-ext/arg/arg-transform-functions.c b/jerry-ext/arg/arg-transform-functions.c index d9ecb52b0..1d609660d 100644 --- a/jerry-ext/arg/arg-transform-functions.c +++ b/jerry-ext/arg/arg-transform-functions.c @@ -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.");