Fork me on GitHub
  May 27, 2018, 05:16:49 am
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Warnings that could use fixing  (Read 2630 times)
MechWarrior001
Newbie
*
Posts: 31


View Profile
« on: May 22, 2011, 07:10:29 am »

Here are some warnings I've come across using /W3 on Debug configuration:

commands.dll:
Code:
warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
warning C4244: '=' : conversion from 'int16_t' to 'unsigned char', possible loss of data
warning C4244: 'argument' : conversion from 'int16_t' to 'unsigned char', possible loss of data

Mineserver.exe:
Code:
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\blocks\../tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\blocks\basic.cpp(170): warning C4101: 'meta' : unreferenced local variable
src\blocks\basic.cpp(169): warning C4101: 'block' : unreferenced local variable
mineserver\src\blocks\../tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\blocks\jackolantern.cpp(130): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
src\blocks\jackolantern.cpp(131): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\blocks\plant.cpp(465): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
src\blocks\plant.cpp(466): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\blocks\redstone.cpp(69): warning C4305: 'argument' : truncation from '' to 'const uint8_t'
src\blocks\redstone.cpp(69): warning C4309: 'argument' : truncation of constant value
src\blocks\pumpkin.cpp(130): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
src\blocks\pumpkin.cpp(131): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
src\blocks\stair.cpp(123): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
src\blocks\stair.cpp(124): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
src\blocks\step.cpp(133): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
src\blocks\step.cpp(134): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\blocks\wood.cpp(81): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
src\blocks\wood.cpp(82): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
src\blocks\wool.cpp(81): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
src\blocks\wool.cpp(82): warning C4244: 'argument' : conversion from 'int16_t' to 'char', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\config\../tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\inventory.cpp(119): warning C4101: 'rightUse' : unreferenced local variable
src\inventory.cpp(1055): warning C4244: 'argument' : conversion from 'int16_t' to 'int8_t', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\map.cpp(1077): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
src\map.cpp(1077): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
src\map.cpp(1077): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
src\map.cpp(1079): warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
src\map.cpp(1081): warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
src\map.cpp(1082): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
src\map.cpp(1082): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
src\map.cpp(1082): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\nbt.cpp(786): warning C4244: 'argument' : conversion from 'int64_t' to 'double', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\packets.cpp(817): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
src\packets.cpp(817): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
src\packets.cpp(817): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
src\packets.cpp(1247): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
src\packets.cpp(1536): warning C4172: returning address of local variable or temporary
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\plugin_api.cpp(293): warning C4244: 'return' : conversion from 'int64_t' to 'int', possible loss of data
src\plugin_api.cpp(1021): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
src\plugin_api.cpp(1031): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
src\plugin_api.cpp(1041): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
src\plugin_api.cpp(1051): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\tree.cpp(117): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
src\tree.cpp(107): warning C4101: 'meta' : unreferenced local variable
src\tree.cpp(106): warning C4101: 'blocktype' : unreferenced local variable
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\worldgen\biomegen.cpp(284): warning C4244: 'initializing' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\biomegen.cpp(288): warning C4244: 'initializing' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\biomegen.cpp(289): warning C4244: 'initializing' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\biomegen.cpp(306): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
src\worldgen\biomegen.cpp(418): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
src\worldgen\biomegen.cpp(473): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
src\worldgen\biomegen.cpp(473): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\worldgen\eximgen.cpp(257): warning C4244: 'initializing' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(261): warning C4244: 'initializing' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(262): warning C4244: 'initializing' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(334): warning C4244: 'initializing' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(521): warning C4244: '=' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(527): warning C4244: '=' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(533): warning C4244: '=' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(539): warning C4244: '=' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(545): warning C4244: '=' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(551): warning C4244: '=' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(557): warning C4244: '=' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(563): warning C4244: '=' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(575): warning C4244: '=' : conversion from 'double' to 'int32_t', possible loss of data
src\worldgen\eximgen.cpp(576): warning C4244: '=' : conversion from 'double' to 'int32_t', possible loss of data
src\worldgen\eximgen.cpp(579): warning C4244: '-=' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(588): warning C4244: '=' : conversion from 'double' to 'uint8_t', possible loss of data
src\worldgen\eximgen.cpp(606): warning C4244: 'initializing' : conversion from 'double' to 'uint8_t', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\worldgen\heavengen.cpp(222): warning C4101: 'currentHeight' : unreferenced local variable
src\worldgen\heavengen.cpp(223): warning C4101: 'ymax' : unreferenced local variable
src\worldgen\heavengen.cpp(224): warning C4101: 'ciel' : unreferenced local variable
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
src\worldgen\mapgen.cpp(258): warning C4244: 'initializing' : conversion from 'float' to 'uint8_t', possible loss of data
src\worldgen\mapgen.cpp(259): warning C4244: 'initializing' : conversion from 'float' to 'uint8_t', possible loss of data
src\worldgen\mapgen.cpp(340): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
src\worldgen\mapgen.cpp(340): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
mineserver\src\tools.h(146): warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
« Last Edit: May 22, 2011, 07:18:37 am by MechWarrior001 » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!