Introduce JERRY_UNUSED() instead of __attr_unused___

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
This commit is contained in:
Zsolt Borbély
2016-06-09 13:31:46 +02:00
parent 4afd76d932
commit ce905487a0
23 changed files with 137 additions and 97 deletions
+4 -6
View File
@@ -288,12 +288,10 @@ static bool foreach (const jerry_string_t *name,
return true;
} /* foreach */
#define UNUSED(x) (void)(x)
static bool foreach_exception (const jerry_string_t *name, const jerry_value_t *value, void * user_data)
{
UNUSED (value);
UNUSED (user_data);
JERRY_UNUSED (value);
JERRY_UNUSED (user_data);
char str_buf_p[128];
jerry_size_t sz = jerry_string_to_char_buffer (name, (jerry_char_t *) str_buf_p, 128);
str_buf_p[sz] = '\0';
@@ -307,8 +305,8 @@ static bool foreach_exception (const jerry_string_t *name, const jerry_value_t *
static bool foreach_subset (const jerry_string_t *name, const jerry_value_t *value, void *user_data)
{
UNUSED (name);
UNUSED (value);
JERRY_UNUSED (name);
JERRY_UNUSED (value);
int *count_p = (int *) (user_data);
if (*count_p == 3)
+3 -4
View File
@@ -1,5 +1,5 @@
/* Copyright 2015 Samsung Electronics Co., Ltd.
* Copyright 2015 University of Szeged.
/* Copyright 2015-2016 Samsung Electronics Co., Ltd.
* Copyright 2015-2016 University of Szeged.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,8 +32,7 @@
* Unit test's main function.
*/
int
main (int __attr_unused___ argc,
char __attr_unused___ **argv)
main ()
{
/* int ecma_date_day (time)*/
+1 -2
View File
@@ -69,8 +69,7 @@ test_heap_give_some_memory_back (jmem_free_unused_memory_severity_t severity)
} /* test_heap_give_some_memory_back */
int
main (int __attr_unused___ argc,
char __attr_unused___ **argv)
main ()
{
TEST_INIT ();
+1 -2
View File
@@ -73,8 +73,7 @@ check_double (const char *expr, double computed, double expected)
} /* check_double */
int
main (int __attr_unused___ argc,
char __attr_unused___ **argv)
main ()
{
#define INF INFINITY
#include "test-libm.inc.h"
+2 -3
View File
@@ -1,4 +1,4 @@
/* Copyright 2015 Samsung Electronics Co., Ltd.
/* Copyright 2015-2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,8 +23,7 @@
#include "test-common.h"
int
main (int __attr_unused___ argc,
char __attr_unused___ **argv)
main ()
{
TEST_INIT ();
+1 -2
View File
@@ -81,8 +81,7 @@ compare_utf8_string_and_string_literal (const lit_utf8_byte_t *str_p, lit_utf8_s
} /* compare_utf8_string_and_string_literal */
int
main (int __attr_unused___ argc,
char __attr_unused___ **argv)
main ()
{
TEST_INIT ();
+2 -3
View File
@@ -1,4 +1,4 @@
/* Copyright 2015 Samsung Electronics Co., Ltd.
/* Copyright 2015-2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -68,8 +68,7 @@ test_setjmp_longjmp (volatile int depth)
} /* test_setjmp_longjmp */
int
main (int __attr_unused___ argc,
char __attr_unused___ **argv)
main ()
{
TEST_INIT ();
+2 -3
View File
@@ -1,4 +1,4 @@
/* Copyright 2015 Samsung Electronics Co., Ltd.
/* Copyright 2015-2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,8 +34,7 @@ typedef struct
* Unit test's main function.
*/
int
main (int __attr_unused___ argc,
char __attr_unused___ **argv)
main ()
{
TEST_INIT ();
+2 -3
View File
@@ -1,4 +1,4 @@
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
/* Copyright 2014-2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,8 +22,7 @@
* Unit test's main function.
*/
int
main (int __attr_unused___ argc,
char __attr_unused___ **argv)
main ()
{
TEST_INIT ();
+1 -2
View File
@@ -35,8 +35,7 @@ uint8_t *ptrs[TEST_MAX_SUB_ITERS];
uint8_t data[TEST_MAX_SUB_ITERS][JMEM_POOL_CHUNK_SIZE];
int
main (int __attr_unused___ argc,
char __attr_unused___ **argv)
main ()
{
TEST_INIT ();
+1 -2
View File
@@ -23,8 +23,7 @@
* Unit test's main function.
*/
int
main (int __attr_unused___ argc,
char __attr_unused___ **argv)
main ()
{
TEST_INIT ();
+1 -2
View File
@@ -102,8 +102,7 @@ generate_cesu8_string (lit_utf8_byte_t *buf_p,
} /* generate_cesu8_string */
int
main (int __attr_unused___ argc,
char __attr_unused___ **argv)
main ()
{
TEST_INIT ();