Jim-Holmstroem / Hax---The-Game

The final lab in a C++-course.
3 stars 0 forks source link

Fix all the warnings in compilation #4

Closed Jim-Holmstroem closed 11 years ago

Jim-Holmstroem commented 11 years ago

Mostly unused parameter:

Jim-Holmstroem commented 11 years ago

make hax make[1]: Entering directory /home/jim/Programming/hax' g++ -g -Wall -Wextra -c -o game.o world/game.cpp In file included from world/level.h:6:0, from world/game.cpp:2: world/operation.h:40:22: warning: unused parameter ‘arg’ [-Wunused-parameter] world/operation.h:40:22: warning: unused parameter ‘curChar’ [-Wunused-parameter] world/operation.h:52:14: warning: unused parameter ‘curChar’ [-Wunused-parameter] world/operation.h:74:14: warning: unused parameter ‘arg’ [-Wunused-parameter] world/operation.h:74:14: warning: unused parameter ‘curLevel’ [-Wunused-parameter] world/operation.h:89:14: warning: unused parameter ‘arg’ [-Wunused-parameter] world/operation.h:89:14: warning: unused parameter ‘curLevel’ [-Wunused-parameter] world/operation.h:104:14: warning: unused parameter ‘arg’ [-Wunused-parameter] world/operation.h:104:14: warning: unused parameter ‘curLevel’ [-Wunused-parameter] world/operation.h:119:14: warning: unused parameter ‘curLevel’ [-Wunused-parameter] world/operation.h:138:14: warning: unused parameter ‘curLevel’ [-Wunused-parameter] In file included from world/game.cpp:17:0: world/../ncurses/cat1.asciiart:23:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] world/game.cpp: In function ‘void msleep(long unsigned int)’: world/game.cpp:20:27: warning: missing initializer for member ‘timespec::tv_nsec’ [-Wmissing-field-initializers] world/game.cpp: At global scope: world/game.cpp:31:5: warning: unused parameter ‘argc’ [-Wunused-parameter] world/game.cpp:31:5: warning: unused parameter ‘argv’ [-Wunused-parameter] world/game.cpp: In function ‘void hax::newGame()’: world/game.cpp:163:100: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] world/game.cpp:165:13: warning: variable ‘timer’ set but not used [-Wunused-but-set-variable] world/game.cpp: In function ‘int hax::welcome_menu()’: world/game.cpp:289:5: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] world/game.cpp:289:5: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] world/game.cpp:289:5: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] world/game.cpp:289:5: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] world/game.cpp:289:5: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] world/../serialize/areaHeap.h: In function ‘hax::Area* hax::getAllocatedArea(std::string)’: world/../serialize/areaHeap.h:18:1: warning: control reaches end of non-void function [-Wreturn-type] world/../serialize/../area/../serialize/routeHeap.h: In function ‘hax::Route* hax::getAllocatedRoute(std::string)’: world/../serialize/../area/../serialize/routeHeap.h:13:1: warning: control reaches end of non-void function [-Wreturn-type] world/../serialize/../area/../serialize/characterHeap.h: In function ‘hax::Character* hax::getAllocatedCharacter(std::string)’: world/../serialize/../area/../serialize/characterHeap.h:18:1: warning: control reaches end of non-void function [-Wreturn-type] world/../serialize/../area/../obj/container.h: In function ‘hax::Object* hax::getAllocatedObject(std::string)’: world/../serialize/../area/../obj/container.h:71:5: warning: control reaches end of non-void function [-Wreturn-type] g++ -g -Wall -Wextra -c -o level.o world/level.cpp In file included from world/level.h:6:0, from world/level.cpp:3: world/operation.h:40:22: warning: unused parameter ‘arg’ [-Wunused-parameter] world/operation.h:40:22: warning: unused parameter ‘curChar’ [-Wunused-parameter] world/operation.h:52:14: warning: unused parameter ‘curChar’ [-Wunused-parameter] world/operation.h:74:14: warning: unused parameter ‘arg’ [-Wunused-parameter] world/operation.h:74:14: warning: unused parameter ‘curLevel’ [-Wunused-parameter] world/operation.h:89:14: warning: unused parameter ‘arg’ [-Wunused-parameter] world/operation.h:89:14: warning: unused parameter ‘curLevel’ [-Wunused-parameter] world/operation.h:104:14: warning: unused parameter ‘arg’ [-Wunused-parameter] world/operation.h:104:14: warning: unused parameter ‘curLevel’ [-Wunused-parameter] world/operation.h:119:14: warning: unused parameter ‘curLevel’ [-Wunused-parameter] world/operation.h:138:14: warning: unused parameter ‘curLevel’ [-Wunused-parameter] world/level.cpp:160:6: warning: unused parameter ‘out’ [-Wunused-parameter] world/level.cpp:162:6: warning: unused parameter ‘in’ [-Wunused-parameter] world/../serialize/areaHeap.h: In function ‘hax::Area* hax::getAllocatedArea(std::string)’: world/../serialize/areaHeap.h:18:1: warning: control reaches end of non-void function [-Wreturn-type] world/../serialize/../area/../serialize/routeHeap.h: In function ‘hax::Route* hax::getAllocatedRoute(std::string)’: world/../serialize/../area/../serialize/routeHeap.h:13:1: warning: control reaches end of non-void function [-Wreturn-type] world/../serialize/../area/../serialize/characterHeap.h: In function ‘hax::Character* hax::getAllocatedCharacter(std::string)’: world/../serialize/../area/../serialize/characterHeap.h:18:1: warning: control reaches end of non-void function [-Wreturn-type] world/../serialize/../area/../obj/container.h: In function ‘hax::Object* hax::getAllocatedObject(std::string)’: world/../serialize/../area/../obj/container.h:71:5: warning: control reaches end of non-void function [-Wreturn-type] g++ -g -Wall -Wextra -c -o area.o area/area.cpp area/area.cpp:143:6: warning: unused parameter ‘in’ [-Wunused-parameter] area/../serialize/routeHeap.h: In function ‘hax::Route* hax::getAllocatedRoute(std::string)’: area/../serialize/routeHeap.h:13:1: warning: control reaches end of non-void function [-Wreturn-type] area/../serialize/characterHeap.h: In function ‘hax::Character* hax::getAllocatedCharacter(std::string)’: area/../serialize/characterHeap.h:18:1: warning: control reaches end of non-void function [-Wreturn-type] area/../obj/container.h: In function ‘hax::Object* hax::getAllocatedObject(std::string)’: area/../obj/container.h:71:5: warning: control reaches end of non-void function [-Wreturn-type] g++ -g -Wall -Wextra -c -o indoor.o area/indoor.cpp area/../serialize/routeHeap.h: In function ‘hax::Route* hax::getAllocatedRoute(std::string)’: area/../serialize/routeHeap.h:13:1: warning: control reaches end of non-void function [-Wreturn-type] area/../serialize/characterHeap.h: In function ‘hax::Character* hax::getAllocatedCharacter(std::string)’: area/../serialize/characterHeap.h:18:1: warning: control reaches end of non-void function [-Wreturn-type] area/../obj/container.h: In function ‘hax::Object* hax::getAllocatedObject(std::string)’: area/../obj/container.h:71:5: warning: control reaches end of non-void function [-Wreturn-type] g++ -g -Wall -Wextra -c -o outdoor.o area/outdoor.cpp area/../serialize/routeHeap.h: In function ‘hax::Route* hax::getAllocatedRoute(std::string)’: area/../serialize/routeHeap.h:13:1: warning: control reaches end of non-void function [-Wreturn-type] area/../serialize/characterHeap.h: In function ‘hax::Character* hax::getAllocatedCharacter(std::string)’: area/../serialize/characterHeap.h:18:1: warning: control reaches end of non-void function [-Wreturn-type] area/../obj/container.h: In function ‘hax::Object* hax::getAllocatedObject(std::string)’: area/../obj/container.h:71:5: warning: control reaches end of non-void function [-Wreturn-type] g++ -g -Wall -Wextra -c -o route.o area/route.cpp area/../area/../serialize/routeHeap.h: In function ‘hax::Route* hax::getAllocatedRoute(std::string)’: area/../area/../serialize/routeHeap.h:13:1: warning: control reaches end of non-void function [-Wreturn-type] area/../area/../serialize/characterHeap.h: In function ‘hax::Character* hax::getAllocatedCharacter(std::string)’: area/../area/../serialize/characterHeap.h:18:1: warning: control reaches end of non-void function [-Wreturn-type] area/../ch/../obj/container.h: In function ‘hax::Object* hax::getAllocatedObject(std::string)’: area/../ch/../obj/container.h:71:5: warning: control reaches end of non-void function [-Wreturn-type] g++ -g -Wall -Wextra -c -o road.o area/road.cpp area/road.cpp:32:6: warning: unused parameter ‘ch’ [-Wunused-parameter] area/../area/../serialize/routeHeap.h: In function ‘hax::Route* hax::getAllocatedRoute(std::string)’: area/../area/../serialize/routeHeap.h:13:1: warning: control reaches end of non-void function [-Wreturn-type] area/../area/../serialize/characterHeap.h: In function ‘hax::Character* hax::getAllocatedCharacter(std::string)’: area/../area/../serialize/characterHeap.h:18:1: warning: control reaches end of non-void function [-Wreturn-type] area/../ch/../obj/container.h: In function ‘hax::Object* hax::getAllocatedObject(std::string)’: area/../ch/../obj/container.h:71:5: warning: control reaches end of non-void function [-Wreturn-type] g++ -g -Wall -Wextra -c -o character.o ch/character.cpp ch/character.cpp:344:6: warning: unused parameter ‘in’ [-Wunused-parameter] ch/../area/../serialize/routeHeap.h: In function ‘hax::Route* hax::getAllocatedRoute(std::string)’: ch/../area/../serialize/routeHeap.h:13:1: warning: control reaches end of non-void function [-Wreturn-type] ch/../area/../serialize/characterHeap.h: In function ‘hax::Character* hax::getAllocatedCharacter(std::string)’: ch/../area/../serialize/characterHeap.h:18:1: warning: control reaches end of non-void function [-Wreturn-type] ch/../obj/container.h: In function ‘hax::Object* hax::getAllocatedObject(std::string)’: ch/../obj/container.h:71:5: warning: control reaches end of non-void function [-Wreturn-type] g++ -g -Wall -Wextra -c -o hero.o ch/hero.cpp ch/../obj/container.h: In function ‘hax::Object* hax::getAllocatedObject(std::string)’: ch/../obj/container.h:71:5: warning: control reaches end of non-void function [-Wreturn-type] g++ -g -Wall -Wextra -c -o human.o ch/human.cpp ch/human.cpp:24:6: warning: unused parameter ‘ch’ [-Wunused-parameter] ch/human.cpp:30:6: warning: unused parameter ‘in’ [-Wunused-parameter] ch/human.cpp:65:6: warning: unused parameter ‘ch’ [-Wunused-parameter] ch/human.cpp:75:6: warning: unused parameter ‘out’ [-Wunused-parameter] ch/human.cpp:77:6: warning: unused parameter ‘in’ [-Wunused-parameter] ch/human.cpp:96:6: warning: unused parameter ‘ch’ [-Wunused-parameter] ch/../obj/container.h: In function ‘hax::Object* hax::getAllocatedObject(std::string)’: ch/../obj/container.h:71:5: warning: control reaches end of non-void function [-Wreturn-type] g++ -g -Wall -Wextra -c -o undead.o ch/undead.cpp ch/undead.cpp:15:6: warning: unused parameter ‘ch’ [-Wunused-parameter] ch/../area/../serialize/routeHeap.h: In function ‘hax::Route* hax::getAllocatedRoute(std::string)’: ch/../area/../serialize/routeHeap.h:13:1: warning: control reaches end of non-void function [-Wreturn-type] ch/../area/../serialize/characterHeap.h: In function ‘hax::Character* hax::getAllocatedCharacter(std::string)’: ch/../area/../serialize/characterHeap.h:18:1: warning: control reaches end of non-void function [-Wreturn-type] ch/../obj/container.h: In function ‘hax::Object* hax::getAllocatedObject(std::string)’: ch/../obj/container.h:71:5: warning: control reaches end of non-void function [-Wreturn-type] g++ -g -Wall -Wextra -c -o object.o obj/object.cpp obj/object.cpp:45:6: warning: unused parameter ‘in’ [-Wunused-parameter] g++ -g -Wall -Wextra -c -o container.o obj/container.cpp obj/container.h: In function ‘hax::Object* hax::getAllocatedObject(std::string)’: obj/container.h:71:5: warning: control reaches end of non-void function [-Wreturn-type] g++ -g -Wall -Wextra -c -o obstacle.o obj/obstacle.cpp obj/obstacle.cpp:8:1: warning: unused parameter ‘vo’ [-Wunused-parameter] g++ -g -Wall -Wextra -c -o coin.o obj/coin.cpp g++ -g -Wall -Wextra -c -o logger.o ncurses/logger.cpp g++ -g -Wall -Wextra -c -o sprite.o ncurses/sprite.cpp g++ -g -Wall -Wextra -c -o multisprite.o ncurses/multisprite.cpp g++ game.o level.o area.o indoor.o outdoor.o route.o road.o character.o hero.o human.o undead.o object.o container.o obstacle.o coin.o logger.o sprite.o multisprite.o -lncurses -lmenu -o hax make[1]: Leaving directory/home/jim/Programming/hax'

Jim-Holmstroem commented 11 years ago

It clutters the output to much fixing it now

Jim-Holmstroem commented 11 years ago

Fixed most of the ones not being actual warnings