GrangerHub / Stellar-Prey

GrangerHub's STELLAR PREY™ game is a first person strategy shooter that chronicles the conflict between human technology vs extraterrestrial nature, a conflict waged by construction, team coordination, and epic combat. Help shape the course of your species together towards the top of the stellar food chain, or be the prey together on the road towards extinction. Which path will you and your species choose to take? It's a universal tale of survival vs death, and of order vs chaos, as old as life itself.
8 stars 3 forks source link

Fix all of the compile warnings in the game logic. #13

Open dGr8LookinSparky opened 3 years ago

dGr8LookinSparky commented 3 years ago

Fix all of the compile warnings in the game logic.

redrumrobot commented 3 years ago

Built output on VS Community 2019

Build started...
1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------
1>Checking Build System
2>------ Build started: Project: cgame, Configuration: Release x64 ------
3>------ Build started: Project: gui, Configuration: Release x64 ------
4>------ Build started: Project: sgame, Configuration: Release x64 ------
2>Building Custom Rule C:/Users/cron/code/Stellar-Prey/source/game-logic/CMakeLists.txt
3>Building Custom Rule C:/Users/cron/code/Stellar-Prey/source/game-logic/CMakeLists.txt
4>Building Custom Rule C:/Users/cron/code/Stellar-Prey/source/game-logic/CMakeLists.txt
3>cmake_pch.cxx
2>cmake_pch.cxx
4>cmake_pch.cxx
3>q_shared.cpp
2>q_shared.cpp
4>q_shared.cpp
4>q_math.cpp
2>q_math.cpp
3>q_math.cpp
3>gui_precompiled.cpp
3>bgame_misc.cpp
2>cgame_precompiled.cpp
4>sgame_precompiled.cpp
3>C:\Users\cron\code\Stellar-Prey\source\game-logic\src\gameLogics\bgame\bgame_misc.cpp(389,9): warning C4838: conversion from 'float' to 'sint' requires a narrowing conversion
3>bgame_alloc.cpp
2>bgame_alloc.cpp
2>bgame_misc.cpp
2>C:\Users\cron\code\Stellar-Prey\source\game-logic\src\gameLogics\bgame\bgame_misc.cpp(389,9): warning C4838: conversion from 'float' to 'sint' requires a narrowing conversion
4>bgame_alloc.cpp
4>bgame_misc.cpp
2>bgame_pmove.cpp
4>C:\Users\cron\code\Stellar-Prey\source\game-logic\src\gameLogics\bgame\bgame_misc.cpp(389,9): warning C4838: conversion from 'float' to 'sint' requires a narrowing conversion
2>bgame_voice.cpp
3>bgame_pmove.cpp
4>bgame_pmove.cpp
2>bgame_slidemove.cpp
3>bgame_slidemove.cpp
3>bgame_voice.cpp
2>cgame_animation.cpp
2>cgame_animmapobj.cpp
3>gui_api.cpp
3>gui_atoms.cpp
4>bgame_slidemove.cpp
2>cgame_api.cpp
2>cgame_attachment.cpp
2>C:\Users\cron\code\Stellar-Prey\source\game-logic\src\gameLogics\cgame\cgame_animmapobj.cpp(111,29): warning C4805: '!=': unsafe mix of type 'sint' and type 'bool' in operation
4>bgame_voice.cpp
3>gui_gameinfo.cpp
4>sgame_active.cpp
3>gui_main.cpp
2>cgame_buildable.cpp
3>C:\Users\cron\code\Stellar-Prey\source\game-logic\src\gameLogics\GUI\gui_main.cpp(838,18): warning C4806: '==': unsafe operation: no value of type 'bool' promoted to type 'int' can equal the given constant
3>C:\Users\cron\code\Stellar-Prey\source\game-logic\src\gameLogics\GUI\gui_main.cpp(1039,38): warning C4305: 'argument': truncation from 'int' to 'bool'
2>cgame_consolecmds.cpp
2>cgame_draw.cpp
4>sgame_admin.cpp
2>cgame_drawtools.cpp
3>gui_shared.cpp
2>cgame_ents.cpp
4>sgame_api.cpp
4>sgame_buildable.cpp
2>cgame_event.cpp
4>sgame_client.cpp
2>cgame_main.cpp
2>cgame_marks.cpp
2>cgame_mem.cpp
4>sgame_cmds.cpp
4>sgame_combat.cpp
4>sgame_main.cpp
2>cgame_particles.cpp
4>sgame_maprotation.cpp
2>cgame_players.cpp
2>cgame_playerstate.cpp
4>sgame_misc.cpp
2>cgame_predict.cpp
2>cgame_ptr.cpp
4>sgame_missile.cpp
2>cgame_scanner.cpp
2>cgame_servercmds.cpp
4>sgame_mover.cpp
2>cgame_snapshot.cpp
2>cgame_trails.cpp
4>sgame_physics.cpp
2>cgame_tutorial.cpp
2>cgame_view.cpp
2>cgame_weapons.cpp
2>gui_shared.cpp
2>C:\Users\cron\code\Stellar-Prey\source\game-logic\src\gameLogics\cgame\cgame_weapons.cpp(1196,66): warning C4805: '!=': unsafe mix of type 'bool' and type 'int' in operation
4>sgame_ptr.cpp
2>C:\Users\cron\code\Stellar-Prey\source\game-logic\src\gameLogics\cgame\cgame_weapons.cpp(1202,66): warning C4805: '!=': unsafe mix of type 'bool' and type 'int' in operation
2>C:\Users\cron\code\Stellar-Prey\source\game-logic\src\gameLogics\cgame\cgame_weapons.cpp(1208,66): warning C4805: '!=': unsafe mix of type 'bool' and type 'int' in operation
4>sgame_session.cpp
4>sgame_spawn.cpp
4>sgame_svcmds.cpp
3>   Creating library C:/Users/cron/code/Stellar-Prey/source/game-logic/Release/guiAMD64.lib and object C:/Users/cron/code/Stellar-Prey/source/game-logic/Release/guiAMD64.exp
4>sgame_target.cpp
4>sgame_team.cpp
4>sgame_trigger.cpp
4>sgame_utils.cpp
4>sgame_weapon.cpp
4>C:\Users\cron\code\Stellar-Prey\source\game-logic\src\gameLogics\sgame\sgame_weapon.cpp(967,52): warning C4806: '==': unsafe operation: no value of type 'bool' promoted to type 'entityType_t' can equal the given constant
3>gui.vcxproj -> C:\Users\cron\code\Stellar-Prey\source\game-logic\Release\guiAMD64.dll
2>   Creating library C:/Users/cron/code/Stellar-Prey/source/game-logic/Release/cgameAMD64.lib and object C:/Users/cron/code/Stellar-Prey/source/game-logic/Release/cgameAMD64.exp
2>cgame.vcxproj -> C:\Users\cron\code\Stellar-Prey\source\game-logic\Release\cgameAMD64.dll
3>Done building project "gui.vcxproj".
2>Done building project "cgame.vcxproj".
4>   Creating library C:/Users/cron/code/Stellar-Prey/source/game-logic/Release/sgameAMD64.lib and object C:/Users/cron/code/Stellar-Prey/source/game-logic/Release/sgameAMD64.exp
4>sgame.vcxproj -> C:\Users\cron\code\Stellar-Prey\source\game-logic\Release\sgameAMD64.dll
4>Done building project "sgame.vcxproj".
5>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------
5>Building Custom Rule C:/Users/cron/code/Stellar-Prey/source/game-logic/CMakeLists.txt
========== Build: 5 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
TheDushan commented 3 years ago

In order to see all warning for Visual Studio, you need to add /W4 flag.