[Scummvm-cvs-logs] SF.net SVN: scummvm:[38243] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Feb 15 15:26:33 CET 2009
Revision: 38243
http://scummvm.svn.sourceforge.net/scummvm/?rev=38243&view=rev
Author: thebluegr
Date: 2009-02-15 14:26:33 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Silenced a ton of warnings, and disabled several unreferenced functions (dead code) - hopefully, compilation hasn't been broken...
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/grammar.cpp
scummvm/trunk/engines/sci/engine/kmenu.cpp
scummvm/trunk/engines/sci/engine/kpathing.cpp
scummvm/trunk/engines/sci/engine/ksound.cpp
scummvm/trunk/engines/sci/engine/kstring.cpp
scummvm/trunk/engines/sci/engine/message.cpp
scummvm/trunk/engines/sci/engine/scriptconsole.cpp
scummvm/trunk/engines/sci/engine/scriptdebug.cpp
scummvm/trunk/engines/sci/engine/seg_manager.cpp
scummvm/trunk/engines/sci/engine/vm.cpp
scummvm/trunk/engines/sci/gfx/gfx_crossblit.cpp
scummvm/trunk/engines/sci/gfx/operations.cpp
scummvm/trunk/engines/sci/gfx/resource/sci_pal_1.cpp
scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp
scummvm/trunk/engines/sci/gfx/resource/sci_picfill.cpp
scummvm/trunk/engines/sci/gfx/sbtree.cpp
scummvm/trunk/engines/sci/include/gfx_system.h
scummvm/trunk/engines/sci/scicore/console.cpp
scummvm/trunk/engines/sci/scicore/resource.cpp
scummvm/trunk/engines/sci/scicore/script.cpp
scummvm/trunk/engines/sci/scicore/versions.cpp
scummvm/trunk/engines/sci/sfx/core.cpp
scummvm/trunk/engines/sci/sfx/iterator.cpp
scummvm/trunk/engines/sci/sfx/mixer/soft.cpp
Modified: scummvm/trunk/engines/sci/engine/grammar.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/grammar.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/engine/grammar.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -104,6 +104,9 @@
rule = NULL;
}
+#if 0
+// Unreferenced - removed
+
static parse_rule_t *
_vbuild(int id, int argc, ...)
{
@@ -132,7 +135,10 @@
va_end(args);
return rule;
}
+#endif
+#if 0
+// Unreferenced - removed
static parse_rule_t *
_vcat(int id, parse_rule_t *a, parse_rule_t *b)
{
@@ -149,6 +155,7 @@
return rule;
}
+#endif
static parse_rule_t *
_vdup(parse_rule_t *a)
@@ -197,7 +204,8 @@
return rule;
}
-
+#if 0
+// Unreferenced - removed
static int
_greibach_rule_p(parse_rule_t *rule)
{
@@ -212,6 +220,7 @@
return (rule->data[pos] & TOKEN_TERMINAL);
}
+#endif
static parse_rule_t *
_vbuild_rule(parse_tree_branch_t *branch)
Modified: scummvm/trunk/engines/sci/engine/kmenu.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmenu.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/engine/kmenu.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -321,7 +321,7 @@
int type = GET_SEL32V(event, type);
int message = GET_SEL32V(event, message);
int modifiers = GET_SEL32V(event, modifiers);
- int menu_nr = -1, item_nr;
+ int menu_nr = -1, item_nr = 0;
menu_item_t *item;
int menu_mode = 0; /* Menu is active */
int mouse_down = 0;
Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -1091,9 +1091,9 @@
** (point_t) *ret: On success, the closest intersection point
*/
{
- polygon_t *polygon;
+ polygon_t *polygon = 0;
pointf_t isec;
- polygon_t *ipolygon;
+ polygon_t *ipolygon = 0;
float dist = HUGE_DISTANCE;
LIST_FOREACH(polygon, &s->polygons, entries) {
Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -532,7 +532,7 @@
int sec = 0;
int frame = 0;
int result = SI_LOOP; /* small hack */
- int cue;
+ int cue = 0;
while (result == SI_LOOP)
result = sfx_poll_specific(&s->sound, handle, &cue);
Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -203,7 +203,7 @@
while (node) {
reg_t objpos = node->value;
int seg;
- int synonyms_nr;
+ int synonyms_nr = 0;
script = GET_SEL32V(objpos, number);
seg = sm_seg_get(&(s->seg_manager), script);
Modified: scummvm/trunk/engines/sci/engine/message.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/message.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/engine/message.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -27,14 +27,19 @@
#include "sci/engine/message.h"
+#if 0
+// Unreferenced - removed
static
int get_talker_trivial(index_record_cursor_t *cursor)
{
return -1;
}
+#endif
/* Version 2.101 and later code ahead */
+#if 0
+// Unreferenced - removed
static
void index_record_parse_2101(index_record_cursor_t *cursor, message_tuple_t *t)
{
@@ -45,7 +50,10 @@
t->verb = verb;
t->cond = t->seq = 0;
}
+#endif
+#if 0
+// Unreferenced - removed
static
void index_record_get_text_2101(index_record_cursor_t *cursor, char *buffer, int buffer_size)
{
@@ -54,12 +62,16 @@
strncpy(buffer, stringptr, buffer_size);
}
+#endif
+#if 0
+// Unreferenced - removed
static
int header_get_index_record_count_2101(byte *header)
{
return getUInt16(header + 4);
}
+#endif
/* Version 3.411 and later code ahead */
@@ -211,7 +223,7 @@
void message_state_initialize(resource_mgr_t *resmgr, message_state_t *state)
{
resource_t *tester = scir_find_resource(resmgr, sci_message, 0, 0);
- int version;
+ //int version;
// if (tester == NULL) return;
Modified: scummvm/trunk/engines/sci/engine/scriptconsole.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptconsole.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/engine/scriptconsole.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -1083,7 +1083,7 @@
unsigned int i;
char *name = cmd_params[0].str;
char *c = strchr(name, '.');
- cmd_mm_entry_t *entry;
+ cmd_mm_entry_t *entry = 0;
if (c) {
*c = 0;
Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -1977,7 +1977,7 @@
sciprintf("Not in debug state\n");
return 1;
}
-WARNING(fixme!)
+//WARNING(fixme!)
#if 0
if (s->onscreen_console)
con_restore_screen(s, s->osc_backup);
@@ -2296,6 +2296,8 @@
tt = GET_SELECTOR(pos, tt); \
bb = GET_SELECTOR(pos, bb);
+#if 0
+// Unreferenced - removed
static int
c_gfx_draw_viewobj(state_t *s)
{
@@ -2379,8 +2381,8 @@
return 0;
#endif
}
+#endif
-
static int
c_gfx_flush_resources(state_t *s)
{
Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -476,6 +476,8 @@
}
/* memory operations */
+#if 0
+// Unreferenced - removed
static void
sm_mset (seg_manager_t* self, int offset, int c, size_t n, int id, int flag) {
mem_obj_t* mem_obj;
@@ -495,7 +497,10 @@
break;
}
}
+#endif
+#if 0
+// Unreferenced - removed
static void
sm_mcpy_in_in (seg_manager_t* self, int dst, const int src, size_t n, int id, int flag) {
mem_obj_t* mem_obj;
@@ -515,6 +520,7 @@
break;
}
}
+#endif
void
sm_mcpy_in_out (seg_manager_t* self, int dst, const void* src, size_t n, int id, int flag) {
@@ -536,6 +542,8 @@
}
}
+#if 0
+// Unreferenced - removed
static void
sm_mcpy_out_in (seg_manager_t* self, void* dst, const int src, size_t n, int id, int flag) {
mem_obj_t* mem_obj;
@@ -555,6 +563,7 @@
break;
}
}
+#endif
gint16
sm_get_heap (seg_manager_t* self, reg_t reg)
@@ -701,6 +710,8 @@
self->exports_wide = flag;
}
+#if 0
+// Unreferenced - removed
static guint16 *
sm_get_export_table_offset (struct _seg_manager_t* self, int id, int flag, int *max)
{
@@ -709,6 +720,7 @@
*max = self->heap[id]->data.script.exports_nr;
return self->heap[id]->data.script.export_table;
}
+#endif
void
sm_set_synonyms_offset (struct _seg_manager_t* self, int offset, int id, id_flag flag) {
@@ -737,13 +749,18 @@
return self->heap[id]->data.script.synonyms_nr;
}
+#if 0
+// Unreferenced - removed
static int
sm_get_heappos (struct _seg_manager_t* self, int id, int flag)
{
GET_SEGID();
return 0;
}
+#endif
+#if 0
+// Unreferenced - removed
static void
sm_set_variables (struct _seg_manager_t* self, reg_t reg, int obj_index, reg_t variable_reg, int variable_index ) {
script_t* script;
@@ -760,8 +777,8 @@
script->objects[obj_index].variables[variable_index] = variable_reg;
}
+#endif
-
static inline int
_relocate_block(seg_manager_t *self, reg_t *block, int block_location, int block_items, seg_id_t segment, int location)
{
@@ -959,7 +976,7 @@
script_t *scr;
object_t *obj;
int id;
- int base = obj_pos.offset - SCRIPT_OBJECT_MAGIC_OFFSET;
+ unsigned int base = obj_pos.offset - SCRIPT_OBJECT_MAGIC_OFFSET;
reg_t temp;
VERIFY( !(obj_pos.segment >= self->heap_size || mobj->type != MEM_OBJ_SCRIPT),
@@ -1165,7 +1182,7 @@
sm_script_initialise_locals(seg_manager_t *self, reg_t location)
{
mem_obj_t *mobj = self->heap[location.segment];
- int count;
+ unsigned int count;
script_t *scr;
local_variables_t *locals;
Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/engine/vm.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -683,7 +683,7 @@
seg_id_t variables_seg[4]; /* Same as above, contains segment IDs */
#ifndef DISABLE_VALIDATIONS
int variables_max[4]; /* Max. values for all variables */
- int code_buf_size = 0 /* (Avoid spurious warning) */;
+ unsigned int code_buf_size = 0 /* (Avoid spurious warning) */;
#endif
int temp;
gint16 aux_acc; /* Auxiliary 16 bit accumulator */
Modified: scummvm/trunk/engines/sci/gfx/gfx_crossblit.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_crossblit.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/gfx/gfx_crossblit.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -35,6 +35,8 @@
** BYTESPP: Bytes per pixel
*/
+#include "common/scummsys.h"
+
/* set optimisations for Win32: */
/* g on: enable global optimizations */
/* t on: use fast code */
Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -111,6 +111,8 @@
gfx_alloc_color(state->driver->mode->palette, colors + i);
}
+#if 0
+// Unreferenced - removed
static void
_gfxop_free_colors(gfx_state_t *state, gfx_pixmap_color_t *colors, int colors_nr)
{
@@ -122,8 +124,8 @@
for (i = 0; i < colors_nr; i++)
gfx_free_color(state->driver->mode->palette, colors + i);
}
+#endif
-
int _gfxop_clip(rect_t *rect, rect_t clipzone)
/* Returns 1 if nothing is left */
{
Modified: scummvm/trunk/engines/sci/gfx/resource/sci_pal_1.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_pal_1.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_pal_1.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -42,7 +42,7 @@
{
int start_color = resource[25];
int format = resource[32];
- int entry_size;
+ int entry_size = 0;
gfx_pixmap_color_t *retval;
byte *pal_data = resource + 37;
int _colors_nr = *colors_nr = getUInt16(resource + 29);
Modified: scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -368,7 +368,8 @@
pic->aux_map[i+pos] |= FRESH_PAINT;
}
-
+#if 0
+// Unreferenced - removed
static void
_gfxr_auxbuf_spread(gfxr_pic_t *pic, int *min_x, int *min_y, int *max_x, int *max_y)
{
@@ -518,8 +519,8 @@
(*max_y)++;
}
+#endif
-
/*** Regular drawing operations ***/
Modified: scummvm/trunk/engines/sci/gfx/resource/sci_picfill.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_picfill.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_picfill.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -18,6 +18,8 @@
***************************************************************************/
+#include "sci/include/gfx_resource.h"
+
/* Generic pic filling code, to be included by sci_pic_0.c
*
*
Modified: scummvm/trunk/engines/sci/gfx/sbtree.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/sbtree.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/gfx/sbtree.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -191,6 +191,7 @@
return NULL;
}
+#if 0
static void
sbtree_print(sbtree_t *tree)
{
@@ -216,9 +217,9 @@
}
fprintf(stderr,"\n");
}
+#endif
-
/***************************** TEST CODE ********************************/
Modified: scummvm/trunk/engines/sci/include/gfx_system.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_system.h 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/include/gfx_system.h 2009-02-15 14:26:33 UTC (rev 38243)
@@ -132,7 +132,7 @@
typedef struct { /* gfx_color_t: Full color */
gfx_pixmap_color_t visual;
guint8 alpha; /* transparency = (1-opacity) */
- byte priority, control;
+ signed char priority, control;
byte mask; /* see mask values below */
} gfx_color_t;
Modified: scummvm/trunk/engines/sci/scicore/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/console.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/scicore/console.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -48,7 +48,7 @@
{
va_list argp;
size_t bufsize = 256;
- int i;
+ unsigned int i;
char *buf = (char *) sci_malloc (bufsize);
if (NULL == fmt) {
Modified: scummvm/trunk/engines/sci/scicore/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/scicore/resource.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -442,7 +442,7 @@
char *dir)
{
char *trailing_slash = "";
- char path_separator;
+ //char path_separator;
sci_dir_t dirent;
char *name;
resource_source_t *map;
Modified: scummvm/trunk/engines/sci/scicore/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/script.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/scicore/script.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -363,7 +363,7 @@
while (_seeker < script->size) {
int objtype = getInt16(script->data + _seeker);
int objsize;
- int seeker = _seeker + 4;
+ unsigned int seeker = _seeker + 4;
if (!objtype) {
sciprintf("End of script object (#0) encountered.\n");
Modified: scummvm/trunk/engines/sci/scicore/versions.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/versions.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/scicore/versions.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -115,7 +115,7 @@
FILE *file;
byte buf[4];
guint32 val;
- int i;
+ unsigned int i;
/* Mac executables have no extension */
if (strchr(filename, '.'))
Modified: scummvm/trunk/engines/sci/sfx/core.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/core.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/sfx/core.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -125,7 +125,8 @@
}
}
-
+#if 0
+// Unreferenced - removed
static void
_dump_playing_list(sfx_state_t *self, char *msg)
{
@@ -148,6 +149,7 @@
fprintf(stderr, "]\n");
}
+#endif
static void
_dump_songs(sfx_state_t *self)
Modified: scummvm/trunk/engines/sci/sfx/iterator.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/iterator.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/sfx/iterator.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -799,7 +799,7 @@
{
sci1_sample_t *seeker;
int last_time;
- int offset = 0;
+ unsigned int offset = 0;
self->channels_nr = 0;
self->next_sample = 0;
// self->device_id = 0x0c;
@@ -947,6 +947,8 @@
return 1;
}
+#if 0
+// Unreferenced - removed
static void
_sci1_dump_state(sci1_song_iterator_t *self)
{
@@ -982,6 +984,7 @@
}
sciprintf("------------------------------------------\n");
}
+#endif
#define COMMAND_INDEX_NONE -1
#define COMMAND_INDEX_PCM -2
@@ -1537,7 +1540,7 @@
if ((it->status & (TEE_LEFT_ACTIVE | TEE_RIGHT_ACTIVE))
!= (TEE_LEFT_ACTIVE | TEE_RIGHT_ACTIVE)) {
/* Not all are is active? */
- int which;
+ int which = 0;
#ifdef DEBUG_TEE_ITERATOR
fprintf(stderr, "\tRequesting transformation...\n");
#endif
@@ -1742,6 +1745,8 @@
it->children[TEE_RIGHT].it->init(it->children[TEE_RIGHT].it);
}
+#if 0
+// Unreferenced - removed
static void
_tee_free(tee_song_iterator_t *it)
{
@@ -1750,6 +1755,7 @@
if (it->children[i].it && it->may_destroy)
songit_free(it->children[i].it);
}
+#endif
static void
songit_tee_death_notification(tee_song_iterator_t *self,
Modified: scummvm/trunk/engines/sci/sfx/mixer/soft.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/mixer/soft.cpp 2009-02-15 14:17:54 UTC (rev 38242)
+++ scummvm/trunk/engines/sci/sfx/mixer/soft.cpp 2009-02-15 14:26:33 UTC (rev 38243)
@@ -250,6 +250,8 @@
BREAKPOINT();
}
+#if 0
+// Unreferenced - removed
static void
mix_unsubscribe(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed)
{
@@ -257,8 +259,8 @@
_mix_unsubscribe(self, feed);
RELEASE_LOCK();
}
+#endif
-
static void
mix_exit(sfx_pcm_mixer_t *self)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list