[parrot/parrot] 2c139c: [CAGE] libffi: Initialize nci_arg_ptr if !nci->ari...

GitHub noreply at github.com
Tue Jul 31 17:47:21 UTC 2012

  Branch: refs/heads/master
  Home:   https://github.com/parrot/parrot
  Commit: 2c139c0fce9e8aee3d4af10b18cb871462a897d5
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2012-07-31 (Tue, 31 Jul 2012)

  Changed paths:
    M src/nci/libffi.c

  Log Message:
  [CAGE] libffi: Initialize nci_arg_ptr if !nci->arity

clang 3.1 svn160959 properly caught:

src/nci/libffi.c:543:9: warning: variable 'nci_arg_ptr' is used uninitialized whenever 'if' condition is false
    if (nci->arity) {
src/nci/libffi.c:645:64: note: uninitialized use occurs here
    ffi_call(&thunk->cif, FFI_FN(nci->orig_func), return_data, nci_arg_ptr);
src/nci/libffi.c:543:5: note: remove the 'if' if its condition is always true
    if (nci->arity) {
src/nci/libffi.c:483:31: note: initialize the variable 'nci_arg_ptr' to silence this warning
    void         **nci_arg_ptr; /* pointers to arguments for libffi */
                         = NULL

More information about the parrot-commits mailing list