From 7cec108e51d35f453e6e6cdd0e233eaeb2e38d90 Mon Sep 17 00:00:00 2001 From: davidjoffe Date: Thu, 29 Aug 2019 23:55:06 +0200 Subject: [PATCH] This should fix a few warnings I saw attempting Mac builds today --- src/djlog.cpp | 7 +------ src/djlog.h | 3 +-- src/ed_macros.cpp | 13 +++++-------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/djlog.cpp b/src/djlog.cpp index fe0df14..27d13cf 100644 --- a/src/djlog.cpp +++ b/src/djlog.cpp @@ -1,7 +1,7 @@ /* djlog.cpp -Copyright (C) 1998-2018 David Joffe +Copyright (C) 1998-2019 David Joffe */ #ifdef WIN32 @@ -35,8 +35,3 @@ void log_message( const char * szFormat, ... ) #endif } -void log_do_nothing( char * szFormat, ... ) -{ - szFormat = szFormat; // shut up the "unused patameter" warning -} - diff --git a/src/djlog.h b/src/djlog.h index 7ef6651..d68be4a 100644 --- a/src/djlog.h +++ b/src/djlog.h @@ -5,7 +5,7 @@ modified by Vytautas Shaltenis, a.k.a. rtfb -Copyright (C) 1998-2018 David Joffe +Copyright (C) 1998-2019 David Joffe */ /*--------------------------------------------------------------------------*/ #ifndef _DJLOG_H_ @@ -26,7 +26,6 @@ Copyright (C) 1998-2018 David Joffe #define djMSG log_message extern void log_message( const char * szFormat, ... ); -extern void log_do_nothing( const char * szFormat, ... ); */ #endif diff --git a/src/ed_macros.cpp b/src/ed_macros.cpp index 8aab6c1..7710541 100644 --- a/src/ed_macros.cpp +++ b/src/ed_macros.cpp @@ -101,13 +101,10 @@ bool DeleteMacros() return true; } -void PlaceMacro(int x, int y, int iMacroIndex) +//dj2019-08 adding underscore prefix to x,y, the only (bad) reason I'm doing that is due to the ugly global x/y for hero position, so as to avoid ambiguity .. can remove later if that ever gets re-done in a better way. +void PlaceMacro(int _x, int _y, int iMacroIndex) { - x = x; // shut up - y = y; // shut up - iMacroIndex = iMacroIndex; // shut up - - if ( (x < 0) || (y < 0) || (x >= LEVEL_WIDTH) || (y >= LEVEL_HEIGHT) ) + if ( (_x < 0) || (_y < 0) || (_x >= LEVEL_WIDTH) || (_y >= LEVEL_HEIGHT) ) return; int iMacro = g_iAssignedMacros[iMacroIndex]; @@ -121,8 +118,8 @@ void PlaceMacro(int x, int y, int iMacroIndex) for ( int i=0; i<(int)pMacro->m_aiBlocks[0].size(); i++ ) { SetLevel( - x+pMacro->m_aiBlocks[0][i], - y+pMacro->m_aiBlocks[1][i], + _x+pMacro->m_aiBlocks[0][i], + _y+pMacro->m_aiBlocks[1][i], pMacro->m_aiBlocks[2][i], pMacro->m_aiBlocks[3][i], LVLED_GetLevelFore () );