Commit 0612081e6c161d9d820742f995975d35da2adbc2

Zachary Waldowski 2013-11-30T03:03:00

Darwin: Misc size_t warnings

diff --git a/src/closures.c b/src/closures.c
index 4d0a0b6..6eac601 100644
--- a/src/closures.c
+++ b/src/closures.c
@@ -264,7 +264,7 @@ static int
 open_temp_exec_file_dir (const char *dir)
 {
   static const char suffix[] = "/ffiXXXXXX";
-  int lendir = strlen (dir);
+  size_t lendir = strlen (dir);
   char *tempname = __builtin_alloca (lendir + sizeof (suffix));
 
   if (!tempname)
diff --git a/src/prep_cif.c b/src/prep_cif.c
index a66ee23..e216ef0 100644
--- a/src/prep_cif.c
+++ b/src/prep_cif.c
@@ -187,7 +187,7 @@ ffi_status FFI_HIDDEN ffi_prep_cif_core(ffi_cif *cif, ffi_abi abi,
 	{
 	  /* Add any padding if necessary */
 	  if (((*ptr)->alignment - 1) & bytes)
-	    bytes = ALIGN(bytes, (*ptr)->alignment);
+	    bytes = (unsigned)ALIGN(bytes, (*ptr)->alignment);
 
 #ifdef TILE
 	  if (bytes < 10 * FFI_SIZEOF_ARG &&