Skip to content

Commit ce90548

Browse files
author
Zsolt Borbély
committed
Introduce JERRY_UNUSED() instead of __attr_unused___
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély [email protected]
1 parent 4afd76d commit ce90548

23 files changed

+137
-97
lines changed

jerry-core/ecma/builtin-objects/ecma-builtin-array.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
1+
/* Copyright 2014-2016 Samsung Electronics Co., Ltd.
22
*
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
@@ -54,9 +54,10 @@
5454
* Returned value must be freed with ecma_free_value.
5555
*/
5656
static ecma_value_t
57-
ecma_builtin_array_object_is_array (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */
57+
ecma_builtin_array_object_is_array (ecma_value_t this_arg, /**< 'this' argument */
5858
ecma_value_t arg) /**< first argument */
5959
{
60+
JERRY_UNUSED (this_arg);
6061
ecma_simple_value_t is_array = ECMA_SIMPLE_VALUE_FALSE;
6162

6263
if (ecma_is_value_object (arg))

jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,8 +1166,9 @@ ecma_builtin_date_prototype_to_iso_string (ecma_value_t this_arg) /**< this argu
11661166
*/
11671167
static ecma_value_t
11681168
ecma_builtin_date_prototype_to_json (ecma_value_t this_arg, /**< this argument */
1169-
ecma_value_t arg __attr_unused___) /**< key */
1169+
ecma_value_t arg) /**< key */
11701170
{
1171+
JERRY_UNUSED (arg);
11711172
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
11721173

11731174
/* 1. */

jerry-core/ecma/builtin-objects/ecma-builtin-date.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,10 @@ ecma_date_construct_helper (const ecma_value_t *args, /**< arguments passed to t
182182
* Returned value must be freed with ecma_free_value.
183183
*/
184184
static ecma_value_t
185-
ecma_builtin_date_parse (ecma_value_t this_arg __attr_unused___, /**< this argument */
185+
ecma_builtin_date_parse (ecma_value_t this_arg, /**< this argument */
186186
ecma_value_t arg) /**< string */
187187
{
188+
JERRY_UNUSED (this_arg);
188189
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
189190
ecma_number_t date_num = ecma_number_make_nan ();
190191

@@ -398,10 +399,11 @@ ecma_builtin_date_parse (ecma_value_t this_arg __attr_unused___, /**< this argum
398399
* Returned value must be freed with ecma_free_value.
399400
*/
400401
static ecma_value_t
401-
ecma_builtin_date_utc (ecma_value_t this_arg __attr_unused___, /**< this argument */
402+
ecma_builtin_date_utc (ecma_value_t this_arg, /**< this argument */
402403
const ecma_value_t args[], /**< arguments list */
403404
ecma_length_t args_number) /**< number of arguments */
404405
{
406+
JERRY_UNUSED (this_arg);
405407
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
406408

407409
if (args_number < 2)
@@ -433,8 +435,9 @@ ecma_builtin_date_utc (ecma_value_t this_arg __attr_unused___, /**< this argumen
433435
* Returned value must be freed with ecma_free_value.
434436
*/
435437
static ecma_value_t
436-
ecma_builtin_date_now (ecma_value_t this_arg __attr_unused___) /**< this argument */
438+
ecma_builtin_date_now (ecma_value_t this_arg) /**< this argument */
437439
{
440+
JERRY_UNUSED (this_arg);
438441
return ecma_make_number_value (DOUBLE_TO_ECMA_NUMBER_T (jerry_port_get_current_time ()));
439442
} /* ecma_builtin_date_now */
440443

@@ -447,9 +450,11 @@ ecma_builtin_date_now (ecma_value_t this_arg __attr_unused___) /**< this argumen
447450
* @return ecma value
448451
*/
449452
ecma_value_t
450-
ecma_builtin_date_dispatch_call (const ecma_value_t *arguments_list_p __attr_unused___, /**< arguments list */
451-
ecma_length_t arguments_list_len __attr_unused___) /**< number of arguments */
453+
ecma_builtin_date_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
454+
ecma_length_t arguments_list_len) /**< number of arguments */
452455
{
456+
JERRY_UNUSED (arguments_list_p);
457+
JERRY_UNUSED (arguments_list_len);
453458
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
454459

455460
ECMA_TRY_CATCH (now_val,

jerry-core/ecma/builtin-objects/ecma-builtin-global.c

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@
6161
* Returned value must be freed with ecma_free_value.
6262
*/
6363
static ecma_value_t
64-
ecma_builtin_global_object_print (ecma_value_t this_arg __attr_unused___, /**< this argument */
64+
ecma_builtin_global_object_print (ecma_value_t this_arg, /**< this argument */
6565
const ecma_value_t args[], /**< arguments list */
6666
ecma_length_t args_number) /**< number of arguments */
6767
{
68+
JERRY_UNUSED (this_arg);
6869
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
6970

7071
/* TODO: Move the 'print' routine out of engine core. */
@@ -148,9 +149,10 @@ ecma_builtin_global_object_print (ecma_value_t this_arg __attr_unused___, /**< t
148149
* Returned value must be freed with ecma_free_value.
149150
*/
150151
static ecma_value_t
151-
ecma_builtin_global_object_eval (ecma_value_t this_arg __attr_unused___, /**< this argument */
152+
ecma_builtin_global_object_eval (ecma_value_t this_arg, /**< this argument */
152153
ecma_value_t x) /**< routine's first argument */
153154
{
155+
JERRY_UNUSED (this_arg);
154156
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
155157

156158
bool is_direct_eval = vm_is_direct_eval_form_call ();
@@ -192,10 +194,11 @@ ecma_builtin_global_object_eval (ecma_value_t this_arg __attr_unused___, /**< th
192194
* Returned value must be freed with ecma_free_value.
193195
*/
194196
static ecma_value_t
195-
ecma_builtin_global_object_parse_int (ecma_value_t this_arg __attr_unused___, /**< this argument */
197+
ecma_builtin_global_object_parse_int (ecma_value_t this_arg, /**< this argument */
196198
ecma_value_t string, /**< routine's first argument */
197199
ecma_value_t radix) /**< routine's second argument */
198200
{
201+
JERRY_UNUSED (this_arg);
199202
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
200203

201204
/* 1. */
@@ -403,9 +406,10 @@ ecma_builtin_global_object_parse_int (ecma_value_t this_arg __attr_unused___, /*
403406
* Returned value must be freed with ecma_free_value.
404407
*/
405408
static ecma_value_t
406-
ecma_builtin_global_object_parse_float (ecma_value_t this_arg __attr_unused___, /**< this argument */
409+
ecma_builtin_global_object_parse_float (ecma_value_t this_arg, /**< this argument */
407410
ecma_value_t string) /**< routine's first argument */
408411
{
412+
JERRY_UNUSED (this_arg);
409413
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
410414

411415
/* 1. */
@@ -621,9 +625,10 @@ ecma_builtin_global_object_parse_float (ecma_value_t this_arg __attr_unused___,
621625
* Returned value must be freed with ecma_free_value.
622626
*/
623627
static ecma_value_t
624-
ecma_builtin_global_object_is_nan (ecma_value_t this_arg __attr_unused___, /**< this argument */
628+
ecma_builtin_global_object_is_nan (ecma_value_t this_arg, /**< this argument */
625629
ecma_value_t arg) /**< routine's first argument */
626630
{
631+
JERRY_UNUSED (this_arg);
627632
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
628633

629634
ECMA_OP_TO_NUMBER_TRY_CATCH (arg_num, arg, ret_value);
@@ -648,9 +653,10 @@ ecma_builtin_global_object_is_nan (ecma_value_t this_arg __attr_unused___, /**<
648653
* Returned value must be freed with ecma_free_value.
649654
*/
650655
static ecma_value_t
651-
ecma_builtin_global_object_is_finite (ecma_value_t this_arg __attr_unused___, /**< this argument */
656+
ecma_builtin_global_object_is_finite (ecma_value_t this_arg, /**< this argument */
652657
ecma_value_t arg) /**< routine's first argument */
653658
{
659+
JERRY_UNUSED (this_arg);
654660
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
655661

656662
ECMA_OP_TO_NUMBER_TRY_CATCH (arg_num, arg, ret_value);
@@ -720,9 +726,10 @@ static const uint8_t unescaped_uri_component_set[16] =
720726
* Returned value must be freed with ecma_free_value.
721727
*/
722728
static ecma_value_t
723-
ecma_builtin_global_object_decode_uri_helper (ecma_value_t uri __attr_unused___, /**< uri argument */
729+
ecma_builtin_global_object_decode_uri_helper (ecma_value_t uri, /**< uri argument */
724730
const uint8_t *reserved_uri_bitset) /**< reserved characters bitset */
725731
{
732+
JERRY_UNUSED (uri);
726733
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
727734

728735
ECMA_TRY_CATCH (string,
@@ -949,9 +956,10 @@ ecma_builtin_global_object_decode_uri_helper (ecma_value_t uri __attr_unused___,
949956
* Returned value must be freed with ecma_free_value.
950957
*/
951958
static ecma_value_t
952-
ecma_builtin_global_object_decode_uri (ecma_value_t this_arg __attr_unused___, /**< this argument */
959+
ecma_builtin_global_object_decode_uri (ecma_value_t this_arg, /**< this argument */
953960
ecma_value_t encoded_uri) /**< routine's first argument */
954961
{
962+
JERRY_UNUSED (this_arg);
955963
return ecma_builtin_global_object_decode_uri_helper (encoded_uri, unescaped_uri_set);
956964
} /* ecma_builtin_global_object_decode_uri */
957965

@@ -965,10 +973,11 @@ ecma_builtin_global_object_decode_uri (ecma_value_t this_arg __attr_unused___, /
965973
* Returned value must be freed with ecma_free_value.
966974
*/
967975
static ecma_value_t
968-
ecma_builtin_global_object_decode_uri_component (ecma_value_t this_arg __attr_unused___, /**< this argument */
976+
ecma_builtin_global_object_decode_uri_component (ecma_value_t this_arg, /**< this argument */
969977
ecma_value_t encoded_uri_component) /**< routine's
970978
* first argument */
971979
{
980+
JERRY_UNUSED (this_arg);
972981
return ecma_builtin_global_object_decode_uri_helper (encoded_uri_component, unescaped_uri_component_set);
973982
} /* ecma_builtin_global_object_decode_uri_component */
974983

@@ -1159,9 +1168,10 @@ ecma_builtin_global_object_encode_uri_helper (ecma_value_t uri, /**< uri argumen
11591168
* Returned value must be freed with ecma_free_value.
11601169
*/
11611170
static ecma_value_t
1162-
ecma_builtin_global_object_encode_uri (ecma_value_t this_arg __attr_unused___, /**< this argument */
1171+
ecma_builtin_global_object_encode_uri (ecma_value_t this_arg, /**< this argument */
11631172
ecma_value_t uri) /**< routine's first argument */
11641173
{
1174+
JERRY_UNUSED (this_arg);
11651175
return ecma_builtin_global_object_encode_uri_helper (uri, unescaped_uri_set);
11661176
} /* ecma_builtin_global_object_encode_uri */
11671177

@@ -1175,9 +1185,10 @@ ecma_builtin_global_object_encode_uri (ecma_value_t this_arg __attr_unused___, /
11751185
* Returned value must be freed with ecma_free_value.
11761186
*/
11771187
static ecma_value_t
1178-
ecma_builtin_global_object_encode_uri_component (ecma_value_t this_arg __attr_unused___, /**< this argument */
1188+
ecma_builtin_global_object_encode_uri_component (ecma_value_t this_arg, /**< this argument */
11791189
ecma_value_t uri_component) /**< routine's first argument */
11801190
{
1191+
JERRY_UNUSED (this_arg);
11811192
return ecma_builtin_global_object_encode_uri_helper (uri_component, unescaped_uri_component_set);
11821193
} /* ecma_builtin_global_object_encode_uri_component */
11831194

@@ -1215,9 +1226,10 @@ static const uint8_t ecma_escape_set[16] =
12151226
* Returned value must be freed with ecma_free_value.
12161227
*/
12171228
static ecma_value_t
1218-
ecma_builtin_global_object_escape (ecma_value_t this_arg __attr_unused___, /**< this argument */
1229+
ecma_builtin_global_object_escape (ecma_value_t this_arg, /**< this argument */
12191230
ecma_value_t arg) /**< routine's first argument */
12201231
{
1232+
JERRY_UNUSED (this_arg);
12211233
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
12221234

12231235
ECMA_TRY_CATCH (string,
@@ -1335,9 +1347,10 @@ ecma_builtin_global_object_escape (ecma_value_t this_arg __attr_unused___, /**<
13351347
* Returned value must be freed with ecma_free_value.
13361348
*/
13371349
static ecma_value_t
1338-
ecma_builtin_global_object_unescape (ecma_value_t this_arg __attr_unused___, /**< this argument */
1350+
ecma_builtin_global_object_unescape (ecma_value_t this_arg, /**< this argument */
13391351
ecma_value_t arg) /**< routine's first argument */
13401352
{
1353+
JERRY_UNUSED (this_arg);
13411354
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
13421355

13431356
/* 1. */

jerry-core/ecma/builtin-objects/ecma-builtin-json.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,10 +696,11 @@ ecma_builtin_json_walk (ecma_object_t *reviver_p, /**< reviver function */
696696
* Returned value must be freed with ecma_free_value.
697697
*/
698698
static ecma_value_t
699-
ecma_builtin_json_parse (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */
699+
ecma_builtin_json_parse (ecma_value_t this_arg, /**< 'this' argument */
700700
ecma_value_t arg1, /**< string argument */
701701
ecma_value_t arg2) /**< reviver argument */
702702
{
703+
JERRY_UNUSED (this_arg);
703704
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
704705

705706
ECMA_TRY_CATCH (string,
@@ -790,11 +791,12 @@ ecma_builtin_json_array (ecma_object_t *obj_p, ecma_json_stringify_context_t *co
790791
* Returned value must be freed with ecma_free_value.
791792
*/
792793
static ecma_value_t
793-
ecma_builtin_json_stringify (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */
794+
ecma_builtin_json_stringify (ecma_value_t this_arg, /**< 'this' argument */
794795
ecma_value_t arg1, /**< value */
795796
ecma_value_t arg2, /**< replacer */
796797
ecma_value_t arg3) /**< space */
797798
{
799+
JERRY_UNUSED (this_arg);
798800
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
799801

800802
ecma_json_stringify_context_t context;

0 commit comments

Comments
 (0)