Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions runtime/monotouch-main.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
#include "../tools/mtouch/monotouch-fixes.c"
#endif

// TODO: temp ignore to minimize diff
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wsign-conversion"
static unsigned char *
xamarin_load_aot_data (MonoAssembly *assembly, int size, gpointer user_data, void **out_handle)
{
Expand Down Expand Up @@ -60,7 +57,7 @@
return NULL;
}

void *ptr = mmap (NULL, size, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0);
void *ptr = mmap (NULL, (size_t) size, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0);
if (ptr == MAP_FAILED) {
LOG (PRODUCT ": Could not map the aot file for %s: %s\n", aname, strerror (errno));
close (fd);
Expand All @@ -80,7 +77,7 @@
xamarin_free_aot_data (MonoAssembly *assembly, int size, gpointer user_data, void *handle)
{
// COOP: This is a callback called by the AOT runtime, I belive we don't have to change the GC mode here.
munmap (handle, size);
munmap (handle, (size_t) size);
}

/*
Expand Down Expand Up @@ -239,7 +236,7 @@ - (void) memoryWarning: (NSNotification *) sender

xamarin_launch_mode = launch_mode;

memset (managed_argv, 0, sizeof (char*) * (argc + 2));
memset (managed_argv, 0, sizeof (char*) * (unsigned long) (argc + 2));
managed_argv [0] = "monotouch";

DEBUG_LAUNCH_TIME_PRINT ("Main entered");
Expand Down Expand Up @@ -324,7 +321,7 @@ - (void) memoryWarning: (NSNotification *) sender

while (*++value) {
if (*value == '=' || *value == ':') {
name = strndup (arg, value - arg);
name = strndup (arg, (size_t) (value - arg));
value++;
break;
}
Expand Down Expand Up @@ -496,5 +493,3 @@ - (void) memoryWarning: (NSNotification *) sender

return rv;
}

#pragma clang diagnostic pop