From 34513fc19fe828b6dfba47fdadf7fc3363787515 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Tue, 14 Jan 2014 00:23:10 -0500 Subject: [PATCH] Fix compilation warning --- src/common/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/memory.c b/src/common/memory.c index 9332ea7..bd33cac 100644 --- a/src/common/memory.c +++ b/src/common/memory.c @@ -90,7 +90,7 @@ memory_clear(enum mem_id_t id) void memory_write8(enum mem_id_t id, unsigned long address, u_int8_t value) { - if (address >= mem_infos[id].max_size) { + if (address >= (unsigned long) mem_infos[id].max_size) { printf("Error writing to memory ID: %d\n", id); printf(" Address (%lu) greater than maximum memory size\n", address); @@ -116,7 +116,7 @@ memory_sfr_write_dptr(u_int16_t value) u_int8_t memory_read8(enum mem_id_t id, unsigned long address) { - if (address >= mem_infos[id].max_size) { + if (address >= (unsigned long) mem_infos[id].max_size) { printf("Error reading from memory ID: %d\n", id); printf(" Address (%lu) greater than maximum memory size\n", address); -- 2.20.1