More Warning cleanups (Tim Beckmann)
This commit is contained in:
parent
abab1011ac
commit
95b8b49b76
60 changed files with 205 additions and 110 deletions
|
@ -269,8 +269,7 @@ void Object_Animation_Sequence_Chunk::get_frames(List <Object_Animation_Sequence
|
|||
for (LIF<Chunk *> cli(&cl); !cli.done(); cli.next())
|
||||
{
|
||||
pList->add_entry((Object_Animation_Sequence_Frame_Chunk *)cli());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
|
@ -319,9 +318,7 @@ Object_Animation_Sequence_Chunk::Object_Animation_Sequence_Chunk(Object_Animatio
|
|||
break;
|
||||
}
|
||||
framelist.delete_first_entry();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Object_Animation_Sequence_Chunk * Object_Animation_Sequences_Chunk::get_sequence (int num, int subnum)
|
||||
|
@ -346,10 +343,7 @@ Object_Animation_Sequence_Chunk * Object_Animation_Sequences_Chunk::get_sequence
|
|||
{
|
||||
return(sli());
|
||||
}
|
||||
else
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Object_Animation_Sequence_Chunk::get_sequence_time()
|
||||
|
|
|
@ -179,9 +179,9 @@ ChunkVector& ChunkVector::operator-=(const ChunkVector& a)
|
|||
ChunkVector::operator VECTORCH () const
|
||||
{
|
||||
VECTORCH v;
|
||||
v.vx = x;
|
||||
v.vy = y;
|
||||
v.vz = z;
|
||||
v.vx = (int)x;
|
||||
v.vy = (int)y;
|
||||
v.vz = (int)z;
|
||||
|
||||
return(v);
|
||||
}
|
||||
|
|
|
@ -231,8 +231,7 @@ Chunk_With_Children const * Chunk::GetRootChunk(void) const
|
|||
|
||||
Miscellaneous_Chunk::Miscellaneous_Chunk (Chunk_With_Children * parent, const char * identifier,
|
||||
const char * _data, size_t _data_size)
|
||||
: Chunk (parent, identifier),
|
||||
data(NULL), data_size (_data_size)
|
||||
: Chunk (parent, identifier), data_size (_data_size), data(NULL)
|
||||
{
|
||||
if (data_size)
|
||||
{
|
||||
|
@ -407,7 +406,7 @@ void Chunk_With_Children::lookup_child (const char * class_ident,List<Chunk*>& c
|
|||
|
||||
if (children)
|
||||
while (child_ptr != NULL) {
|
||||
if (strncmp (class_ident, child_ptr->identifier, 8) == NULL)
|
||||
if (strncmp (class_ident, child_ptr->identifier, 8) == 0)
|
||||
{
|
||||
assert (!child_ptr->r_u_miscellaneous());
|
||||
child_list.add_entry(child_ptr);
|
||||
|
@ -426,7 +425,7 @@ unsigned Chunk_With_Children::count_children (char const * class_ident) const
|
|||
|
||||
if (children)
|
||||
while (child_ptr != NULL) {
|
||||
if (strncmp (class_ident, child_ptr->identifier, 8) == NULL)
|
||||
if (strncmp (class_ident, child_ptr->identifier, 8) == 0)
|
||||
{
|
||||
assert (!child_ptr->r_u_miscellaneous());
|
||||
++ nChildren;
|
||||
|
@ -445,7 +444,7 @@ Chunk* Chunk_With_Children::lookup_single_child (const char * class_ident) const
|
|||
Chunk * chunk_found=0;
|
||||
if (children)
|
||||
while (child_ptr != NULL) {
|
||||
if (strncmp (class_ident, child_ptr->identifier, 8) == NULL)
|
||||
if (strncmp (class_ident, child_ptr->identifier, 8) == 0)
|
||||
{
|
||||
assert (!child_ptr->r_u_miscellaneous());
|
||||
assert(!chunk_found);
|
||||
|
|
|
@ -154,8 +154,8 @@ Preset_Palette::Preset_Palette (Preset_Palette const & c)
|
|||
, reserved1(c.reserved1)
|
||||
, reserved2(c.reserved2)
|
||||
, startpos(c.startpos)
|
||||
, pixel_data(grab_pixel_data(c.size, c.pixel_data))
|
||||
, name(0)
|
||||
, pixel_data(grab_pixel_data(c.size, c.pixel_data))
|
||||
{
|
||||
if (c.name)
|
||||
{
|
||||
|
@ -223,8 +223,8 @@ RIF_IMPLEMENT_DYNCREATE("PRSETPAL",Preset_Palette_Chunk)
|
|||
|
||||
Preset_Palette_Chunk::Preset_Palette_Chunk(Chunk_With_Children * const parent, char const * sdata, size_t const /*ssize*/)
|
||||
: Chunk(parent,"PRSETPAL")
|
||||
, version_num(*(int *)sdata)
|
||||
, flags(*(int *)(sdata+4))
|
||||
, version_num(*(int *)sdata)
|
||||
, reserved1(*(int *)(sdata+8))
|
||||
, reserved2(*(int *)(sdata+12))
|
||||
, reserved3(*(int *)(sdata+16))
|
||||
|
@ -291,7 +291,7 @@ RIF_IMPLEMENT_DYNCREATE("ENVTXLIT",Environment_TLT_Chunk)
|
|||
|
||||
Environment_TLT_Chunk::Environment_TLT_Chunk (Chunk_With_Children * parent, const char * sdata, size_t ssize)
|
||||
: Chunk (parent, "ENVTXLIT"), width (*((int*)(sdata))),
|
||||
num_levels (*((int*)(sdata+4))), flags(*(int *)(sdata+28)), table (0), filename(0)
|
||||
num_levels (*((int*)(sdata+4))), flags(*(int *)(sdata+28)), filename(0), table (0)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -417,8 +417,8 @@ TLT_Config_Chunk::TLT_Config_Chunk (Chunk_With_Children * parent, const char * s
|
|||
: Chunk (parent, "TLTCONFG")
|
||||
, num_shades_white(*(unsigned int const *)sdata)
|
||||
, table_size(*(unsigned int const *)(sdata+4))
|
||||
, flags(*(unsigned int const *)(sdata+8))
|
||||
, palette_size(*(unsigned int const *)(sdata+12))
|
||||
, flags(*(unsigned int const *)(sdata+8))
|
||||
{
|
||||
if (!table_size) table_size = 256;
|
||||
|
||||
|
@ -833,8 +833,8 @@ RIF_IMPLEMENT_DYNCREATE("SETPALST",Preset_Palette_Store_Chunk)
|
|||
|
||||
Preset_Palette_Store_Chunk::Preset_Palette_Store_Chunk(Chunk_With_Children * const parent, char const * sdata, size_t const /*ssize*/)
|
||||
: Chunk(parent,"SETPALST")
|
||||
, version_num(*(int *)sdata)
|
||||
, flags(*(int *)(sdata+4))
|
||||
, version_num(*(int *)sdata)
|
||||
, reserved1(*(int *)(sdata+8))
|
||||
, reserved2(*(int *)(sdata+12))
|
||||
, reserved3(*(int *)(sdata+16))
|
||||
|
|
|
@ -763,7 +763,7 @@ public:
|
|||
strcpy(filename,fname);
|
||||
}
|
||||
}
|
||||
BMP_Flags(BMP_Name const & bn) : enum_id(bn.enum_id), version_num(bn.version_num), flags((BMPN_Flags)(bn.flags & COPY_BMPN_FLAGS)), filename(0)
|
||||
BMP_Flags(BMP_Name const & bn) : filename(0), flags((BMPN_Flags)(bn.flags & COPY_BMPN_FLAGS)), version_num(bn.version_num), enum_id(bn.enum_id)
|
||||
{
|
||||
if (bn.filename)
|
||||
{
|
||||
|
@ -771,7 +771,7 @@ public:
|
|||
strcpy(filename,bn.filename);
|
||||
}
|
||||
}
|
||||
BMP_Flags(BMP_Flags const & c) : filename(0), enum_id(c.enum_id), version_num(c.version_num), flags(c.flags)
|
||||
BMP_Flags(BMP_Flags const & c) : filename(0), flags(c.flags), version_num(c.version_num), enum_id(c.enum_id)
|
||||
{
|
||||
if (c.filename)
|
||||
{
|
||||
|
|
|
@ -137,8 +137,10 @@ static int InitialisedLog = 0;
|
|||
static int db_display_type = DB_DOS;
|
||||
|
||||
/* For DirectDraw mode. */
|
||||
#ifndef DB_NODIRECTDRAW
|
||||
static struct db_dd_mode_tag dd_mode = {NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static fontPtr FontP = NULL;
|
||||
#endif
|
||||
|
||||
/* Volatile zero. */
|
||||
static volatile int db_vol_zero = 0;
|
||||
|
@ -150,10 +152,12 @@ static const char* db_assert_textA[ 3 ] =
|
|||
"Expression: %s",
|
||||
"File: %s Line: %d"
|
||||
};
|
||||
#if 0
|
||||
static const char* db_prompt_std =
|
||||
"Quit program/force e(x)ception? [y/n/x]";
|
||||
static const char* db_prompt_windows =
|
||||
"Quit program? [Yes/No]/force exception? [Cancel]";
|
||||
#endif
|
||||
static const char* db_assert_log_begin_text =
|
||||
"DB: FAILED ASSERTION BEGINS";
|
||||
static const char* db_assert_log_end_text =
|
||||
|
|
|
@ -18,7 +18,7 @@ Enum_Constant::Enum_Constant(char const * const _cname, int const _value) : cnam
|
|||
}
|
||||
}
|
||||
|
||||
Enum_Constant::Enum_Constant(Enum_Constant const & ec2) : reserved(ec2.reserved), value(ec2.value), cname(0)
|
||||
Enum_Constant::Enum_Constant(Enum_Constant const & ec2) : cname(0), value(ec2.value), reserved(ec2.reserved)
|
||||
{
|
||||
if (ec2.cname)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ BOOL Enum_Constant::operator < (Enum_Constant const & ec2) const
|
|||
|
||||
|
||||
Enum_Constant::Enum_Constant(char const * sdata)
|
||||
: value(*(int *)sdata), reserved(*(int *)(sdata+4)), cname(0)
|
||||
: cname(0), value(*(int *)sdata), reserved(*(int *)(sdata+4))
|
||||
{
|
||||
sdata+=8;
|
||||
if (*sdata)
|
||||
|
@ -95,10 +95,7 @@ void Enum_Constant::fill_data_block (char * data_start)
|
|||
RIF_IMPLEMENT_DYNCREATE("BMPENUMS",BMP_Enums_Chunk)
|
||||
|
||||
BMP_Enums_Chunk::BMP_Enums_Chunk(Chunk_With_Children * const parent, char const * sdata, size_t const /*ssize*/)
|
||||
: Chunk(parent,"BMPENUMS")
|
||||
, reserved1(*(int *)sdata)
|
||||
, reserved2(*(int *)(sdata+4))
|
||||
, ctype(0)
|
||||
: Chunk(parent,"BMPENUMS"), ctype(0), reserved1(*(int *)sdata), reserved2(*(int *)(sdata+4))
|
||||
{
|
||||
sdata+=8;
|
||||
unsigned int const len = strlen(sdata)+1;
|
||||
|
|
|
@ -290,7 +290,7 @@ class _base_HashTable
|
|||
_base_HashTable(unsigned = HT_DEFAULTTABLESIZESHIFT);
|
||||
|
||||
// destructor
|
||||
~_base_HashTable();
|
||||
virtual ~_base_HashTable();
|
||||
|
||||
// copy constructor and assignment not provided in v1.0
|
||||
_base_HashTable(_base_HashTable<TYPE,ARG_TYPE,CMP_ARG_TYPE> const &);
|
||||
|
|
|
@ -52,7 +52,7 @@ Object_Hierarchy_Name_Chunk * Object_Hierarchy_Chunk::get_name ()
|
|||
RIF_IMPLEMENT_DYNCREATE("OBJHIERD",Object_Hierarchy_Data_Chunk)
|
||||
|
||||
Object_Hierarchy_Data_Chunk::Object_Hierarchy_Data_Chunk (Object_Hierarchy_Chunk * parent, const char * obname)
|
||||
: Chunk (parent, "OBJHIERD"), ob_name (0), object(0)
|
||||
: Chunk (parent, "OBJHIERD"), object(0), ob_name (0)
|
||||
{
|
||||
num_extra_data=0;
|
||||
extra_data=0;
|
||||
|
|
|
@ -162,7 +162,7 @@ static void MakeHuffTreeFromHuffItems(HuffNode *base, HuffItem *source, int coun
|
|||
{
|
||||
temp[n].bits = source[n].Count;
|
||||
}
|
||||
while (upperlim = --count)
|
||||
while ((upperlim = --count))
|
||||
{
|
||||
if (temp[0].zero)
|
||||
temp[0].zero->parent = temp[0].one->parent = movdest;
|
||||
|
|
|
@ -1151,7 +1151,7 @@ static int DHM_MoveBufferToQueue(int* pPosX,int* pPosY,int fZeroLeftMargin)
|
|||
/* It is a standard character or a space */
|
||||
DHM_AddToQueue(*pPosX,(*pPosY)+textprint_Y_offset, *pCh);
|
||||
|
||||
(*pPosX)+=AAFontWidths[*pCh];//CharWidthInPixels(*pCh);
|
||||
(*pPosX)+=AAFontWidths[(int)*pCh];//CharWidthInPixels(*pCh);
|
||||
|
||||
if ((*pPosX)>LastDisplayableXForChars())
|
||||
{
|
||||
|
|
|
@ -241,7 +241,7 @@ RIF_IMPLEMENT_DYNCREATE("SHPVTINT",Shape_Vertex_Intensities_Chunk)
|
|||
|
||||
Shape_Vertex_Intensities_Chunk::Shape_Vertex_Intensities_Chunk
|
||||
(Chunk_With_Children *parent, char *lsn, int num_v, int * i_array)
|
||||
: Chunk (parent, "SHPVTINT"), num_vertices(num_v), pad (0)
|
||||
: Chunk (parent, "SHPVTINT"), pad (0), num_vertices(num_v)
|
||||
{
|
||||
strncpy (light_set_name, lsn, 8);
|
||||
|
||||
|
|
|
@ -630,8 +630,7 @@ RIF_IMPLEMENT_DYNCREATE("OBJNOTES",Object_Notes_Chunk)
|
|||
|
||||
Object_Notes_Chunk::Object_Notes_Chunk (Chunk_With_Children * parent,
|
||||
const char * _data, size_t _data_size)
|
||||
: Chunk(parent, "OBJNOTES"),
|
||||
data(NULL), data_size(_data_size)
|
||||
: Chunk(parent, "OBJNOTES"), data_size(_data_size), data(NULL)
|
||||
{
|
||||
data_store = new char [data_size];
|
||||
|
||||
|
|
|
@ -609,8 +609,8 @@ typedef enum {
|
|||
|
||||
long GetWindowsTickCount(void);
|
||||
void CheckForWindowsMessages(void);
|
||||
//BOOL ExitWindowsSystem(void);
|
||||
//BOOL InitialiseWindowsSystem(HANDLE hInstance, int nCmdShow, int WinInitMode);
|
||||
BOOL ExitWindowsSystem(void);
|
||||
BOOL InitialiseWindowsSystem(HANDLE hInstance, int nCmdShow, int WinInitMode);
|
||||
//void KeyboardHandlerKeyDown(WPARAM wParam);
|
||||
//void KeyboardHandlerKeyUp(WPARAM wParam);
|
||||
//void MouseVelocityHandler(UINT message, LPARAM lParam);
|
||||
|
|
|
@ -2265,7 +2265,7 @@ Shape_Morphing_Data_Chunk::Shape_Morphing_Data_Chunk (Shape_Chunk * parent, cons
|
|||
|
||||
}
|
||||
Shape_Morphing_Data_Chunk::Shape_Morphing_Data_Chunk (Shape_Sub_Shape_Chunk * parent, const char *data, size_t size)
|
||||
: Chunk_With_Children (parent, "SHPMORPH"), parent_sub_shape (parent), parent_shape (0)
|
||||
: Chunk_With_Children (parent, "SHPMORPH"), parent_shape (0), parent_sub_shape (parent)
|
||||
{
|
||||
const char * buffer_ptr = data;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
|
||||
#include "awtexld.h"
|
||||
//#include "alt_tab.h"
|
||||
#include "alt_tab.h"
|
||||
|
||||
/*
|
||||
#define for experimental purposes
|
||||
|
@ -62,7 +62,6 @@ int tripc = 0;
|
|||
*/
|
||||
|
||||
extern SHAPEHEADER **mainshapelist;
|
||||
extern (*ShapeLanguageFunctions[])(SHAPEINSTR *shapeinstrptr);
|
||||
extern SCREENDESCRIPTORBLOCK ScreenDescriptorBlock;
|
||||
extern unsigned char *ScreenBuffer;
|
||||
extern char projectsubdirectory[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue