BCC is more strict about not statements before parameter declarations
This commit is contained in:
@@ -671,10 +671,10 @@ void plselAdjustLists(HWND hWnd, int changed_sel)
|
|||||||
/* player made up his mind - get final selection here */
|
/* player made up his mind - get final selection here */
|
||||||
int plselFinalSelection(HWND hWnd, int* selection)
|
int plselFinalSelection(HWND hWnd, int* selection)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(selection);
|
|
||||||
|
|
||||||
LRESULT ind;
|
LRESULT ind;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(selection);
|
||||||
|
|
||||||
/* get current selections */
|
/* get current selections */
|
||||||
if( SendDlgItemMessage(hWnd, IDC_PLSEL_ROLE_RANDOM, BM_GETCHECK, 0, 0)==BST_CHECKED ) {
|
if( SendDlgItemMessage(hWnd, IDC_PLSEL_ROLE_RANDOM, BM_GETCHECK, 0, 0)==BST_CHECKED ) {
|
||||||
flags.initrole = ROLE_RANDOM;
|
flags.initrole = ROLE_RANDOM;
|
||||||
|
|||||||
@@ -757,11 +757,11 @@ void mswin_layout_main_window(HWND changed_child)
|
|||||||
|
|
||||||
LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(lParam);
|
|
||||||
|
|
||||||
int wmId, wmEvent;
|
int wmId, wmEvent;
|
||||||
PNHMainWindow data;
|
PNHMainWindow data;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(lParam);
|
||||||
|
|
||||||
data = (PNHMainWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
data = (PNHMainWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||||
wmId = LOWORD(wParam);
|
wmId = LOWORD(wParam);
|
||||||
wmEvent = HIWORD(wParam);
|
wmEvent = HIWORD(wParam);
|
||||||
@@ -986,13 +986,13 @@ LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||||||
// Mesage handler for about box.
|
// Mesage handler for about box.
|
||||||
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(lParam);
|
|
||||||
|
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
TCHAR wbuf[BUFSZ];
|
TCHAR wbuf[BUFSZ];
|
||||||
RECT main_rt, dlg_rt;
|
RECT main_rt, dlg_rt;
|
||||||
SIZE dlg_sz;
|
SIZE dlg_sz;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(lParam);
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
|
|||||||
@@ -559,12 +559,12 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||||||
/* on WM_CREATE */
|
/* on WM_CREATE */
|
||||||
void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(wParam);
|
|
||||||
UNREFERENCED_PARAMETER(lParam);
|
|
||||||
|
|
||||||
PNHMapWindow data;
|
PNHMapWindow data;
|
||||||
int i,j;
|
int i,j;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(wParam);
|
||||||
|
UNREFERENCED_PARAMETER(lParam);
|
||||||
|
|
||||||
/* set window data */
|
/* set window data */
|
||||||
data = (PNHMapWindow)malloc(sizeof(NHMapWindow));
|
data = (PNHMapWindow)malloc(sizeof(NHMapWindow));
|
||||||
if( !data ) panic("out of memory");
|
if( !data ) panic("out of memory");
|
||||||
@@ -745,13 +745,13 @@ void onPaint(HWND hWnd)
|
|||||||
/* on WM_VSCROLL */
|
/* on WM_VSCROLL */
|
||||||
void onMSNH_VScroll(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
void onMSNH_VScroll(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(lParam);
|
|
||||||
|
|
||||||
PNHMapWindow data;
|
PNHMapWindow data;
|
||||||
SCROLLINFO si;
|
SCROLLINFO si;
|
||||||
int yNewPos;
|
int yNewPos;
|
||||||
int yDelta;
|
int yDelta;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(lParam);
|
||||||
|
|
||||||
/* get window data */
|
/* get window data */
|
||||||
data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||||
|
|
||||||
@@ -805,13 +805,13 @@ void onMSNH_VScroll(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||||||
/* on WM_HSCROLL */
|
/* on WM_HSCROLL */
|
||||||
void onMSNH_HScroll(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
void onMSNH_HScroll(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(lParam);
|
|
||||||
|
|
||||||
PNHMapWindow data;
|
PNHMapWindow data;
|
||||||
SCROLLINFO si;
|
SCROLLINFO si;
|
||||||
int xNewPos;
|
int xNewPos;
|
||||||
int xDelta;
|
int xDelta;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(lParam);
|
||||||
|
|
||||||
/* get window data */
|
/* get window data */
|
||||||
data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||||
|
|
||||||
|
|||||||
@@ -857,8 +857,6 @@ HWND GetMenuControl(HWND hWnd)
|
|||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
BOOL onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
BOOL onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(wParam);
|
|
||||||
|
|
||||||
LPMEASUREITEMSTRUCT lpmis;
|
LPMEASUREITEMSTRUCT lpmis;
|
||||||
TEXTMETRIC tm;
|
TEXTMETRIC tm;
|
||||||
HGDIOBJ saveFont;
|
HGDIOBJ saveFont;
|
||||||
@@ -867,6 +865,8 @@ BOOL onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||||||
RECT list_rect;
|
RECT list_rect;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(wParam);
|
||||||
|
|
||||||
lpmis = (LPMEASUREITEMSTRUCT) lParam;
|
lpmis = (LPMEASUREITEMSTRUCT) lParam;
|
||||||
data = (PNHMenuWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
data = (PNHMenuWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||||
GetClientRect(GetMenuControl(hWnd), &list_rect);
|
GetClientRect(GetMenuControl(hWnd), &list_rect);
|
||||||
@@ -894,8 +894,6 @@ BOOL onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(wParam);
|
|
||||||
|
|
||||||
LPDRAWITEMSTRUCT lpdis;
|
LPDRAWITEMSTRUCT lpdis;
|
||||||
PNHMenuItem item;
|
PNHMenuItem item;
|
||||||
PNHMenuWindow data;
|
PNHMenuWindow data;
|
||||||
@@ -915,6 +913,8 @@ BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||||||
int color = NO_COLOR, attr;
|
int color = NO_COLOR, attr;
|
||||||
boolean menucolr = FALSE;
|
boolean menucolr = FALSE;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(wParam);
|
||||||
|
|
||||||
lpdis = (LPDRAWITEMSTRUCT) lParam;
|
lpdis = (LPDRAWITEMSTRUCT) lParam;
|
||||||
|
|
||||||
/* If there are no list box items, skip this message. */
|
/* If there are no list box items, skip this message. */
|
||||||
|
|||||||
@@ -378,12 +378,12 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||||||
|
|
||||||
void onMSNH_VScroll(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
void onMSNH_VScroll(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(lParam);
|
|
||||||
|
|
||||||
PNHMessageWindow data;
|
PNHMessageWindow data;
|
||||||
SCROLLINFO si;
|
SCROLLINFO si;
|
||||||
int yInc;
|
int yInc;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(lParam);
|
||||||
|
|
||||||
/* get window data */
|
/* get window data */
|
||||||
data = (PNHMessageWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
data = (PNHMessageWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||||
|
|
||||||
@@ -653,12 +653,12 @@ void onPaint(HWND hWnd)
|
|||||||
|
|
||||||
void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(wParam);
|
|
||||||
UNREFERENCED_PARAMETER(lParam);
|
|
||||||
|
|
||||||
PNHMessageWindow data;
|
PNHMessageWindow data;
|
||||||
SIZE dummy;
|
SIZE dummy;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(wParam);
|
||||||
|
UNREFERENCED_PARAMETER(lParam);
|
||||||
|
|
||||||
/* set window data */
|
/* set window data */
|
||||||
data = (PNHMessageWindow)malloc(sizeof(NHMessageWindow));
|
data = (PNHMessageWindow)malloc(sizeof(NHMessageWindow));
|
||||||
if( !data ) panic("out of memory");
|
if( !data ) panic("out of memory");
|
||||||
|
|||||||
@@ -179,9 +179,10 @@ void mswin_display_splash_window (BOOL show_ver)
|
|||||||
|
|
||||||
INT_PTR CALLBACK NHSplashWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
INT_PTR CALLBACK NHSplashWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
HDC hdc;
|
||||||
|
|
||||||
UNREFERENCED_PARAMETER(lParam);
|
UNREFERENCED_PARAMETER(lParam);
|
||||||
|
|
||||||
HDC hdc;
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
|
|||||||
@@ -692,6 +692,7 @@ void mswin_get_nh_event(void)
|
|||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
logDebug("mswin_get_nh_event()\n");
|
logDebug("mswin_get_nh_event()\n");
|
||||||
|
|
||||||
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)!=0 ) {
|
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)!=0 ) {
|
||||||
if (!TranslateAccelerator(msg.hwnd, GetNHApp()->hAccelTable, &msg)) {
|
if (!TranslateAccelerator(msg.hwnd, GetNHApp()->hAccelTable, &msg)) {
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
@@ -707,6 +708,7 @@ void mswin_get_nh_event(void)
|
|||||||
void mswin_exit_nhwindows(const char *str)
|
void mswin_exit_nhwindows(const char *str)
|
||||||
{
|
{
|
||||||
logDebug("mswin_exit_nhwindows(%s)\n", str);
|
logDebug("mswin_exit_nhwindows(%s)\n", str);
|
||||||
|
|
||||||
/* Write Window settings to the registry */
|
/* Write Window settings to the registry */
|
||||||
mswin_write_reg();
|
mswin_write_reg();
|
||||||
while (max_brush)
|
while (max_brush)
|
||||||
@@ -717,6 +719,7 @@ void mswin_exit_nhwindows(const char *str)
|
|||||||
void mswin_suspend_nhwindows(const char *str)
|
void mswin_suspend_nhwindows(const char *str)
|
||||||
{
|
{
|
||||||
logDebug("mswin_suspend_nhwindows(%s)\n", str);
|
logDebug("mswin_suspend_nhwindows(%s)\n", str);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -725,6 +728,7 @@ void mswin_suspend_nhwindows(const char *str)
|
|||||||
void mswin_resume_nhwindows()
|
void mswin_resume_nhwindows()
|
||||||
{
|
{
|
||||||
logDebug("mswin_resume_nhwindows()\n");
|
logDebug("mswin_resume_nhwindows()\n");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1977,10 +1981,10 @@ char *mswin_getmsghistory(BOOLEAN_P init)
|
|||||||
|
|
||||||
void mswin_putmsghistory(const char * msg, BOOLEAN_P restoring)
|
void mswin_putmsghistory(const char * msg, BOOLEAN_P restoring)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(restoring);
|
|
||||||
|
|
||||||
BOOL save_sound_opt;
|
BOOL save_sound_opt;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(restoring);
|
||||||
|
|
||||||
if (!msg) return; /* end of message history restore */
|
if (!msg) return; /* end of message history restore */
|
||||||
save_sound_opt = GetNHApp()->bNoSounds;
|
save_sound_opt = GetNHApp()->bNoSounds;
|
||||||
GetNHApp()->bNoSounds = TRUE; /* disable sounds while restoring message history */
|
GetNHApp()->bNoSounds = TRUE; /* disable sounds while restoring message history */
|
||||||
@@ -2625,8 +2629,8 @@ status_init() -- core calls this to notify the window port that a status
|
|||||||
void
|
void
|
||||||
mswin_status_init(void)
|
mswin_status_init(void)
|
||||||
{
|
{
|
||||||
logDebug("mswin_status_init()\n");
|
|
||||||
int i;
|
int i;
|
||||||
|
logDebug("mswin_status_init()\n");
|
||||||
for (i = 0; i < MAXBLSTATS; ++i) {
|
for (i = 0; i < MAXBLSTATS; ++i) {
|
||||||
_status_vals[i] = (char *)alloc(BUFSZ);
|
_status_vals[i] = (char *)alloc(BUFSZ);
|
||||||
*_status_vals[i] = '\0';
|
*_status_vals[i] = '\0';
|
||||||
@@ -2652,10 +2656,11 @@ status_finish() -- called when it is time for the window port to tear down
|
|||||||
void
|
void
|
||||||
mswin_status_finish(void)
|
mswin_status_finish(void)
|
||||||
{
|
{
|
||||||
logDebug("mswin_status_finish()\n");
|
|
||||||
/* tear down routine */
|
/* tear down routine */
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
logDebug("mswin_status_finish()\n");
|
||||||
|
|
||||||
/* free alloc'd memory here */
|
/* free alloc'd memory here */
|
||||||
for (i = 0; i < MAXBLSTATS; ++i) {
|
for (i = 0; i < MAXBLSTATS; ++i) {
|
||||||
if (_status_vals[i]) free((genericptr_t)_status_vals[i]);
|
if (_status_vals[i]) free((genericptr_t)_status_vals[i]);
|
||||||
@@ -2772,7 +2777,6 @@ status_update(int fldindex, genericptr_t ptr, int chg, int percentage)
|
|||||||
void
|
void
|
||||||
mswin_status_update(int idx, genericptr_t ptr, int chg, int percent)
|
mswin_status_update(int idx, genericptr_t ptr, int chg, int percent)
|
||||||
{
|
{
|
||||||
logDebug("mswin_status_update(%d, %p, %d, %d)\n", idx, ptr, chg, percent);
|
|
||||||
long cond, *condptr = (long *)ptr;
|
long cond, *condptr = (long *)ptr;
|
||||||
char *text = (char *)ptr;
|
char *text = (char *)ptr;
|
||||||
MSNHMsgUpdateStatus update_cmd_data;
|
MSNHMsgUpdateStatus update_cmd_data;
|
||||||
@@ -2780,6 +2784,8 @@ mswin_status_update(int idx, genericptr_t ptr, int chg, int percent)
|
|||||||
unsigned ospecial;
|
unsigned ospecial;
|
||||||
long value = -1;
|
long value = -1;
|
||||||
|
|
||||||
|
logDebug("mswin_status_update(%d, %p, %d, %d)\n", idx, ptr, chg, percent);
|
||||||
|
|
||||||
if (idx != BL_FLUSH) {
|
if (idx != BL_FLUSH) {
|
||||||
if (!_status_activefields[idx]) return;
|
if (!_status_activefields[idx]) return;
|
||||||
switch(idx) {
|
switch(idx) {
|
||||||
|
|||||||
@@ -73,10 +73,6 @@ int APIENTRY WinMain(HINSTANCE hInstance,
|
|||||||
LPSTR lpCmdLine,
|
LPSTR lpCmdLine,
|
||||||
int nCmdShow)
|
int nCmdShow)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
|
||||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
|
||||||
UNREFERENCED_PARAMETER(nCmdShow);
|
|
||||||
|
|
||||||
INITCOMMONCONTROLSEX InitCtrls;
|
INITCOMMONCONTROLSEX InitCtrls;
|
||||||
int argc;
|
int argc;
|
||||||
char* argv[MAX_CMDLINE_PARAM];
|
char* argv[MAX_CMDLINE_PARAM];
|
||||||
@@ -87,6 +83,9 @@ int APIENTRY WinMain(HINSTANCE hInstance,
|
|||||||
DWORD major, minor;
|
DWORD major, minor;
|
||||||
boolean resuming;
|
boolean resuming;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||||
|
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||||
|
UNREFERENCED_PARAMETER(nCmdShow);
|
||||||
|
|
||||||
/* ensure that we don't access violate on a panic() */
|
/* ensure that we don't access violate on a panic() */
|
||||||
windowprocs.win_raw_print = mswin_raw_print;
|
windowprocs.win_raw_print = mswin_raw_print;
|
||||||
|
|||||||
Reference in New Issue
Block a user