[parrot/parrot] 86e504: [cage] change UNUSED(arg) to SHIM in the decl [GH ...

GitHub noreply at github.com
Mon Mar 10 23:10:28 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/parrot/parrot
  Commit: 86e504c4b8452dceca0086ac54ae883f2e07e318
      https://github.com/parrot/parrot/commit/86e504c4b8452dceca0086ac54ae883f2e07e318
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-03-10 (Mon, 10 Mar 2014)

  Changed paths:
    M compilers/imcc/imcc.y
    M compilers/imcc/imcparser.c
    M compilers/imcc/parser_util.c
    M compilers/imcc/pbc.c
    M compilers/imcc/pcc.c
    M compilers/imcc/symreg.c
    M include/parrot/debugger.h
    M include/parrot/encoding.h
    M include/parrot/oplib/core_ops.h
    M include/parrot/oplib/ops.h
    M include/parrot/opsenum.h
    M include/parrot/packfile.h
    M src/call/context.c
    M src/call/ops.c
    M src/debug.c
    M src/embed/pmc.c
    M src/gc/alloc_resources.c
    M src/gc/gc_gms.c
    M src/gc/gc_inf.c
    M src/gc/gc_private.h
    M src/gc/mark_sweep.c
    M src/gc/string_gc.c
    M src/interp/api.c
    M src/io/api.c
    M src/io/io_private.h
    M src/io/pipe.c
    M src/io/socket.c
    M src/io/stringhandle.c
    M src/io/utilities.c
    M src/ops/core.ops
    M src/ops/core_ops.c
    M src/ops/experimental.ops
    M src/packfile/api.c
    M src/packfile/pf_items.c
    M src/platform/generic/exec.c
    M src/pmc/bigint.pmc
    M src/pmc/imageiothaw.pmc
    M src/pmc/integer.pmc
    M src/runcore/cores.c
    M src/string/encoding.c
    M src/string/encoding/shared.c
    M src/string/encoding/shared.h
    M src/utils.c

  Log Message:
  -----------
  [cage] change UNUSED(arg) to SHIM in the decl [GH #1052]

UNUSED just adds code to please the compiler unused warnings, but we should
really declare the args as such with SHIM()
We need UNUSED only in .pmc declaration because we have no control over
SHIM, the pmc2c compiler does it for us there.

Also do not return unused values, rather cast to (void) and
strip PARROT_WARN_UNUSED_RESULT attributes on them.

UNUSED Exceptions: io vtable methods keep the 2nd handle arg. The C abi defines
caller cleanup, so we could declare some of them with empty args, but for
the sake of API sanity we accept at least 2 args.

Headerizer does not grok #ifdef (yet), so we need to UNUSED some args.


  Commit: 9bf1f1fc877810390792afa485d7c036651c3200
      https://github.com/parrot/parrot/commit/9bf1f1fc877810390792afa485d7c036651c3200
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-03-10 (Mon, 10 Mar 2014)

  Changed paths:
    M compilers/imcc/imc.h
    M compilers/imcc/parser.h
    M lib/Parrot/Pmc2c/PMC.pm
    M src/global_setup.c

  Log Message:
  -----------
  [cage] remove redundant duplicate declarations

seen with --cage


Compare: https://github.com/parrot/parrot/compare/9a67ff6a680e...9bf1f1fc8778


More information about the parrot-commits mailing list