Skip to content

Commit

Permalink
This should fix a few warnings I saw attempting Mac builds today
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjoffe committed Aug 29, 2019
1 parent 00ea2fb commit 7cec108
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
7 changes: 1 addition & 6 deletions src/djlog.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
djlog.cpp
Copyright (C) 1998-2018 David Joffe
Copyright (C) 1998-2019 David Joffe
*/

#ifdef WIN32
Expand Down Expand Up @@ -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
}

3 changes: 1 addition & 2 deletions src/djlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_
Expand All @@ -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
13 changes: 5 additions & 8 deletions src/ed_macros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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 () );
Expand Down

0 comments on commit 7cec108

Please sign in to comment.