Merge useful code (if any) from iphone_libgc_6x branch. (Same for gcc_boehmgc
and mono_libgc.)
-Makefile.am: CFLAGS: Add -Wall -Wextra -Wno-unused-parameters. Resolve
-compiler warnings (if any).
-
configure.host: Move contents to configure.ac and remove the file.
windows-untested: Remove if CMake can generate MS Visual Studio 6.0, 7.0, 8.0
Cygwin: autoreconf fails: possibly undefined macro: AC_MSG_ERROR, AS_IF
at configure.ac:59 and configure.ac:694, respectively (autoreconf-2.68).
-
if (prec == VARIABLE) prec = va_arg(args, int);
arg = va_arg(args, CORD);
len = CORD_len(arg);
- if (prec != NONE && len > prec) {
+ if (prec != NONE && len > (size_t)prec) {
if (prec < 0) return(-1);
arg = CORD_substr(arg, 0, prec);
len = prec;
}
- if (width != NONE && len < width) {
+ if (width != NONE && len < (size_t)width) {
char * blanks = GC_MALLOC_ATOMIC(width-len+1);
memset(blanks, ' ', width-len);
dl_iterate_phdr(GC_register_dynlib_callback, &did_something);
if (did_something) {
# ifdef PT_GNU_RELRO
- size_t i;
+ int i;
for (i = 0; i < n_load_segs; ++i) {
if (load_segs[i].end > load_segs[i].start) {
/* we encounter EOF. */
STATIC ssize_t GC_repeat_read(int fd, char *buf, size_t count)
{
- ssize_t num_read = 0;
+ size_t num_read = 0;
ssize_t result;
ASSERT_CANCEL_DISABLED();
GC_INNER char * GC_get_maps(void)
{
int f;
- int result;
+ ssize_t result;
static char init_buf[1];
static char *maps_buf = init_buf;
static size_t maps_buf_sz = 1;
if (result <= 0)
break;
maps_size += result;
- } while (result == maps_buf_sz-1);
+ } while ((size_t)result == maps_buf_sz-1);
close(f);
if (result <= 0)
return 0;
static void start_mark_threads(void)
{
- unsigned i;
+ int i;
pthread_attr_t attr;
GC_ASSERT(I_DONT_HOLD_LOCK());
if (stat_buf[i] == '\n' && stat_buf[i+1] == 'c'
&& stat_buf[i+2] == 'p' && stat_buf[i+3] == 'u') {
int cpu_no = atoi(&stat_buf[i + 4]);
- if (cpu_no >= result)
+ if (cpu_no >= (int)result)
result = cpu_no + 1;
}
}
GC_ASSERT(I_HOLD_LOCK());
ASSERT_CANCEL_DISABLED();
if (GC_incremental && GC_collection_in_progress()) {
- int old_gc_no = GC_gc_no;
+ word old_gc_no = GC_gc_no;
/* Make sure that no part of our stack is still on the mark stack, */
/* since it's about to be unmapped. */
unsigned my_spin_max;
static unsigned last_spins = 0;
unsigned my_last_spins;
- int i;
+ unsigned i;
if (AO_test_and_set_acquire(&GC_allocate_lock) == AO_TS_CLEAR) {
return;
root[i] = libsrl_mktree(12);
GC_gcollect();
}
- for (i = 0; i < sizeof(struct treenode); ++i) {
+ for (i = 0; i < (int)sizeof(struct treenode); ++i) {
if (staticroot[i] != 0x42)
return -1;
}
root[i] = libsrl_mktree(12);
GC_gcollect();
}
- for (i = 0; i < sizeof(struct treenode); ++i) {
+ for (i = 0; i < (int)sizeof(struct treenode); ++i) {
if (staticroot[i] != 0x42)
return -1;
}