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:
Akos Kiss 2021-01-11 12:29:00 +01:00 committed by GitHub
parent 4c41f8ee07
commit edb01f63d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.");