Skip to content

Commit

Permalink
Add more UNUSED() declarations to key.pmc and core.ops
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Sep 18, 2012
1 parent a95f757 commit ef4b571
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/ops/core.ops
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Halts the interpreter. See also B<exit>.
=cut

inline op end() :check_event :flow {
UNUSED(interp);
UNUSED(cur_opcode);
goto ADDRESS(0);
}

Expand Down Expand Up @@ -97,7 +99,6 @@ actions on it.

inline op noop() {
UNUSED(interp);
UNUSED(CUR_OPCODE);
}

inline op check_events() :flow {
Expand Down
9 changes: 4 additions & 5 deletions src/ops/core_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -13605,13 +13605,14 @@ static op_info_t core_op_info_table[1126] = {

opcode_t *
Parrot_end(opcode_t *cur_opcode, PARROT_INTERP) {
UNUSED(interp);
UNUSED(cur_opcode);
return (opcode_t *)0;
}

opcode_t *
Parrot_noop(opcode_t *cur_opcode, PARROT_INTERP) {
UNUSED(interp);
UNUSED(CUR_OPCODE);
return cur_opcode + 1;
}

Expand Down Expand Up @@ -13746,15 +13747,13 @@ Parrot_local_return_p(opcode_t *cur_opcode, PARROT_INTERP) {

opcode_t *
Parrot_jump_i(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t * const loc = INTVAL2PTR(opcode_t *, IREG(1));

opcode_t * const loc = INTVAL2PTR(opcode_t *, IREG(1));
return (opcode_t *)loc;
}

opcode_t *
Parrot_jump_ic(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t * const loc = INTVAL2PTR(opcode_t *, ICONST(1));

opcode_t * const loc = INTVAL2PTR(opcode_t *, ICONST(1));
return (opcode_t *)loc;
}

Expand Down
8 changes: 7 additions & 1 deletion src/pmc/key.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Initializes the key.
*/

VTABLE void init() {
UNUSED(INTERP)
PObj_custom_mark_SET(SELF);
}

Expand Down Expand Up @@ -186,7 +187,9 @@ Sets the value of the key to C<*value>.
*/

VTABLE void set_pmc(PMC *value) {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
UNUSED(SELF)
UNUSED(value)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_UNIMPLEMENTED,
"this is broken - see TT #1683");
}

Expand Down Expand Up @@ -245,6 +248,8 @@ Returns the key itself.
*/

VTABLE PMC *get_pmc_keyed(PMC *key) {
UNUSED(INTERP)
UNUSED(SELF)
return key;
}

Expand Down Expand Up @@ -398,6 +403,7 @@ Aggregate interface.
*/

VTABLE INTVAL elements() {
UNUSED(INTERP)
INTVAL n = 0;
for (; SELF; SELF = PARROT_KEY(SELF)->next_key)
n++;
Expand Down

0 comments on commit ef4b571

Please sign in to comment.