Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#3500 closed defect (fixed)

[PATCH] Compilation Warnings OSX 10.9.5 (Mavericks)

Reported by: stanislas69 Owned by: stanislas69
Priority: Should Have Milestone: Alpha 19
Component: Core engine Keywords: patch
Cc: Patch:

Description

When building the game from the terminal (make in gcc folder) I get those warnings.

../../../source/simulation2/components/CCmpPathfinder.cpp:44:11: warning: 
      unused variable 'DEFAULT_MOVE_COST' [-Wunused-const-variable]
const int DEFAULT_MOVE_COST = 256;

../../../source/simulation2/components/CCmpUnitMotion.cpp:60:18: warning: 
      unused variable 'WAYPOINT_ADVANCE_LOOKAHEAD_TURNS'
      [-Wunused-const-variable]
static const int WAYPOINT_ADVANCE_LOOKAHEAD_TURNS = 4;
                 ^
ScriptFunctions.cpp
In file included from ../../../source/gui/scripting/ScriptFunctions.cpp:49:
In file included from ../../../source/ps/Hotkey.h:35:
In file included from ../../../source/lib/external_libraries/libsdl.h:32:
In file included from /Users/Stan/0ad/libraries/osx/sdl2/include/SDL2/SDL.h:32:
In file included from /Users/Stan/0ad/libraries/osx/sdl2/include/SDL2/SDL_main.h:25:
/Users/Stan/0ad/libraries/osx/sdl2/include/SDL2/SDL_stdinc.h:203:5: warning: 
      '_MSC_VER' is not defined, evaluates to 0 [-Wundef]
#if _MSC_VER >= 1600 /* VS 2010 and above */
    ^
MiniMap.cpp
In file included from ../../../source/gui/MiniMap.cpp:34:
In file included from ../../../source/lib/external_libraries/libsdl.h:32:
In file included from /Users/Stan/0ad/libraries/osx/sdl2/include/SDL2/SDL.h:32:
In file included from /Users/Stan/0ad/libraries/osx/sdl2/include/SDL2/SDL_main.h:25:
/Users/Stan/0ad/libraries/osx/sdl2/include/SDL2/SDL_stdinc.h:203:5: warning: 
      '_MSC_VER' is not defined, evaluates to 0 [-Wundef]
#if _MSC_VER >= 1600 /* VS 2010 and above */
    ^
GameView.cpp
In file included from ../../../source/graphics/GameView.cpp:49:
In file included from ../../../source/ps/Hotkey.h:35:
In file included from ../../../source/lib/external_libraries/libsdl.h:32:
In file included from /Users/Stan/0ad/libraries/osx/sdl2/include/SDL2/SDL.h:32:
In file included from /Users/Stan/0ad/libraries/osx/sdl2/include/SDL2/SDL_main.h:25:
/Users/Stan/0ad/libraries/osx/sdl2/include/SDL2/SDL_stdinc.h:203:5: warning: 
      '_MSC_VER' is not defined, evaluates to 0 [-Wundef]
#if _MSC_VER >= 1600 /* VS 2010 and above */
    ^
	
MapReader.cpp
In file included from ../../../source/graphics/MapReader.cpp:32:
In file included from ../../../source/lib/external_libraries/libsdl.h:32:
In file included from /Users/Stan/0ad/libraries/osx/sdl2/include/SDL2/SDL.h:32:
In file included from /Users/Stan/0ad/libraries/osx/sdl2/include/SDL2/SDL_main.h:25:
/Users/Stan/0ad/libraries/osx/sdl2/include/SDL2/SDL_stdinc.h:203:5: warning: 
      '_MSC_VER' is not defined, evaluates to 0 [-Wundef]
#if _MSC_VER >= 1600 /* VS 2010 and above */
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2.a(precompiled.o) has no symbols

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine.a(precompiled.o) has no symbols
	
Linking graphics
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics.a(precompiled.o) has no symbols

Linking atlas
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas.a(precompiled.o) has no symbols

Linking gui
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgui.a(precompiled.o) has no symbols

The first two ones are important, and I included the others in case they have any influence.

Attachments (1)

3500 - Fix Unused Consts.diff (1.6 KB ) - added by stanislas69 5 years ago.
Remove the two unused consts.

Download all attachments as: .zip

Change History (7)

by stanislas69, 5 years ago

Remove the two unused consts.

comment:1 by stanislas69, 5 years ago

Keywords: patch review added
Owner: set to stanislas69
Status: newassigned
Summary: Compilation Warnings OSX 10.9.5 (Mavericks)[PATCH] Compilation Warnings OSX 10.9.5 (Mavericks)

comment:2 by stanislas69, 5 years ago

Milestone: BacklogAlpha 20

comment:3 by historic_bruno, 5 years ago

That was one I wanted to ask itms about but never got around to it. Are the variables really obsolete or placeholders for some missing functionality?

comment:4 by stanislas69, 5 years ago

They are the legacy of the old code so id say obqolete. Itms told me I could remove them :)

comment:5 by ben, 5 years ago

Resolution: fixed
Status: assignedclosed

In 17115:

Removes unused pathfinder consts, patch by stanislas69. Fixes #3500

comment:6 by historic_bruno, 5 years ago

Keywords: review removed
Milestone: Alpha 20Alpha 19

Thanks for the patch!

Note: See TracTickets for help on using tickets.