1. 23 Sep, 2015 2 commits
    • Vicente Olivert Riera's avatar
      unix/modffi.c: cast first to intptr_t when casting from/to pointer · 58791416
      Vicente Olivert Riera authored
      This fixes errors like these ones:
      
      modffi.c: In function 'return_ffi_value':
      modffi.c:143:29: error: cast to pointer from integer of different size
      [-Werror=int-to-pointer-cast]
                   const char *s = (const char *)val;
                                   ^
      modffi.c:162:20: error: cast to pointer from integer of different size
      [-Werror=int-to-pointer-cast]
                   return (mp_obj_t)val;
                          ^
      modffi.c: In function 'ffifunc_call':
      modffi.c:358:25: error: cast from pointer to integer of different size
      [-Werror=pointer-to-int-cast]
                   values[i] = (ffi_arg)a;
                               ^
      modffi.c:373:25: error: cast from pointer to integer of different size
      [-Werror=pointer-to-int-cast]
                   values[i] = (ffi_arg)s;
                               ^
      modffi.c:381:25: error: cast from pointer to integer of different size
      [-Werror=pointer-to-int-cast]
                   values[i] = (ffi_arg)bufinfo.buf;
                               ^
      modffi.c:384:25: error: cast from pointer to integer of different size
      [-Werror=pointer-to-int-cast]
                   values[i] = (ffi_arg)p->func;
                               ^
      
      These errors can be highlighted when building micropython from MIPS64
      n32 because ffi_arg is 64-bit wide and the pointers on MIPS64 n32 are
      32-bit wide, so it's trying to case an integer to a pointer (or
      vice-versa) of a different size. We should cast first the pointer (or the
      integer) to a pointer sized integer (intptr_t) to fix that problem.
      Signed-off-by: default avatarVicente Olivert Riera <Vincent.Riera@imgtec.com>
      58791416
    • Paul Sokolovsky's avatar
  2. 22 Sep, 2015 1 commit
  3. 21 Sep, 2015 4 commits
  4. 19 Sep, 2015 4 commits
  5. 18 Sep, 2015 3 commits
  6. 17 Sep, 2015 1 commit
  7. 16 Sep, 2015 14 commits
  8. 15 Sep, 2015 9 commits
  9. 13 Sep, 2015 2 commits