aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/klists.cpp2
-rw-r--r--engines/sci/engine/scriptconsole.cpp10
-rw-r--r--engines/sci/engine/scriptdebug.cpp4
-rw-r--r--engines/sci/engine/seg_manager.cpp2
-rw-r--r--engines/sci/gfx/menubar.cpp2
-rw-r--r--engines/sci/scicore/versions.cpp2
6 files changed, 11 insertions, 11 deletions
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 96b527d812..a0347cbbdf 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -124,7 +124,7 @@ static inline int
sane_nodep(state_t *s, reg_t addr)
{
int have_prev = 0;
- reg_t prev;
+ reg_t prev = addr;
do {
node_t *node = LOOKUP_NODE(addr);
diff --git a/engines/sci/engine/scriptconsole.cpp b/engines/sci/engine/scriptconsole.cpp
index 4d3f431a34..42200d4b62 100644
--- a/engines/sci/engine/scriptconsole.cpp
+++ b/engines/sci/engine/scriptconsole.cpp
@@ -395,7 +395,7 @@ parse_reg_t(state_t *s, const char *str, reg_t *dest)
} else if (*str == '&') {
int script_nr;
/* Look up by script ID */
- char *colon = strchr(str, ':');
+ char *colon = (char *)strchr(str, ':');
if (!colon)
return 1;
@@ -422,8 +422,8 @@ parse_reg_t(state_t *s, const char *str, reg_t *dest)
int i;
/* Parse obj by name */
- tmp = strchr(str, '+');
- str_suffix = strchr(str, '-');
+ tmp = (char *)strchr(str, '+');
+ str_suffix = (char *)strchr(str, '-');
if (tmp < str_suffix)
str_suffix = tmp;
if (str_suffix) {
@@ -431,7 +431,7 @@ parse_reg_t(state_t *s, const char *str, reg_t *dest)
*str_suffix = 0;
}
- tmp = strchr(str, '.');
+ tmp = (char *)strchr(str, '.');
if (tmp) {
*tmp = 0;
@@ -514,7 +514,7 @@ parse_reg_t(state_t *s, const char *str, reg_t *dest)
*str_suffix = suffchar;
rel_offsetting = 1;
} else {
- char *colon = strchr(str, ':');
+ char *colon = (char *)strchr(str, ':');
if (!colon) {
offsetting = str;
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 73bfcf3a97..9014ca20d6 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -773,7 +773,7 @@ c_seginfo(state_t *s)
sciprintf("[%04x] ", nr);
_c_single_seg_info(s, s->seg_manager.heap[nr]);
}
- } else for (i = 0; i < s->seg_manager.heap_size; i++)
+ } else for (i = 0; i < (unsigned int) s->seg_manager.heap_size; i++)
if (s->seg_manager.heap[i]) {
sciprintf("[%04x] ", i);
_c_single_seg_info(s, s->seg_manager.heap[i]);
@@ -1573,7 +1573,7 @@ disassemble(state_t *s, reg_t pos, int print_bw_tag, int print_bytecode)
while (stackframe > 0) {
int argc = sb[- stackframe + 1].offset;
const char *name = NULL;
- reg_t called_obj_addr;
+ reg_t called_obj_addr = *p_objp;
if (opcode == op_send)
called_obj_addr = s->r_acc;
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 42654e1e01..78ad431a35 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -577,7 +577,7 @@ sm_get_heap (seg_manager_t* self, reg_t reg)
switch( mem_type ) {
case MEM_OBJ_SCRIPT:
- VERIFY( reg.offset + 1 < mem_obj->data.script.buf_size, "invalid offset\n" );
+ VERIFY( reg.offset + 1 < (unsigned int)mem_obj->data.script.buf_size, "invalid offset\n" );
return (unsigned char)mem_obj->data.script.buf[reg.offset] |
( ((unsigned char)mem_obj->data.script.buf[reg.offset+1]) << 8 );
case MEM_OBJ_CLONES:
diff --git a/engines/sci/gfx/menubar.cpp b/engines/sci/gfx/menubar.cpp
index 38feace8ca..f0b5b40805 100644
--- a/engines/sci/gfx/menubar.cpp
+++ b/engines/sci/gfx/menubar.cpp
@@ -163,7 +163,7 @@ menubar_add_menu(gfx_state_t *state, menubar_t *menubar, char *title, char *entr
menu_t *menu;
char tracker;
char *left = NULL, *right;
- reg_t left_origin;
+ reg_t left_origin = entries_base;
int string_len = 0;
int tag = 0, c_width, max_width = 0;
int height;
diff --git a/engines/sci/scicore/versions.cpp b/engines/sci/scicore/versions.cpp
index fd2bb404db..b5b108a966 100644
--- a/engines/sci/scicore/versions.cpp
+++ b/engines/sci/scicore/versions.cpp
@@ -354,7 +354,7 @@ version_guess_from_hashcode(sci_version_t *result, int *res_version, guint32 *co
*code = hash_code;
for (i = 0 ; sci_games[i].name ; i++) {
- if (sci_games[i].id == hash_code) {
+ if ((unsigned int)sci_games[i].id == hash_code) {
*result = sci_games[i].version;
*res_version = sci_games[i].res_version;
return sci_games[i].name;