Fix unused parameter related build issues on Windows (#3003)
MSVC doen't support __attribute__((unused)), we should use JERRY_UNUSED macro instead. Additionally removed the internal jrt.h include from tests/unit-core/test-common.h which was layering violation. It made JERRY_ASSERT unavailable, we should use TEST_ASSERT. JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
This commit is contained in:
committed by
Robert Fancsik
parent
27da5a538c
commit
051febfed7
@@ -16,7 +16,7 @@
|
||||
#ifndef TEST_COMMON_H
|
||||
#define TEST_COMMON_H
|
||||
|
||||
#include "jrt.h"
|
||||
#include "jerryscript-port.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <setjmp.h>
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#define JERRY_UNUSED(x) ((void) (x))
|
||||
|
||||
#define TEST_ASSERT(x) \
|
||||
do \
|
||||
{ \
|
||||
@@ -36,7 +38,7 @@
|
||||
__FILE__, \
|
||||
__func__, \
|
||||
(unsigned long) __LINE__); \
|
||||
jerry_fatal (ERR_FAILED_INTERNAL_ASSERTION); \
|
||||
jerry_port_fatal (ERR_FAILED_INTERNAL_ASSERTION); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user