Numerous seemingly harmless gcc warning fixes
This commit is contained in:
parent
3fa4624317
commit
7105d7d537
|
@ -131,8 +131,6 @@ int checkCondition(const char* condition, int num)
|
|||
**/
|
||||
unsigned int NewBreak(const char* name, int start, int end, unsigned int type, const char* condition, unsigned int num, bool enable)
|
||||
{
|
||||
unsigned int brk=0;
|
||||
|
||||
// Finally add breakpoint to the list
|
||||
watchpoint[num].address = start;
|
||||
watchpoint[num].endaddress = 0;
|
||||
|
|
|
@ -79,10 +79,7 @@ int InitBlitToHigh(int b, uint32 rmask, uint32 gmask, uint32 bmask, int efx, int
|
|||
{
|
||||
if(specfilt == 2 || specfilt == 4) // scale2x and scale3x
|
||||
{
|
||||
int multi;
|
||||
|
||||
if(specfilt == 2) multi = 2 * 2;
|
||||
else if(specfilt == 4) multi = 3 * 3;
|
||||
int multi = ((specfilt == 2) ? 2 * 2 : 3 * 3);
|
||||
|
||||
specbuf8bpp = (uint8*)malloc(256*240*multi); //mbg merge 7/17/06 added cast
|
||||
|
||||
|
|
|
@ -79,7 +79,8 @@ static uint32 rand1=1, rand2=0x1337EA75, rand3=0x0BADF00D;
|
|||
char * Formula[BOT_FORMULAS]; // These hold BOT_FORMULAS formula's entered in the GUI:
|
||||
int * Bytecode[BOT_FORMULAS]; // Byte code converted formulas
|
||||
static int ByteCodeField; // Working field
|
||||
static int CODE_1_A = 0, // Code fields
|
||||
enum {
|
||||
CODE_1_A = 0, // Code fields
|
||||
CODE_1_B = 1,
|
||||
CODE_1_SELECT = 2,
|
||||
CODE_1_START = 3,
|
||||
|
@ -132,8 +133,9 @@ static int CODE_1_A = 0, // Code fields
|
|||
CODE_TITLE6 = 43,
|
||||
CODE_ROMNAME = 44,
|
||||
CODE_SKIPS = 45,
|
||||
CODE_SLOW = 46;
|
||||
CODE_SLOW = 46
|
||||
// BOT_FORMULAS needs to be CODE_SLOW+1 !
|
||||
};
|
||||
|
||||
// array contains GUI id's for certain pieces of code
|
||||
// these are in sync with the CODE_ ints above
|
||||
|
@ -291,7 +293,7 @@ static uint32 CurrentAttempt[BOT_MAXFRAMES]; // Contains all the frames of the
|
|||
static uint32 BestAttempt[BOT_MAXFRAMES]; // Contains all the frames of the best attempt so far.
|
||||
static uint32 AttemptPointer; // Points to the last frame of the current attempt.
|
||||
|
||||
static bool ProcessCode = true; // This boolean tells the code whether or not to process
|
||||
//static bool ProcessCode = true; // This boolean tells the code whether or not to process
|
||||
// some code. This is mainly used in branching (iif's)
|
||||
// to skip over the part of the code that is not to be
|
||||
// executed. It still needs to be parsed because the
|
||||
|
@ -380,10 +382,6 @@ lastPart * NewPart(int part, int attempt,
|
|||
|
||||
return l;
|
||||
}
|
||||
static void mbox(char * txt)
|
||||
{
|
||||
MessageBox(hwndBasicBot, txt, "Debug", MB_OK);
|
||||
}
|
||||
static void SeedRandom(uint32 seed)
|
||||
{
|
||||
rand1 = seed;
|
||||
|
@ -585,9 +583,9 @@ static int * ToByteCode(char * formula, int codefield)
|
|||
int qmarkstack[100];
|
||||
int colonstack[100];
|
||||
// stack-counters
|
||||
int qpoint=-1,cpoint=-1,lpoint=-1;
|
||||
int qpoint=-1,cpoint=-1;
|
||||
|
||||
int pointerStart = (int)GlobalCurrentChar;
|
||||
char * pointerStart = GlobalCurrentChar;
|
||||
|
||||
while(*GlobalCurrentChar != 0 && !EvaluateError)
|
||||
{
|
||||
|
@ -1160,7 +1158,7 @@ static int * ToByteCode(char * formula, int codefield)
|
|||
GlobalCurrentChar += (*(GlobalCurrentChar+1) == 'c') ? 3 : 11;
|
||||
bytes[pointer++] = BOT_BYTE_SC;
|
||||
}
|
||||
// qfox: Added stop command. Should do exactly the same as pressing the "stop" button.\
|
||||
// qfox: Added stop command. Should do exactly the same as pressing the "stop" button.
|
||||
// But probably won't yet :)
|
||||
else if(*(GlobalCurrentChar+1) == 't'
|
||||
&&*(GlobalCurrentChar+2) == 'o'
|
||||
|
@ -1333,7 +1331,7 @@ static int * ToByteCode(char * formula, int codefield)
|
|||
default:
|
||||
// Unknown characters should error out. You can use spaces.
|
||||
BotSyntaxError(12001);
|
||||
sprintf(errormsg,"[%d][%d] Unknown character... '%c'",codefield,GlobalCurrentChar-pointerStart,(*GlobalCurrentChar));
|
||||
sprintf(errormsg,"[%d][%d] Unknown character... '%c'",codefield,int(GlobalCurrentChar-pointerStart),(*GlobalCurrentChar));
|
||||
debugS(errormsg);
|
||||
delete bytes;
|
||||
return NULL;
|
||||
|
|
|
@ -44,4 +44,4 @@ void DeleteDebuggerBookmark(HWND hwnd);
|
|||
void GoToDebuggerBookmark(HWND hwnd);
|
||||
int getBank(int offs);
|
||||
void dumpBookmarks(HWND hwmd);
|
||||
int isHex(char c);
|
||||
int isHex(char c);
|
||||
|
|
|
@ -5,4 +5,4 @@ extern char * MemWatchDir;
|
|||
extern bool MemWatchLoadOnStart;
|
||||
extern bool MemWatchLoadFileOnStart;
|
||||
extern char *memw_recent_files[];
|
||||
extern HWND memw_pwindow;
|
||||
extern HWND memw_pwindow;
|
||||
|
|
|
@ -103,14 +103,12 @@ public:
|
|||
}
|
||||
|
||||
static int generateSilence(int samples, void *buf, int sampleSize) {
|
||||
char *cbuf = (char *)buf;
|
||||
int n = sampleSize*samples;
|
||||
memset(buf,0,n);
|
||||
return samples;
|
||||
}
|
||||
|
||||
static int generateSilence(int samples, void *buf, OAKRA_Format &format) {
|
||||
char *cbuf = (char *)buf;
|
||||
int n = format.size*samples;
|
||||
memset(buf,0,n);
|
||||
return samples;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
void FCEUD_SaveStateAs();
|
||||
void FCEUD_LoadStateFrom();
|
||||
void FCEUD_LoadStateFrom();
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
void DoTasEdit();
|
||||
void UpdateTasEdit();
|
||||
void UpdateTasEdit();
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
void InitSpeedThrottle(void);
|
||||
int SpeedThrottle(void);
|
||||
void RefreshThrottleFPS();
|
||||
void RefreshThrottleFPS();
|
||||
|
|
|
@ -630,7 +630,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
|
||||
int h=wrect->bottom-wrect->top;
|
||||
int w=wrect->right-wrect->left;
|
||||
int how;
|
||||
int how = 0;
|
||||
|
||||
if(wParam == WMSZ_BOTTOM || wParam == WMSZ_TOP)
|
||||
how = 2;
|
||||
|
|
|
@ -543,7 +543,7 @@ static void CommandStateLoad(void);
|
|||
static void CommandStateSave(void);
|
||||
static void CommandSelectSaveSlot(void);
|
||||
static void CommandEmulationSpeed(void);
|
||||
static void CommandMovieSelectSlot(void);
|
||||
// static void CommandMovieSelectSlot(void);
|
||||
static void CommandMovieRecord(void);
|
||||
static void CommandMovieReplay(void);
|
||||
static void CommandSoundAdjust(void);
|
||||
|
|
|
@ -88,8 +88,8 @@ public:
|
|||
MovieData();
|
||||
|
||||
|
||||
int emuVersion;
|
||||
int version;
|
||||
int emuVersion;
|
||||
//todo - somehow force mutual exclusion for poweron and reset (with an error in the parser)
|
||||
bool palFlag;
|
||||
bool poweronFlag;
|
||||
|
|
|
@ -457,4 +457,4 @@ char *U8ToHexStr(uint8 a)
|
|||
TempArray[1] = a%16 > 9?'A'+(a%16) - 10:'0' + (a%16);
|
||||
TempArray[2] = 0;
|
||||
return TempArray;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,4 +52,4 @@ char *U32ToDecStr(uint32 a);
|
|||
char *U32ToDecStr(char* buf, uint32 a);
|
||||
char *U8ToDecStr(uint8 a);
|
||||
char *U8ToHexStr(uint8 a);
|
||||
char *U16ToHexStr(uint16 a);
|
||||
char *U16ToHexStr(uint16 a);
|
||||
|
|
Loading…
Reference in New Issue