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:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user