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

GitHub noreply at github.com
Mon Aug 6 21:32:33 UTC 2012


  Branch: refs/heads/lndir
  Home:   https://github.com/parrot/parrot
  Commit: 2c139c0fce9e8aee3d4af10b18cb871462a897d5
      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
      [-Wsometimes-uninitialized]
    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


  Commit: f8d2af01707ca4c922664d00aa5619b830c9a9f3
      https://github.com/parrot/parrot/commit/f8d2af01707ca4c922664d00aa5619b830c9a9f3
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2012-07-31 (Tue, 31 Jul 2012)

  Changed paths:
    M src/nci/libffi.c

  Log Message:
  -----------
  Merge branch 'master' into lndir


Compare: https://github.com/parrot/parrot/compare/1f9a56900ec3...f8d2af01707c


More information about the parrot-commits mailing list