------------------------------------------------------------------------------- -- Phase: setup ------------------------------------------------------------------------------- UNFLAVORED devel/scons -> use devel/scons@py27 Installing /packages/All/expat-2.2.8.txz Installing /packages/All/indexinfo-0.3.1.txz Installing /packages/All/libffi-3.2.1_3.txz Installing /packages/All/ncurses-6.1.20190525.txz Installing /packages/All/readline-8.0.4.txz Installing /packages/All/gettext-runtime-0.20.1.txz Installing /packages/All/openssl-1.1.1d,1.txz Installing /packages/All/python27-2.7.17_1.txz ===== Message from python27-2.7.17_1: -- Note that some standard Python modules are provided as separate ports as they require additional dependencies. They are available as: bsddb databases/py-bsddb gdbm databases/py-gdbm sqlite3 databases/py-sqlite3 tkinter x11-toolkits/py-tkinter Installing /packages/All/py27-setuptools-44.0.0.txz ===== Message from py27-setuptools-44.0.0: -- Only /usr/local/bin/easy_install-2.7 script has been installed since Python 2.7 is not the default Python version. Installing /packages/All/m4-1.4.18_1,1.txz Installing /packages/All/scons-3.1.1.txz Installing /packages/All/aalib-1.4.r5_13.txz ===== Message from aalib-1.4.r5_13: -- ===> NOTICE: The aalib port currently does not have a maintainer. As a result, it is more likely to have unresolved issues, not be up-to-date, or even be removed in the future. To volunteer to maintain this port, please create an issue at: https://bugs.freebsd.org/bugzilla More information about port maintainership is available at: https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port Installing /packages/All/libxml2-2.9.10.txz Installing /packages/All/wayland-1.16.0.txz Installing /packages/All/pciids-20200222.txz Installing /packages/All/libpciaccess-0.16.txz Installing /packages/All/libdrm-2.4.100.txz Installing /packages/All/libelf-0.8.13_3.txz Installing /packages/All/libXau-1.0.9.txz Installing /packages/All/libpthread-stubs-0.4.txz Installing /packages/All/xorgproto-2019.2.txz Installing /packages/All/libXdmcp-1.1.3.txz Installing /packages/All/libxcb-1.13.1.txz Installing /packages/All/libX11-1.6.9,1.txz Installing /packages/All/libXfixes-5.0.3_2.txz Installing /packages/All/libXdamage-1.1.5.txz Installing /packages/All/libXext-1.3.4,1.txz Installing /packages/All/libXrender-0.9.10_2.txz Installing /packages/All/libXrandr-1.5.2.txz Installing /packages/All/libxshmfence-1.3.txz Installing /packages/All/libXxf86vm-1.1.4_3.txz Installing /packages/All/mesa-libs-18.3.2_4.txz Installing /packages/All/libGLU-9.0.1.txz Installing /packages/All/sdl-1.2.15_14,2.txz ===== Message from sdl-1.2.15_14,2: -- Your SDL library has been built with libvgl support, which means that you can run almost any SDL application straight on your console (VESA 2.0 compatible videocard is required). To do this you have to load the vesa kernel module or enable it in your kernel, and set environment variable "SDL_VIDEODRIVER=vgl". Installing /packages/All/libogg-1.3.4,4.txz Installing /packages/All/flac-1.3.3.txz Installing /packages/All/libmikmod-3.3.11.1_1.txz Installing /packages/All/smpeg-0.4.4_15.txz Installing /packages/All/libvorbis-1.3.6,3.txz Installing /packages/All/timidity-0.2i_1.txz ===== Message from timidity-0.2i_1: -- ===> NOTICE: The timidity port currently does not have a maintainer. As a result, it is more likely to have unresolved issues, not be up-to-date, or even be removed in the future. To volunteer to maintain this port, please create an issue at: https://bugs.freebsd.org/bugzilla More information about port maintainership is available at: https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port Installing /packages/All/sdl_mixer-1.2.12_12.txz UNFLAVORED devel/scons -> use devel/scons@py27 SUCCEEDED 00:00:13 ------------------------------------------------------------------------------- -- Phase: check-sanity ------------------------------------------------------------------------------- SUCCEEDED 00:00:00 ------------------------------------------------------------------------------- -- Phase: pkg-depends ------------------------------------------------------------------------------- ===> freera-080203_8 depends on file: /usr/local/sbin/pkg - found SUCCEEDED 00:00:00 ------------------------------------------------------------------------------- -- Phase: fetch-depends ------------------------------------------------------------------------------- SUCCEEDED 00:00:00 ------------------------------------------------------------------------------- -- Phase: fetch ------------------------------------------------------------------------------- ===> freera-080203_8 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by freera-080203_8 for building SUCCEEDED 00:00:00 ------------------------------------------------------------------------------- -- Phase: checksum ------------------------------------------------------------------------------- ===> freera-080203_8 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by freera-080203_8 for building => SHA256 Checksum OK for 080203_freera++_src.tar.gz. SUCCEEDED 00:00:00 ------------------------------------------------------------------------------- -- Phase: extract-depends ------------------------------------------------------------------------------- SUCCEEDED 00:00:00 ------------------------------------------------------------------------------- -- Phase: extract ------------------------------------------------------------------------------- ===> freera-080203_8 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by freera-080203_8 for building ===> Extracting for freera-080203_8 ===> freera-080203_8 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by freera-080203_8 for building => SHA256 Checksum OK for 080203_freera++_src.tar.gz. Extracted Memory Use: 2.62M SUCCEEDED 00:00:01 ------------------------------------------------------------------------------- -- Phase: patch-depends ------------------------------------------------------------------------------- SUCCEEDED 00:00:00 ------------------------------------------------------------------------------- -- Phase: patch ------------------------------------------------------------------------------- ===> Patching for freera-080203_8 ===> Applying ports patches for freera-080203_8 SUCCEEDED 00:00:00 ------------------------------------------------------------------------------- -- Phase: build-depends ------------------------------------------------------------------------------- ===> freera-080203_8 depends on file: /usr/local/bin/scons - found ===> freera-080203_8 depends on file: /usr/local/bin/sdl-config - found SUCCEEDED 00:00:00 ------------------------------------------------------------------------------- -- Phase: lib-depends ------------------------------------------------------------------------------- ===> freera-080203_8 depends on shared library: libSDL_mixer.so - found (/usr/local/lib/libSDL_mixer.so) ===> freera-080203_8 depends on shared library: libSDL.so - found (/usr/local/lib/libSDL.so) SUCCEEDED 00:00:00 ------------------------------------------------------------------------------- -- Phase: configure ------------------------------------------------------------------------------- ===> freera-080203_8 depends on file: /usr/local/bin/scons - found ===> freera-080203_8 depends on file: /usr/local/bin/sdl-config - found ===> freera-080203_8 depends on shared library: libSDL_mixer.so - found (/usr/local/lib/libSDL_mixer.so) ===> freera-080203_8 depends on shared library: libSDL.so - found (/usr/local/lib/libSDL.so) ===> Configuring for freera-080203_8 SUCCEEDED 00:00:00 ------------------------------------------------------------------------------- -- Phase: build ------------------------------------------------------------------------------- ===> Building for freera-080203_8 scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... c++ -o src/freera.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/freera.cpp c++ -o src/misc/common.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/misc/common.cpp c++ -o src/misc/args.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/misc/args.cpp c++ -o src/misc/mapsini.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/misc/mapsini.cpp c++ -o src/misc/inifile.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/misc/inifile.cpp c++ -o src/misc/compression.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/misc/compression.cpp c++ -o src/audio/soundengine.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/audio/soundengine.cpp c++ -o src/audio/soundfile.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/audio/soundfile.cpp c++ -o src/game/player.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/player.cpp c++ -o src/game/dispatcher.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/dispatcher.cpp src/misc/compression.cpp: In function 'int Compression::decode80(const Uint8*, Uint8*)': src/misc/compression.cpp:94:37: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *writep++ = code; ^~~~ src/misc/compression.cpp:124:20: warning: conversion from 'long int' to 'int' may change value [-Wconversion] return (writep - image_out); ~~~~~~~~^~~~~~~~~~~~ src/misc/compression.cpp: In function 'int Compression::decode40(const Uint8*, Uint8*)': src/misc/compression.cpp:157:31: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *writep++ ^= code; ~~~~~~~~~~^~~~~~~ src/misc/compression.cpp:162:40: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *writep++ ^= *readp++; ^~ src/misc/compression.cpp:193:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *writep++ ^= *readp++; ^~ src/misc/compression.cpp:199:39: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *writep++ ^= code; ~~~~~~~~~~^~~~~~~ src/misc/compression.cpp:208:20: warning: conversion from 'long int' to 'int' may change value [-Wconversion] return (writep - image_out); ~~~~~~~~^~~~~~~~~~~~ src/misc/compression.cpp: In function 'int Compression::decode20(const Uint8*, Uint8*, int)': src/misc/compression.cpp:225:20: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *w++ = v; ^ src/misc/compression.cpp:232:14: warning: conversion from 'long int' to 'int' may change value [-Wconversion] return w - d; ~~^~~ src/misc/compression.cpp: In function 'int Compression::dec_base64(const unsigned char*, unsigned char*, size_t)': src/misc/compression.cpp:249:20: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] for( i = length-1; src[i] == '='; i-- ) { ~~~~~~^~ src/misc/compression.cpp:262:21: warning: conversion from 'int' to 'unsigned char' may change value [-Wconversion] dtable[i]= i-'A'; ~^~~~ src/misc/compression.cpp:265:22: warning: conversion from 'int' to 'unsigned char' may change value [-Wconversion] dtable[i]= 26+(i-'a'); ~~^~~~~~~~ src/misc/compression.cpp:268:22: warning: conversion from 'int' to 'unsigned char' may change value [-Wconversion] dtable[i]= 52+(i-'0'); ~~^~~~~~~~ src/misc/compression.cpp:284:28: warning: conversion from 'int' to 'unsigned char' may change value [-Wconversion] target[0] = a << 2 | b >> 4; ~~~~~~~^~~~~~~~ src/misc/compression.cpp:285:28: warning: conversion from 'int' to 'unsigned char' may change value [-Wconversion] target[1] = b << 4 | c >> 2; ~~~~~~~^~~~~~~~ src/misc/compression.cpp:286:28: warning: conversion from 'int' to 'unsigned char' may change value [-Wconversion] target[2] = c << 6 | d; ~~~~~~~^~~ src/misc/compression.cpp:296:32: warning: conversion from 'int' to 'unsigned char' may change value [-Wconversion] target[0] = a << 2 | b >> 4; ~~~~~~~^~~~~~~~ src/misc/compression.cpp:302:32: warning: conversion from 'int' to 'unsigned char' may change value [-Wconversion] target[0] = a << 2 | b >> 4; ~~~~~~~^~~~~~~~ src/misc/compression.cpp:303:32: warning: conversion from 'int' to 'unsigned char' may change value [-Wconversion] target[1] = b << 4 | c >> 2; ~~~~~~~^~~~~~~~ c++ -o src/game/projectileanim.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/projectileanim.cpp In file included from src/include/common.h:5, from src/misc/common.cpp:5: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/game/dispatcher.cpp:2: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/common.h:5, from src/misc/inifile.cpp:11: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/common.h:5, from src/audio/soundengine.cpp:5: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/common.h:5, from src/misc/args.cpp:12: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/common.h:5, from src/include/buildqueue.h:7, from src/game/player.cpp:5: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/misc/mapsini.cpp:5: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/player.cpp:6: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/dispatcher.cpp:2: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/ccmap.h:11, from src/game/player.cpp:6: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/ccmap.h:11, from src/game/dispatcher.cpp:2: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/common.h:5, from src/include/vfs.h:8, from src/audio/soundfile.cpp:7: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ src/misc/args.cpp: In function 'bool parse(int, char**)': src/misc/args.cpp:93:40: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] config.width = freecnc_ini->readInt("Video", "Width", 640); ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ src/misc/args.cpp:94:41: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] config.height = freecnc_ini->readInt("Video", "Height", 480); ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/misc/args.cpp:95:38: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] config.bpp = freecnc_ini->readInt("Video", "Bpp", 16); ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/misc/args.cpp:98:40: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] config.intro = freecnc_ini->readInt("Options", "PlayIntro", 1); ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/misc/args.cpp:104:45: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] config.finaldelay = freecnc_ini->readInt("Options","FinalDelay",100); ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/misc/args.cpp:105:45: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] config.scrollstep = freecnc_ini->readInt("Options","ScrollStep",1); ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ src/misc/args.cpp:106:45: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] config.scrolltime = freecnc_ini->readInt("Options","ScrollTime",5); ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ src/misc/args.cpp:107:45: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] config.maxscroll = freecnc_ini->readInt("Options","MaxScroll",24); ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ src/misc/args.cpp:108:52: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] config.buildable_radius = internal_ini->readInt("Rules","buildable_radius",2); ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/misc/args.cpp:156:42: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] config.totalplayers = abs(atoi(argv[i+1])); ~~~^~~~~~~~~~~~~~~~~ src/misc/args.cpp:173:42: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] config.totalplayers = abs(atoi(argv[i+2])); ~~~^~~~~~~~~~~~~~~~~ src/misc/args.cpp:181:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] config.playernum = abs(atoi(argv[i+1])); ~~~^~~~~~~~~~~~~~~~~ src/misc/args.cpp:221:40: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] config.serverport = abs(atoi(argv[i+1])); ~~~^~~~~~~~~~~~~~~~~ src/misc/args.cpp:241:36: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] config.width = atoi(argv[i+1]); ~~~~^~~~~~~~~~~ src/misc/args.cpp:249:37: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] config.height = atoi(argv[i+1]); ~~~~^~~~~~~~~~~ src/misc/args.cpp:257:34: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] config.bpp = atoi(argv[i+1]); ~~~~^~~~~~~~~~~ In file included from src/include/common.h:5, from src/freera.cpp:15: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/game/dispatcher.cpp:2: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/game/dispatcher.cpp:2: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/game/dispatcher.cpp:2: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ src/audio/soundengine.cpp: In member function 'int SoundEngine::PlayLoopedSound(const string&, unsigned int)': src/audio/soundengine.cpp:94:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (!snd) ^~ src/audio/soundengine.cpp:97:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' if (Mix_Paused (-1)) ^~ In file included from src/game/player.cpp:6: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/game/player.cpp:6: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/game/player.cpp:6: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/misc/inifile.cpp:12: src/misc/inifile.cpp: In member function 'float INIFile::readFloat(const char*, const char*)': src/include/inifile.h:18:18: warning: conversion from 'int' to 'float' changes value from '2147483647' to '2.14748365e+9f' [-Wfloat-conversion] #define INIERROR 0x7fffffff ^~~~~~~~~~ src/misc/inifile.cpp:254:16: note: in expansion of macro 'INIERROR' return INIERROR; ^~~~~~~~ src/include/inifile.h:18:18: warning: conversion from 'int' to 'float' changes value from '2147483647' to '2.14748365e+9f' [-Wfloat-conversion] #define INIERROR 0x7fffffff ^~~~~~~~~~ src/misc/inifile.cpp:268:16: note: in expansion of macro 'INIERROR' return INIERROR; ^~~~~~~~ src/include/inifile.h:18:18: warning: conversion from 'int' to 'float' changes value from '2147483647' to '2.14748365e+9f' [-Wfloat-conversion] #define INIERROR 0x7fffffff ^~~~~~~~~~ src/misc/inifile.cpp:271:16: note: in expansion of macro 'INIERROR' return INIERROR; ^~~~~~~~ src/misc/inifile.cpp: In member function 'float INIFile::readFloat(const char*, const char*, float)': src/include/inifile.h:18:18: warning: conversion from 'int' to 'float' changes value from '2147483647' to '2.14748365e+9f' [-Wfloat-conversion] #define INIERROR 0x7fffffff ^~~~~~~~~~ src/misc/inifile.cpp:282:16: note: in expansion of macro 'INIERROR' if (tmp == INIERROR) ^~~~~~~~ src/misc/inifile.cpp: In constructor 'INIFile::INIFile(const char*)': src/misc/inifile.cpp:333:33: warning: conversion from 'int' to 'char' may change value [-Wconversion] key[i] = toupper(key[i]); ~~~~~~~^~~~~~~~ src/misc/inifile.cpp:339:33: warning: conversion from 'int' to 'char' may change value [-Wconversion] key[i] = toupper(key[i]); ~~~~~~~^~~~~~~~ In file included from src/include/playerpool.h:10, from src/game/dispatcher.cpp:7: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ src/audio/soundfile.cpp: In function 'void Sound::IMADecode(Uint8*, Uint8*, Uint16, Sint32&, Sint32&)': src/audio/soundfile.cpp:84:48: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 uncompressed_size = compressed_size * 2; ~~~~~~~~~~~~~~~~^~~ src/audio/soundfile.cpp:94:26: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Code=(*InP++)>>4; // Extract upper 4 bits ~~~~~~~~^~~ src/audio/soundfile.cpp:128:19: warning: conversion from 'Sint32' {aka 'int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] *OutP++ = sample; //Clip(sample); ^~~~~~ src/audio/soundfile.cpp: In function 'void Sound::WSADPCM_Decode(Uint8*, Uint8*, Uint16, Uint16)': src/audio/soundfile.cpp:156:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] shifted_input<<=2; ~~~~~~~~~~~~~^~~~ src/audio/soundfile.cpp:28:30: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] #define HIBYTE(word) ((word) >> 8) ~~~~~~~~^~~~~ src/audio/soundfile.cpp:157:14: note: in expansion of macro 'HIBYTE' code=HIBYTE(shifted_input); ^~~~~~ src/audio/soundfile.cpp:163:22: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] count<<=3; // here it's significant that (count) is signed: ~~~~~^~~~ src/audio/soundfile.cpp:164:26: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] CurSample+=count>>3; // the sign bit will be copied by these shifts! ~~~~~~~~~^~~~~~~~~~ src/audio/soundfile.cpp:187:26: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] CurSample+=WSTable4bit[(code & 0x0F)]; // lower nibble ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/audio/soundfile.cpp:189:26: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] CurSample+=WSTable4bit[(code >> 4)]; // higher nibble ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ src/audio/soundfile.cpp:191:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] bytes_left-=2; // two bytes added to output ~~~~~~~~~~^~~ src/audio/soundfile.cpp:197:26: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] CurSample+=WSTable2bit[(code & 0x03)]; // lower 2 bits ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/audio/soundfile.cpp:199:26: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] CurSample+=WSTable2bit[((code>>2) & 0x03)]; // lower middle 2 bits ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/audio/soundfile.cpp:201:26: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] CurSample+=WSTable2bit[((code>>4) & 0x03)]; // higher middle 2 bits ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/audio/soundfile.cpp:203:26: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] CurSample+=WSTable2bit[((code>>6) & 0x03)]; // higher 2 bits ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/audio/soundfile.cpp:205:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] bytes_left-=4; // 4 bytes sent to output ~~~~~~~~~~^~~ In file included from src/game/player.cpp:11: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/include/playerpool.h:10, from src/include/graphicsengine.h:12, from src/freera.cpp:18: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/game/player.cpp:16: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from src/game/dispatcher.cpp:9: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ In file included from src/game/player.cpp:17: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ c++ -o src/game/talkback.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/talkback.cpp In file included from src/game/player.cpp:18: src/include/sidebar.h: In member function 'Uint16 Sidebar::width()': src/include/sidebar.h:59:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return sbar->w; ~~~~~~^ src/game/player.cpp: In constructor 'Player::Player(const char*, INIFile*)': src/game/player.cpp:74:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] multiside = playername[5] - 48; ~~~~~~~~~~~~~~^~~~ src/game/player.cpp:77:36: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] unitpalnum = multiside - 1; ~~~~~~~~~~^~~ src/game/player.cpp:78:38: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] structpalnum = multiside - 1; ~~~~~~~~~~^~~ src/game/player.cpp: In member function 'bool Player::changeMoney(Sint32)': src/game/player.cpp:153:28: warning: conversion from 'Sint32' {aka 'int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] counter->addCredit(change, playernum); ^~~~~~ src/game/player.cpp:160:26: warning: conversion from 'Sint32' {aka 'int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] counter->addDebt(-change, playernum); ^~~~~~~ src/game/player.cpp: In member function 'void Player::revealAroundWaypoint(Uint32)': src/game/player.cpp:179:37: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] wp_cellpos = p::ccmap->getWaypoint(Waypoint); ^~~~~~~~ src/game/player.cpp:189:47: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint32 cellpos = p::ccmap->translateToPos(x, y); ^ src/game/player.cpp:189:50: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint32 cellpos = p::ccmap->translateToPos(x, y); ^ src/game/player.cpp: In member function 'void Player::setMultiColour(int)': src/game/player.cpp:397:32: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] unitpalnum = structpalnum = colour; ^~~~~~ src/game/player.cpp:400:32: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] unitpalnum = structpalnum = colour; ^~~~~~ src/game/player.cpp: In member function 'void Player::addSoB(Uint32, Uint8, Uint8, Uint8, Player::SOB_update)': src/game/player.cpp:786:29: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, unsigned char>::value_type' {aka 'unsigned char'} may change value [-Wconversion] sightMatrix[curpos] += (mode == SOB_SIGHT); src/game/player.cpp:787:29: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, unsigned char>::value_type' {aka 'unsigned char'} may change value [-Wconversion] buildMatrix[curpos] += (mode == SOB_BUILD); In file included from src/game/dispatcher.cpp:11: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ src/game/dispatcher.cpp: In member function 'void Dispatcher::Dispatcher::unitMove(Unit*, Uint32)': src/game/dispatcher.cpp:51:22: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] un->move(dest); ^~~~ src/game/dispatcher.cpp: In member function 'bool Dispatcher::Dispatcher::structurePlace(const StructureType*, Uint32, Uint8)': src/game/dispatcher.cpp:116:80: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return p::uspool->createStructure(const_cast(type),pos,owner,FULLHEALTH,0,true); ^~~ src/game/dispatcher.cpp: In member function 'bool Dispatcher::Dispatcher::structurePlace(const char*, Uint32, Uint8)': src/game/dispatcher.cpp:131:53: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return p::uspool->createStructure(tname,pos,owner,FULLHEALTH,0,true); ^~~ src/game/dispatcher.cpp: In member function 'bool Dispatcher::Dispatcher::unitCreate(const char*, Uint32, Uint8, Uint8)': src/game/dispatcher.cpp:176:48: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return p::uspool->createUnit(tname,pos,subpos,owner,FULLHEALTH,0); ^~~ c++ -o src/game/map.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/map.cpp c++ -o src/game/moneycounter.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/moneycounter.cpp In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/game/projectileanim.cpp:3: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ c++ -o src/game/triggers.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/triggers.cpp src/misc/mapsini.cpp: In member function 'void MissionMapsClass::ReadMissionData()': src/misc/mapsini.cpp:86:29: warning: conversion from 'std::__cxx11::basic_string::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] if ((pos = tmpString.find (".INI",0)) != (Uint32)string::npos){ ~~~~~~~~~~~~~~~^~~~~~~~~~ src/misc/mapsini.cpp:88:30: warning: conversion from 'std::__cxx11::basic_string::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] if ((pos = tmpString.find ("SCU",0)) != (Uint32)string::npos){ ~~~~~~~~~~~~~~~^~~~~~~~~ src/misc/mapsini.cpp: In member function 'void MPmapsClass::ReadMapData()': src/misc/mapsini.cpp:175:29: warning: conversion from 'std::__cxx11::basic_string::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] if ((pos = tmpString.find (".INI",0)) != (Uint32)string::npos){ ~~~~~~~~~~~~~~~^~~~~~~~~~ src/misc/mapsini.cpp:182:29: warning: conversion from 'std::__cxx11::basic_string::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] if ((pos = tmpString.find ("=",0)) != (Uint32)string::npos){ ~~~~~~~~~~~~~~~^~~~~~~ src/misc/mapsini.cpp:183:31: warning: conversion from 'std::__cxx11::basic_string::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] if ((pos1 = tmpString.find (")",0)) != (Uint32)string::npos){ ~~~~~~~~~~~~~~~^~~~~~~ c++ -o src/game/ai.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/ai.cpp c++ -o src/game/game.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/game.cpp In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/projectileanim.cpp:3: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/ccmap.h:11, from src/game/projectileanim.cpp:3: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/common.h:5, from src/include/talkback.h:7, from src/game/talkback.cpp:7: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ c++ -o src/game/playerpool.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/playerpool.cpp In file included from src/game/projectileanim.cpp:3: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/game/projectileanim.cpp:3: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/game/projectileanim.cpp:3: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/game/map.cpp:8: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/include/unitandstructurepool.h:10, from src/game/talkback.cpp:8: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/ccmap.h:11, from src/include/unitandstructurepool.h:10, from src/game/talkback.cpp:8: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/map.cpp:8: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/playerpool.h:10, from src/include/ai.h:8, from src/include/unit.h:17, from src/game/projectileanim.cpp:9: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/include/ccmap.h:11, from src/game/map.cpp:8: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ c++ -o src/game/actioneventqueue.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/actioneventqueue.cpp In file included from src/game/projectileanim.cpp:9: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from src/game/map.cpp:8: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/game/map.cpp:8: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/game/map.cpp:8: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/include/common.h:5, from src/game/moneycounter.cpp:2: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/game/projectileanim.cpp:10: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ In file included from src/include/ccmap.h:9, from src/game/projectileanim.cpp:3: src/game/projectileanim.cpp: In constructor 'ProjectileAnim::ProjectileAnim(Uint32, Weapon*, UnitOrStructure*, Uint16, Uint8)': src/include/common.h:114:16: warning: conversion from 'double' to 'float' changes value from '-1.5707963267948966e+0' to '-1.57079637e+0f' [-Wfloat-conversion] #define M_PI_2 1.57079632679489661923 ^~~~~~~~~~~~~~~~~~~~~~ src/game/projectileanim.cpp:112:30: note: in expansion of macro 'M_PI_2' alpha = -M_PI_2; ^~~~~~ src/include/common.h:114:16: warning: conversion from 'double' to 'float' changes value from '1.5707963267948966e+0' to '1.57079637e+0f' [-Wfloat-conversion] #define M_PI_2 1.57079632679489661923 ^~~~~~~~~~~~~~~~~~~~~~ src/game/projectileanim.cpp:114:29: note: in expansion of macro 'M_PI_2' alpha = M_PI_2; ^~~~~~ src/game/projectileanim.cpp:117:29: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] alpha = atan((float)ydiff/(float)xdiff); ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/projectileanim.cpp:119:33: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] alpha = M_PI+alpha; src/game/projectileanim.cpp: In member function 'virtual void ProjectileAnim::run()': src/game/projectileanim.cpp:170:36: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] subdest = target->getSubpos(); ~~~~~~~~~~~~~~~~~^~ In file included from src/include/ccmap.h:9, from src/game/projectileanim.cpp:3: src/include/common.h:114:16: warning: conversion from 'double' to 'float' changes value from '-1.5707963267948966e+0' to '-1.57079637e+0f' [-Wfloat-conversion] #define M_PI_2 1.57079632679489661923 ^~~~~~~~~~~~~~~~~~~~~~ src/game/projectileanim.cpp:186:34: note: in expansion of macro 'M_PI_2' alpha = -M_PI_2; ^~~~~~ src/include/common.h:114:16: warning: conversion from 'double' to 'float' changes value from '1.5707963267948966e+0' to '1.57079637e+0f' [-Wfloat-conversion] #define M_PI_2 1.57079632679489661923 ^~~~~~~~~~~~~~~~~~~~~~ src/game/projectileanim.cpp:188:33: note: in expansion of macro 'M_PI_2' alpha = M_PI_2; ^~~~~~ src/game/projectileanim.cpp:191:33: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] alpha = atan((float)ydiff/(float)xdiff); ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/projectileanim.cpp:193:37: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] alpha = M_PI+alpha; src/game/projectileanim.cpp:233:58: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] utarget = p::uspool->getUnitAt(dest, sud); ^~~ src/game/projectileanim.cpp:276:44: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] l2o->cellpos -= p::ccmap->getWidth(); ^ src/game/projectileanim.cpp:280:44: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] l2o->cellpos += p::ccmap->getWidth(); ^ In file included from src/include/playerpool.h:10, from src/include/ai.h:8, from src/include/unit.h:17, from src/include/path.h:8, from src/game/map.cpp:15: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/include/unitandstructurepool.h:10, from src/game/talkback.cpp:8: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/include/unitandstructurepool.h:10, from src/game/talkback.cpp:8: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/include/unitandstructurepool.h:10, from src/game/talkback.cpp:8: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/include/path.h:8, from src/game/map.cpp:15: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from src/game/talkback.cpp:8: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ In file included from src/game/map.cpp:20: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ src/game/map.cpp: In member function 'Uint8 CnCMap::accScroll(Uint8)': src/game/map.cpp:194:27: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] scrollvec.y = -scrollstep; ^~~~~~~~~~~ src/game/map.cpp:196:25: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] scrollvec.y -= scrollstep; ~~~~~~~~~~~~^~~~~~~~~~~~~ src/game/map.cpp:207:25: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] scrollvec.y += scrollstep; ~~~~~~~~~~~~^~~~~~~~~~~~~ src/game/map.cpp:216:28: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] scrollvec.x = -scrollstep; ^~~~~~~~~~~ src/game/map.cpp:218:25: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] scrollvec.x -= scrollstep; ~~~~~~~~~~~~^~~~~~~~~~~~~ src/game/map.cpp:229:25: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] scrollvec.x += scrollstep; ~~~~~~~~~~~~^~~~~~~~~~~~~ src/game/map.cpp: In member function 'void CnCMap::doscroll()': src/game/map.cpp:336:30: warning: conversion from 'Sint32' {aka 'int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curxtileoffs = xtile; ^~~~~ src/game/map.cpp:347:30: warning: conversion from 'Sint32' {aka 'int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curytileoffs = ytile; ^~~~~ src/game/map.cpp: In member function 'void CnCMap::setMaxScroll(Uint32, Uint32, Uint32, Uint32, Uint32)': src/game/map.cpp:383:32: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.maxx = width - x; ~~~~~~^~~ src/game/map.cpp:384:34: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.maxxtileoffs = xtile; ^~~~~ src/game/map.cpp:387:33: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.maxy = height - y; ~~~~~~~^~~ src/game/map.cpp:388:34: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.maxytileoffs = ytile; ^~~~~ src/game/map.cpp:391:27: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.tilewidth = tilew; ^~~~~ src/game/map.cpp: In member function 'void CnCMap::setValidScroll()': src/game/map.cpp:423:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] temp &= ~s_left; ~~~~~^~~~~~~~~~ src/game/map.cpp:426:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] temp &= ~s_up; ~~~~~^~~~~~~~ src/game/map.cpp:430:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] temp &= ~s_right; ~~~~~^~~~~~~~~~~ src/game/map.cpp:434:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] temp &= ~s_down; ~~~~~^~~~~~~~~~ src/game/map.cpp: In member function 'Uint16 CnCMap::getCost(Uint16, Unit*) const': src/game/map.cpp:677:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cost = 1 + p::uspool->getTileCost(pos); ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/map.cpp:679:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cost = 1 + p::uspool->getTileCost(pos,excpUn); ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/map.cpp: In member function 'SDL_Surface* CnCMap::getMiniMap(Uint8)': src/game/map.cpp:734:62: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] for(Uint32 i = 0; i < (Uint32) width*height; i++, pos.x += pixsize, ~~~~~~^~~~~~~~~~ src/game/map.cpp:737:19: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] pos.y += pixsize; ~~~~~~^~~~~~~~~~ src/game/map.cpp:756:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] miniclip.w = pixsize*(int)floor((double)tx/(double)pixsize); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/map.cpp:757:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] miniclip.h = pixsize*(int)floor((double)ty/(double)pixsize); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/map.cpp:759:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] miniclip.w = miniclip.w - RA_OFFSET; ^ src/game/map.cpp:760:42: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] miniclip.h = miniclip.h - RA_OFFSET - 20; ~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/game/map.cpp:764:48: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] miniclip.x = abs(miniclip.sidew-miniclip.w)/2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/map.cpp:766:56: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] miniclip.y = abs(miniclip.sidew - 20 - miniclip.h)/2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/map.cpp:768:51: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] miniclip.y = abs(miniclip.sidew - miniclip.h)/2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/map.cpp:771:32: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] miniclip.tilew = miniclip.w/pixsize; ~~~~~~~~~~^~~~~~~~ src/game/map.cpp:772:32: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] miniclip.tileh = miniclip.h/pixsize; ~~~~~~~~~~^~~~~~~~ src/game/map.cpp: In member function 'void CnCMap::restoreLocation(Uint8)': src/game/map.cpp:800:53: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curxtileoffs = scrollpos.tilewidth-1; ~~~~~~~~~~~~~~~~~~~^~ src/game/map.cpp:803:53: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curytileoffs = scrollpos.tilewidth-1; ~~~~~~~~~~~~~~~~~~~^~ src/game/map.cpp: In member function 'void CnCMap::translateFromPos(Uint32, Uint16*, Uint16*) const': src/game/map.cpp:830:13: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *y = pos/width; ~~~^~~~~~ src/game/map.cpp:831:13: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *x = pos-((*y)*width); ~~~^~~~~~~~~~~~~ In file included from src/include/common.h:5, from src/include/unitorstructure.h:10, from src/include/triggers.h:4, from src/game/triggers.cpp:4: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/game/moneycounter.cpp:5: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ src/game/moneycounter.cpp: In member function 'void MoneyCounter::addCredit(Uint16, Uint8)': src/game/moneycounter.cpp:48:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] creditleft += amount; ~~~~~~~~~~~^~~~~~~~~ src/game/moneycounter.cpp: In member function 'void MoneyCounter::addDebt(Uint16, Uint8)': src/game/moneycounter.cpp:57:14: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] debtleft += amount; ~~~~~~~~~^~~~~~~~~ src/game/moneycounter.cpp: In member function 'Uint8 MoneyCounter::step(Uint16&)': src/game/moneycounter.cpp:74:15: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] value -= delta; ~~~~~~^~~~~~~~ In file included from src/include/common.h:5, from src/game/playerpool.cpp:3: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/game/ai.cpp:5: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/game/game.cpp:7: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/triggers.cpp:5: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ c++ -o src/game/unit.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/unit.cpp In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/ai.cpp:5: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/ccmap.h:11, from src/game/triggers.cpp:5: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/ccmap.h:11, from src/game/ai.cpp:5: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/game.cpp:7: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/game/triggers.cpp:5: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/game/triggers.cpp:4: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/game/triggers.cpp:5: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/include/ccmap.h:11, from src/game/game.cpp:7: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/game/ai.cpp:5: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/game/ai.cpp:5: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/game/ai.cpp:5: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/include/playerpool.h:10, from src/game/playerpool.cpp:5: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ c++ -o src/game/unitanimations.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/unitanimations.cpp src/game/playerpool.cpp: In member function 'Uint16 PlayerPool::getAStart()': src/game/playerpool.cpp:265:11: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] rnd = (int) ((double)sze*rand()/(RAND_MAX+1.0)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/playerpool.cpp:267:15: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] rnd = (int) ((double)sze*rand()/(RAND_MAX+1.0)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/playerpool.cpp:269:27: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] rv = playerstarts[rnd]; ~~~~~~~~~~~~~~~~^ In file included from src/include/playerpool.h:10, from src/include/ai.h:8, from src/game/ai.cpp:7: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/game/triggers.cpp:6: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ c++ -o src/game/structureanims.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/structureanims.cpp c++ -o src/game/path.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/path.cpp In file included from src/game/game.cpp:7: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/game/game.cpp:7: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/game/game.cpp:7: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/game/ai.cpp:9: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from src/game/game.cpp:10: src/include/cursor.h: In member function 'Uint16 Cursor::getX()': src/include/cursor.h:43:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return x+cursor_offset; ~^~~~~~~~~~~~~~ src/include/cursor.h: In member function 'Uint16 Cursor::getY()': src/include/cursor.h:47:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return y+cursor_offset; ~^~~~~~~~~~~~~~ In file included from src/game/ai.cpp:11: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ In file included from src/include/playerpool.h:10, from src/include/ai.h:8, from src/include/unit.h:17, from src/game/triggers.cpp:8: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ src/game/ai.cpp: In constructor 'ai::ai()': src/game/ai.cpp:49:45: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.AttackInterval = rules_ini->readInt ("AI", "AttackInterval", 3); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:50:42: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.AttackDelay = rules_ini->readInt ("AI", "AttackDelay", 5); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:51:64: warning: conversion from 'double' to 'float' changes value from '1.6e-2' to '1.60000008e-2f' [-Wfloat-conversion] Rules.PatrolScan = rules_ini->readFloat ("AI", "PatrolScan", .016); ^~~~ src/game/ai.cpp:52:44: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.CreditReserve = rules_ini->readInt ("AI", "CreditReserve", 100); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:53:63: warning: conversion from 'double' to 'float' changes value from '1.0e-2' to '9.99999978e-3f' [-Wfloat-conversion] Rules.PathDelay = rules_ini->readFloat ("AI", "PathDelay", .01); ^~~ src/game/ai.cpp:54:42: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.OreNearScan = rules_ini->readInt ("AI", "OreNearScan", 6); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:55:41: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.OreFarScan = rules_ini->readInt ("AI", "OreFarScan", 48); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:56:45: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.AutocreateTime = rules_ini->readInt ("AI", "AutocreateTime", 5); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:58:47: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.InfantryBaseMult = rules_ini->readInt ("AI", "InfantryBaseMult", 1); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:59:43: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.PowerSurplus = rules_ini->readInt ("AI", "PowerSurplus", 50); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:60:42: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.BaseSizeAdd = rules_ini->readInt ("AI", "BaseSizeAdd", 3); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:61:70: warning: conversion from 'double' to 'float' changes value from '1.6e-1' to '1.59999996e-1f' [-Wfloat-conversion] Rules.RefineryRatio = rules_ini->readFloat ("AI", "RefineryRatio", .16); ^~~ src/game/ai.cpp:62:44: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.RefineryLimit = rules_ini->readInt ("AI", "RefineryLimit", 4); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:63:70: warning: conversion from 'double' to 'float' changes value from '1.6e-1' to '1.59999996e-1f' [-Wfloat-conversion] Rules.BarracksRatio = rules_ini->readFloat ("AI", "BarracksRatio", .16); ^~~ src/game/ai.cpp:64:44: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.BarracksLimit = rules_ini->readInt ("AI", "BarracksLimit", 2); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:65:61: warning: conversion from 'double' to 'float' changes value from '1.0000000000000001e-1' to '1.00000001e-1f' [-Wfloat-conversion] Rules.WarRatio = rules_ini->readFloat ("AI", "WarRatio", .1); ^~ src/game/ai.cpp:66:40: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.WarLimit = rules_ini->readInt ("AI", "WarLimit", 2); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:67:68: warning: conversion from 'double' to 'float' changes value from '4.0000000000000002e-1' to '4.00000006e-1f' [-Wfloat-conversion] Rules.DefenseRatio = rules_ini->readFloat ("AI", "DefenseRatio", .4); ^~ src/game/ai.cpp:68:43: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.DefenseLimit = rules_ini->readInt ("AI", "DefenseLimit", 40); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:69:59: warning: conversion from 'double' to 'float' changes value from '1.4000000000000001e-1' to '1.40000001e-1f' [-Wfloat-conversion] Rules.AARatio = rules_ini->readFloat ("AI", "AARatio", .14); ^~~ src/game/ai.cpp:70:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.AALimit = rules_ini->readInt ("AI", "AALimit", 10); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:71:64: warning: conversion from 'double' to 'float' changes value from '1.6e-1' to '1.59999996e-1f' [-Wfloat-conversion] Rules.TeslaRatio = rules_ini->readFloat ("AI", "TeslaRatio", .16); ^~~ src/game/ai.cpp:72:41: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.TeslaLimit = rules_ini->readInt ("AI", "TeslaLimit", 10); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:73:68: warning: conversion from 'double' to 'float' changes value from '1.2e-1' to '1.19999997e-1f' [-Wfloat-conversion] Rules.HelipadRatio = rules_ini->readFloat ("AI", "HelipadRatio", .12); ^~~ src/game/ai.cpp:74:43: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.HelipadLimit = rules_ini->readInt ("AI", "HelipadLimit", 5); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:75:70: warning: conversion from 'double' to 'float' changes value from '1.2e-1' to '1.19999997e-1f' [-Wfloat-conversion] Rules.AirstripRatio = rules_ini->readFloat ("AI", "AirstripRatio", .12); ^~~ src/game/ai.cpp:76:44: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.AirstripLimit = rules_ini->readInt ("AI", "AirstripLimit", 5); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:81:45: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Rules.PowerEmergency = rules_ini->readInt ("AI", "PowerEmergency", 75); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:85:21: warning: conversion from 'double' to 'float' changes value from '1.6e-2' to '1.60000008e-2f' [-Wfloat-conversion] Rules.PatrolScan =.016; ^~~~ src/game/ai.cpp:87:21: warning: conversion from 'double' to 'float' changes value from '1.0e-2' to '9.99999978e-3f' [-Wfloat-conversion] Rules.PathDelay =.01; ^~~ src/game/ai.cpp:95:25: warning: conversion from 'double' to 'float' changes value from '1.6e-1' to '1.59999996e-1f' [-Wfloat-conversion] Rules.RefineryRatio = .16; ^~~ src/game/ai.cpp:97:25: warning: conversion from 'double' to 'float' changes value from '1.6e-1' to '1.59999996e-1f' [-Wfloat-conversion] Rules.BarracksRatio = .16; ^~~ src/game/ai.cpp:99:20: warning: conversion from 'double' to 'float' changes value from '1.0000000000000001e-1' to '1.00000001e-1f' [-Wfloat-conversion] Rules.WarRatio =.1; ^~ src/game/ai.cpp:101:24: warning: conversion from 'double' to 'float' changes value from '4.0000000000000002e-1' to '4.00000006e-1f' [-Wfloat-conversion] Rules.DefenseRatio = .4; ^~ src/game/ai.cpp:103:19: warning: conversion from 'double' to 'float' changes value from '1.4000000000000001e-1' to '1.40000001e-1f' [-Wfloat-conversion] Rules.AARatio =.14; ^~~ src/game/ai.cpp:105:22: warning: conversion from 'double' to 'float' changes value from '1.6e-1' to '1.59999996e-1f' [-Wfloat-conversion] Rules.TeslaRatio = .16; ^~~ src/game/ai.cpp:107:24: warning: conversion from 'double' to 'float' changes value from '1.2e-1' to '1.19999997e-1f' [-Wfloat-conversion] Rules.HelipadRatio = .12; ^~~ src/game/ai.cpp:109:25: warning: conversion from 'double' to 'float' changes value from '1.2e-1' to '1.19999997e-1f' [-Wfloat-conversion] Rules.AirstripRatio = .12; ^~~ src/game/ai.cpp: In member function 'Uint32 ai::getDist(Uint32, Uint32)': src/game/ai.cpp:130:13: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] x = pos2%p::ccmap->getWidth(); ~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:131:13: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] y = pos2/p::ccmap->getWidth(); ~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:132:14: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] nx = pos1%p::ccmap->getWidth(); ~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:133:14: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ny = pos1/p::ccmap->getWidth(); ~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:135:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] xdiff = abs(x-nx); ~~~^~~~~~ src/game/ai.cpp:136:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ydiff = abs(y-ny); ~~~^~~~~~ src/game/ai.cpp: In member function 'Unit* ai::EnemyUnitInRange(int, Unit*, int)': src/game/ai.cpp:179:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] EnemyPlayer = p::ppool->getPlayer(i); ^ src/game/ai.cpp:181:34: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] MyPlayer = p::ppool->getPlayer(MyPlayerNumb); ^~~~~~~~~~~~ src/game/ai.cpp:191:44: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] EnemyNumbUnits = EnemyPlayer->getNumUnits(); ~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp: In member function 'Structure* ai::EnemyStructureInRange(int, Unit*, int)': src/game/ai.cpp:239:43: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] EnemyPlayer = p::ppool->getPlayer(i); ^ src/game/ai.cpp:241:40: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] MyPlayer = p::ppool->getPlayer(MyPlayerNumb); ^~~~~~~~~~~~ src/game/ai.cpp:252:57: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] EnemyNumbStructures = EnemyPlayer->getNumStructs(); ~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp: In member function 'Unit* ai::EnemyUnitInRange(int, Structure*, int)': src/game/ai.cpp:292:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] EnemyPlayer = p::ppool->getPlayer(i); ^ src/game/ai.cpp:294:34: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] MyPlayer = p::ppool->getPlayer(MyPlayerNumb); ^~~~~~~~~~~~ src/game/ai.cpp:304:44: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] EnemyNumbUnits = EnemyPlayer->getNumUnits(); ~~~~~~~~~~~~~~~~~~~~~~~~^~ In file included from src/game/triggers.cpp:8: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/game/ai.cpp: In member function 'unsigned int ai::FindClosesedTiberium(Unit*)': src/game/ai.cpp:333:29: warning: conversion from 'unsigned int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Distance = Unit->getDist(pos); ^~~ src/game/ai.cpp: In member function 'void ai::DefendUnits(Player*, int)': src/game/ai.cpp:359:33: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] NumbUnits = Player->getNumUnits(); ~~~~~~~~~~~~~~~~~~~^~ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/game/ai.cpp:385:102: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Enemy = (UnitOrStructure*) p::uspool->getGroundUnitAt ( EnemyUnit->getPos(), EnemyUnit->getSubpos() ); ~~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:388:99: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Enemy = (UnitOrStructure*) p::uspool->getFlyingAt ( EnemyUnit->getPos(), EnemyUnit->getSubpos() ); ~~~~~~~~~~~~~~~~~~~~^~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:391:102: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Enemy = (UnitOrStructure*) p::uspool->getStructureAt ( EnemyUnit->getPos(), EnemyUnit->getSubpos(), false ); ~~~~~~~~~~~~~~~~~~~~^~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp: In member function 'void ai::DefendStructures(Player*, int)': src/game/ai.cpp:426:40: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] NumbStructures = Player->getNumStructs(); ~~~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp: In member function 'bool ai::CanBuildAt(Uint8, const char*, Uint32)': src/game/ai.cpp:495:45: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] if (!p::ccmap->isBuildableAt(PlayerNumb, curpos)) ^~~~~~ src/game/ai.cpp: In member function 'bool ai::BuildStructure(Player*, int, const char*, Uint32)': src/game/ai.cpp:537:38: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pos = p::ccmap->translateToPos (x,y); ^ src/game/ai.cpp:537:40: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pos = p::ccmap->translateToPos (x,y); ^ src/game/ai.cpp:538:22: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (CanBuildAt (PlayerNumb, structname, pos) ){ ^~~~~~~~~~ src/game/ai.cpp:539:59: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (!p::dispatcher->structurePlace(structname, pos, PlayerNumb)) ^~~~~~~~~~ src/game/ai.cpp: In member function 'void ai::DefendComputerPlayerBaseUnderAttack(Player*, int, UnitOrStructure*, Structure*)': src/game/ai.cpp:578:36: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] NumbUnits = Player->getNumUnits(); ~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:594:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Distance = Unit->getDist(StructureUnderAttackPos); ^~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp: In member function 'void ai::DefendComputerPlayerUnitUnderAttack(Player*, int, UnitOrStructure*, Unit*)': src/game/ai.cpp:628:33: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] NumbUnits = Player->getNumUnits(); ~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:639:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Distance = Unit->getDist(UnitUnderAttackPos); ^~~~~~~~~~~~~~~~~~ src/game/ai.cpp: In member function 'void ai::Build(Player*, int)': src/game/ai.cpp:682:33: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] NumbUnits = Player->getNumUnits(); ~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:684:40: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] NumbStructures = Player->getNumStructs(); ~~~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:755:50: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Unit->move (p::ccmap->translateToPos(xpos + 20, ypos)); ~~~~~^~~~ src/game/ai.cpp:755:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Unit->move (p::ccmap->translateToPos(xpos + 20, ypos)); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/game/ai.cpp:757:50: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Unit->move (p::ccmap->translateToPos(xpos - 20, ypos)); ~~~~~^~~~ src/game/ai.cpp:757:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Unit->move (p::ccmap->translateToPos(xpos - 20, ypos)); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from src/include/playerpool.h:10, from src/include/graphicsengine.h:12, from src/game/game.cpp:13: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ src/game/ai.cpp:770:89: warning: conversion from 'int' to 'float' may change value [-Wconversion] if (!StructureWasBuild && (NumbOreRefs == 0 || ( NumbOreRefs < NumbStructures * Rules.RefineryRatio && NumbOreRefs < Rules.RefineryLimit))){ ^~~~~~~~~~~~~ src/game/ai.cpp:770:89: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'float' may change value [-Wconversion] src/game/ai.cpp:781:79: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'float' may change value [-Wconversion] if (!StructureWasBuild && (NumbWarfactorys == 0 || (NumbWarfactorys < Rules.WarRatio && NumbWarfactorys < Rules.WarLimit))){ ^~~~~~~~ src/game/ai.cpp:819:70: warning: conversion from 'int' to 'float' may change value [-Wconversion] if (!StructureWasBuild && (NumbTeslaCoils < NumbStructures * Rules.TeslaRatio && NumbTeslaCoils < Rules.TeslaLimit)){ ^~~~~~~~~~ src/game/ai.cpp:819:70: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'float' may change value [-Wconversion] src/game/ai.cpp:835:40: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (p::dispatcher->unitSpawn(type, PlayerNumb)) ^~~~~~~~~~ src/game/ai.cpp:846:40: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (p::dispatcher->unitSpawn(type, PlayerNumb)){ ^~~~~~~~~~ src/game/ai.cpp:862:41: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (p::dispatcher->unitSpawn(type, PlayerNumb)) ^~~~~~~~~~ src/game/ai.cpp:871:41: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (p::dispatcher->unitSpawn(type, PlayerNumb)) ^~~~~~~~~~ src/game/ai.cpp:880:41: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (p::dispatcher->unitSpawn(type, PlayerNumb)) ^~~~~~~~~~ src/game/ai.cpp:889:41: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (p::dispatcher->unitSpawn(type, PlayerNumb)) ^~~~~~~~~~ src/game/triggers.cpp: In function 'void ExecuteTriggerAction(unsigned int, Uint8, RA_Tiggers*)': src/game/triggers.cpp:659:27: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, char>::value_type' {aka 'char'} may change value [-Wconversion] TriggerName[j]=toupper(TriggerName[j]); ~~~~~~~^~~~~~~~~~~~~~~~ In file included from src/include/input.h:9, from src/game/game.cpp:14: src/include/selection.h: In member function 'Uint32 Selection::numbUnits() const': src/include/selection.h:35:52: warning: conversion from 'std::__cxx11::list::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 numbUnits() const {return sel_units.size();} ~~~~~~~~~~~~~~^~ In file included from src/game/game.cpp:18: src/include/sidebar.h: In member function 'Uint16 Sidebar::width()': src/include/sidebar.h:59:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return sbar->w; ~~~~~~^ src/game/ai.cpp: In member function 'void ai::patrolAndAttack(Player*, int)': src/game/ai.cpp:925:34: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] NumbUnits = Player->getNumUnits(); ~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:930:41: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] NumbStructures = Player->getNumStructs(); ~~~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:934:63: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] lPlayerNumbStructures = p::ppool->getLPlayer()->getNumStructs(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:936:56: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] lPlayerNumbUnits = p::ppool->getLPlayer()->getNumUnits(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:940:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] RndStr = (int) ((double)lPlayerNumbStructures*rand()/(RAND_MAX)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/ai.cpp:944:36: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] RndStr = lPlayerNumbStructures - RndStr; ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ src/game/ai.cpp:949:35: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] RndStr = lPlayerNumbStructures -1; ~~~~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:906:5: warning: variable 'NumbStructures' set but not used [-Wunused-but-set-variable] NumbStructures, ^~~~~~~~~~~~~~ src/game/ai.cpp: In member function 'void ai::guideAttack(Player*, int)': src/game/ai.cpp:1020:34: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] NumbUnits = Player->getNumUnits(); ~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:1025:41: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] NumbStructures = Player->getNumStructs(); ~~~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:1029:51: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] lPlayerNumbStructures = lPlayerStructurePool.size(); ~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:1031:41: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] lPlayerNumbUnits = lPlayerUnitPool.size(); ~~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp:999:5: warning: variable 'NumbStructures' set but not used [-Wunused-but-set-variable] NumbStructures, ^~~~~~~~~~~~~~ src/game/ai.cpp:1007:9: warning: variable 'StillMoving' set but not used [-Wunused-but-set-variable] bool StillMoving = false; ^~~~~~~~~~~ src/game/ai.cpp: In member function 'void ai::Harvest(Player*, int)': src/game/ai.cpp:1208:34: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] NumbUnits = Player->getNumUnits(); ~~~~~~~~~~~~~~~~~~~^~ src/game/ai.cpp: In member function 'void ai::handle()': src/game/ai.cpp:1269:35: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] CurPlayer = p::ppool->getPlayer(PlayerNumb); ^~~~~~~~~~ src/game/ai.cpp:1293:23: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'float' may change value [-Wconversion] if ((SDL_GetTicks() - LastGuideTickCount[PlayerNumb]) > Rules.PathDelay * 60 * 1000 ){ ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/game.cpp: In member function 'void Game::dumpstats()': src/game/game.cpp:463:15: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] h = uptime/3600; ~~~~~~^~~~~ src/game/game.cpp:465:15: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] m = uptime/60; ~~~~~~^~~ src/game/game.cpp:466:15: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] s = uptime%60; ~~~~~~^~~ c++ -o src/game/structure.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/structure.cpp c++ -o src/game/buildqueue.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/buildqueue.cpp c++ -o src/game/weaponspool.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/weaponspool.cpp src/game/triggers.cpp:583:47: warning: 'Waypoint' may be used uninitialized in this function [-Wmaybe-uninitialized] p::ppool->getLPlayer()->revealAroundWaypoint(Waypoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/game/unit.cpp:6: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ c++ -o src/game/unitandstructurepool.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/unitandstructurepool.cpp In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/unit.cpp:6: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/ccmap.h:11, from src/game/unit.cpp:6: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/game/unitanimations.cpp:2: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ src/game/ai.cpp: In member function 'unsigned int ai::FindClosesedTiberium(Unit*)': src/game/ai.cpp:341:9: warning: 'ClosesedPos' may be used uninitialized in this function [-Wmaybe-uninitialized] return ClosesedPos; ^~~~~~~~~~~ src/game/ai.cpp:334:17: warning: 'ClosesedDistance' may be used uninitialized in this function [-Wmaybe-uninitialized] if (Distance < ClosesedDistance || !FirstFound){ ~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from src/game/unit.cpp:6: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/game/unit.cpp:6: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/include/common.h:5, from src/include/unit.h:12, from src/include/path.h:8, from src/game/path.cpp:6: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/game/unit.cpp:6: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ c++ -o src/game/loadmap.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/game/loadmap.cpp src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/include/playerpool.h:10, from src/game/unit.cpp:9: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/game/unit.cpp:13: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from src/game/unit.cpp:15: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ In file included from src/game/unit.cpp:17: src/include/sidebar.h: In member function 'Uint16 Sidebar::width()': src/include/sidebar.h:59:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return sbar->w; ~~~~~~^ src/game/unit.cpp: In constructor 'UnitType::UnitType(const char*, INIFile*)': src/game/unit.cpp:65:32: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] unittype = unitini->readInt(tname, "unittype",0); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:70:33: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] numlayers = unitini->readInt(tname, "layers", 1); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:77:59: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] shpimage = new SHPImage(shpname.c_str(), mapscaleq); ^ In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/game/structureanims.cpp:2: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ src/game/unit.cpp:95:34: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] buildlevel = unitini->readInt(tname,"buildlevel",99); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:96:33: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] techlevel = unitini->readInt(tname,"techlevel",99); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:113:33: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] speed = (tmpspeed>4)?2:(7-tmpspeed); ~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/game/unit.cpp:114:35: warning: conversion from 'unsigned int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] movemod = (tmpspeed>4)?(tmpspeed-4):1; ~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/game/unit.cpp:121:33: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] speed = (tmpspeed>4)?2:(7-tmpspeed); ~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/game/unit.cpp:122:35: warning: conversion from 'unsigned int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] movemod = (tmpspeed>4)?(tmpspeed-4):1; ~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/game/unit.cpp:128:33: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] sight = unitini->readInt(tname, "sight", 3); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:131:33: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] sight = unitini->readInt(tname, "sight", 5); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:135:33: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maxhealth = unitini->readInt(tname, "health", 50); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:136:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cost = unitini->readInt(tname, "cost", 0); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/unit.cpp:146:33: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] turnspeed = (tmpspeed>4)?2:(7-tmpspeed); ~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/game/unit.cpp:147:31: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] turnmod = (tmpspeed>4)?(tmpspeed-4):1; ~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/game/unit.cpp:154:43: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] offset = (shpimage->getWidth()-24)>>1; ~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/game/unit.cpp:186:33: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] pipcolour = unitini->readInt(tname,"pipcolour",0); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:207:44: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.loopend = unitini->readInt(tname,"loopend",31); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:208:45: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.loopend2 = unitini->readInt(tname,"loopend2",0); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:210:46: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.animspeed = unitini->readInt(tname,"animspeed", 3); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:215:45: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.animtype = unitini->readInt(tname, "animtype", 0); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:216:45: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.sectype = unitini->readInt(tname, "sectype", 0); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/unit.cpp:218:45: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.dmgoff = unitini->readInt(tname, "dmgoff", ((shptnum[0]-1)>>1)); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/unit.cpp: In constructor 'Unit::Unit(UnitType*, Uint16, Uint8, InfantryGroup*, Uint8, Uint16, Uint8, Uint8, std::__cxx11::string)': src/game/unit.cpp:269:63: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] palettenum = (p::ppool->getStructpalNum(owner)<<11); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ src/game/unit.cpp:271:61: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] palettenum = (p::ppool->getUnitpalNum(owner)<<11); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ src/game/unit.cpp: In destructor 'virtual Unit::~Unit()': src/game/unit.cpp:362:73: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] p::uspool->createStructure(type->getDeployTarget(),calcDeployPos(),owner,(Uint16)(ratio*256.0f),0,true); ~~~~~~~~~~~~~^~ src/game/unit.cpp:324:6: warning: variable 'Tm' set but not used [-Wunused-but-set-variable] tm *Tm; ^~ src/game/unit.cpp: In member function 'unsigned int Unit::FindTiberium()': src/game/unit.cpp:397:29: warning: conversion from 'unsigned int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Distance = this->getDist(pos); ^~~ src/game/unit.cpp:413:30: warning: conversion from 'unsigned int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Distance = this->getDist(pos); ^~~ src/game/unit.cpp: In member function 'Uint8 Unit::getImageNums(Uint32**, Sint8**, Sint8**)': src/game/unit.cpp:448:33: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[i] = xoffset-type->getOffset(); ~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/unit.cpp:449:33: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[i] = yoffset-type->getOffset(); ~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/unit.cpp: In member function 'void Unit::ChangeHealth(Sint16)': src/game/unit.cpp:490:10: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] health += amount; ~~~~~~~^~~~~~~~~ src/game/unit.cpp: In member function 'void Unit::Harvest(Uint32, Structure*)': src/game/unit.cpp:624:15: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] this->move(pos, false); ^~~ src/game/unit.cpp: In member function 'bool Unit::Repair(Structure*)': src/game/unit.cpp:642:37: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] xpos += str->getType()->getXsize()/2 ; ^ src/game/unit.cpp:643:37: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ypos += str->getType()->getYsize()/2; ^ src/game/unit.cpp: In member function 'virtual void Unit::applyDamage(Sint16, Weapon*, UnitOrStructure*)': src/game/unit.cpp:742:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] health -= amount; ~~~~~~~^~~~~~~~~ src/game/unit.cpp: In member function 'bool Unit::checkDeployTarget(Uint32)': src/game/unit.cpp:808:69: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] if( type->getDeployType()->isBlocked(placeypos*typewidth+placexpos) ) { ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/game/unit.cpp:809:64: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] if (!p::ccmap->isBuildableAt(this->getOwner(), curpos,this)) { ^~~~~~ src/game/unit.cpp: In member function 'virtual void Unit::setImageNum(Uint32, Uint8)': src/game/unit.cpp:885:32: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer] = num | palettenum; ~~~~^~~~~~~~~~~~ src/game/unit.cpp: In member function 'virtual Sint8 Unit::getXoffset() const': src/game/unit.cpp:895:23: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] return xoffset-type->getOffset(); ~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/unit.cpp: In member function 'virtual Sint8 Unit::getYoffset() const': src/game/unit.cpp:904:23: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] return yoffset-type->getOffset(); ~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/unit.cpp: In member function 'Uint16 Unit::getDist(Uint16)': src/game/unit.cpp:934:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] xdiff = abs(x-nx); ~~~^~~~~~ src/game/unit.cpp:935:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ydiff = abs(y-ny); ~~~^~~~~~ src/game/unit.cpp:937:12: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return (Uint32) sqrt (xdiff*xdiff+ydiff*ydiff); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/include/common.h:5, from src/include/buildqueue.h:7, from src/game/buildqueue.cpp:5: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/structure.h:9, from src/include/unitanimations.h:8, from src/include/unit.h:15, from src/include/path.h:8, from src/game/path.cpp:6: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/unitanimations.h:8, from src/include/unit.h:15, from src/include/path.h:8, from src/game/path.cpp:6: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/common.h:5, from src/game/weaponspool.cpp:3: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ src/game/ai.cpp: In member function 'void ai::patrolAndAttack(Player*, int)': src/game/ai.cpp:987:18: warning: 'target' may be used uninitialized in this function [-Wmaybe-uninitialized] Unit->attack(target); ~~~~~~~~~~~~^~~~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/unitanimations.cpp:2: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/ccmap.h:11, from src/game/unitanimations.cpp:2: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/playerpool.h:10, from src/include/ai.h:8, from src/include/unit.h:17, from src/include/path.h:8, from src/game/path.cpp:6: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/structureanims.cpp:2: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/path.h:8, from src/game/path.cpp:6: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/game/structure.cpp:3: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/game/unitanimations.cpp:2: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/game/unitanimations.cpp:2: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/game/unitanimations.cpp:2: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/include/ccmap.h:11, from src/game/structureanims.cpp:2: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/game/path.cpp:11: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/game/path.cpp:11: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/game/path.cpp:11: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ src/game/path.cpp: In constructor 'Path::Path(Unit*, Uint32, Uint32, Uint8)': src/game/path.cpp:77:42: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 mapsize = p::ccmap->getWidth()*p::ccmap->getHeight(); ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ src/game/path.cpp:102:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] diffx = abs( startposx - stopposx ); ~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/game/path.cpp:103:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] diffy = abs( startposy - stopposy ); ~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/game/path.cpp:142:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ncrY = crY-1; ~~~^~ src/game/path.cpp:144:49: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dwCost = cellTempU->g + p::ccmap->getCost(crV, Unit)*10; ^~~ src/game/path.cpp:151:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ncrX = crX+1; ~~~^~ src/game/path.cpp:152:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ncrY = crY-1; ~~~^~ src/game/path.cpp:154:49: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dwCost = cellTempU->g + p::ccmap->getCost(crV, Unit)*14; ^~~ src/game/path.cpp:162:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ncrX = crX+1; ~~~^~ src/game/path.cpp:164:49: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dwCost = cellTempU->g + p::ccmap->getCost(crV, Unit)*10; ^~~ src/game/path.cpp:171:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ncrX = crX+1; ~~~^~ src/game/path.cpp:172:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ncrY = crY+1; ~~~^~ src/game/path.cpp:174:49: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dwCost = cellTempU->g + p::ccmap->getCost(crV, Unit)*14; ^~~ src/game/path.cpp:182:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ncrY = crY+1; ~~~^~ src/game/path.cpp:184:49: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dwCost = cellTempU->g + p::ccmap->getCost(crV, Unit)*10; ^~~ src/game/path.cpp:191:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ncrX = crX-1; ~~~^~ src/game/path.cpp:192:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ncrY = crY+1; ~~~^~ src/game/path.cpp:194:49: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dwCost = cellTempU->g + p::ccmap->getCost(crV, Unit)*14; ^~~ In file included from src/game/structureanims.cpp:2: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ src/game/path.cpp:202:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ncrX = crX-1; ~~~^~ In file included from src/include/ccmap.h:10, from src/game/structureanims.cpp:2: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ src/game/path.cpp:204:49: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dwCost = cellTempU->g + p::ccmap->getCost(crV, Unit)*10; ^~~ src/game/path.cpp:211:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ncrX = crX-1; ~~~^~ src/game/path.cpp:212:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ncrY = crY-1; ~~~^~ src/game/path.cpp:214:49: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dwCost = cellTempU->g + p::ccmap->getCost(crV, Unit)*14; ^~~ In file included from src/game/structureanims.cpp:2: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/game/path.cpp:249:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] diffx = abs( ncrX - stopposx ); ~~~^~~~~~~~~~~~~~~~~~~ src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/game/path.cpp:250:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] diffy = abs( ncrY - stopposy ); ~~~^~~~~~~~~~~~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/game/path.cpp:299:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation] for( i = 0; i < mapsize; i++ ) ^~~ src/game/path.cpp:307:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for' if (Nodes != NULL) ^~ src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/include/playerpool.h:10, from src/include/ai.h:8, from src/include/unit.h:17, from src/include/path.h:8, from src/game/unitanimations.cpp:5: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/include/playerpool.h:10, from src/game/structureanims.cpp:4: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/include/structure.h:9, from src/game/weaponspool.cpp:9: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/game/weaponspool.cpp:9: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/path.h:8, from src/game/unitanimations.cpp:5: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/structure.cpp:3: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/game/unitanimations.cpp:8: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ src/game/unitanimations.cpp: In member function 'virtual void MoveAnimEvent::run()': src/game/unitanimations.cpp:101:49: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] path = new Path(un, un->getPos(), dest, range); ^~~~~ src/game/unitanimations.cpp:122:17: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] un->xoffset += xmod; ~~~~~~~~~~~~^~~~~~~ src/game/unitanimations.cpp:123:17: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] un->yoffset += ymod; ~~~~~~~~~~~~^~~~~~~ src/game/unitanimations.cpp:135:23: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] un->xoffset = -un->xoffset; ^~~~~~~~~~~~ src/game/unitanimations.cpp:136:23: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] un->yoffset = -un->yoffset; ^~~~~~~~~~~~ src/game/unitanimations.cpp:139:25: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] un->xoffset += uxoff; ~~~~~~~~~~~~^~~~~~~~ src/game/unitanimations.cpp:140:25: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] un->yoffset += uyoff; ~~~~~~~~~~~~^~~~~~~~ src/game/unitanimations.cpp: In member function 'void MoveAnimEvent::startMoveOne(bool)': src/game/unitanimations.cpp:192:49: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] path = new Path(un, un->getPos(), dest, range); ^~~~~ src/game/unitanimations.cpp:230:52: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] face = ((Sint8)((loopend+1)*(8-path->top())/8))&loopend; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ src/game/unitanimations.cpp:254:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 curface = (un->getImageNum(0)&loopend); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~ src/game/unitanimations.cpp:255:42: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 delta = (abs(curface-face))&loopend; ~~~~~~~~~~~~~~~~~~~^~~~~~~~ src/game/unitanimations.cpp: In member function 'void MoveAnimEvent::moveDone()': src/game/unitanimations.cpp:294:49: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] path = new Path(un, un->getPos(), dest, range); ^~~~~ src/game/unitanimations.cpp:303:53: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] path = new Path(un, un->getPos(), dest, range); ^~~~~ src/game/unitanimations.cpp: In member function 'virtual void WalkAnimEvent::run()': src/game/unitanimations.cpp:701:31: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] layerface = baseimage + istep; ~~~~~~~~~~^~~~~~~ src/game/unitanimations.cpp:703:28: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] istep = (istep + 1)%6; ~~~~~~~~~~~^~ src/game/unitanimations.cpp: In member function 'void WalkAnimEvent::calcbaseimage()': src/game/unitanimations.cpp:716:20: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] baseimage = 16 + 3*(dir/2); ~~~^~~~~~~~~~~ src/game/unitanimations.cpp: In constructor 'TurnAnimEvent::TurnAnimEvent(Uint32, Unit*, Uint8, Uint8)': src/game/unitanimations.cpp:731:39: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] layerface = un->getImageNum(layer)&loopend; ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ src/game/unitanimations.cpp:737:19: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] turnmod = -(((UnitType *)un->getType())->getTurnMod()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/unitanimations.cpp: In member function 'virtual void TurnAnimEvent::run()': src/game/unitanimations.cpp:769:39: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] layerface = un->getImageNum(layer)&loopend; ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ src/game/unitanimations.cpp:771:19: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] layerface += turnmod; ~~~~~~~~~~^~~~~~~~~~ In file included from src/include/ccmap.h:9, from src/game/unitanimations.cpp:2: src/game/unitanimations.cpp: In member function 'virtual void UAttackAnimEvent::run()': src/include/common.h:114:16: warning: conversion from 'double' to 'float' changes value from '-1.5707963267948966e+0' to '-1.57079637e+0f' [-Wfloat-conversion] #define M_PI_2 1.57079632679489661923 ^~~~~~~~~~~~~~~~~~~~~~ src/game/unitanimations.cpp:935:22: note: in expansion of macro 'M_PI_2' alpha = -M_PI_2; ^~~~~~ src/include/common.h:114:16: warning: conversion from 'double' to 'float' changes value from '1.5707963267948966e+0' to '1.57079637e+0f' [-Wfloat-conversion] #define M_PI_2 1.57079632679489661923 ^~~~~~~~~~~~~~~~~~~~~~ src/game/unitanimations.cpp:937:21: note: in expansion of macro 'M_PI_2' alpha = M_PI_2; ^~~~~~ src/game/unitanimations.cpp:940:21: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] alpha = atan((float)ytiles/(float)xtiles); ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/unitanimations.cpp:942:25: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] alpha = M_PI+alpha; src/game/unitanimations.cpp:946:56: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] facing = ((Sint8)((loopend2+1)*(1-alpha/2/M_PI)+8))&loopend2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ src/game/unitanimations.cpp:970:30: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses] if (abs((int)(facing - un->getImageNum(0)&loopend2)) > un->type->getROT()) { ~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/game/unitanimations.cpp:991:101: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] un->type->getWeapon(UsePrimaryWeapon)->fire(un, target->getBPos(un->getPos()), target->getSubpos()); ~~~~~~~~~~~~~~~~~^~ src/game/unitanimations.cpp: In constructor 'UHarvestEvent::UHarvestEvent(Uint32, Unit*)': src/game/unitanimations.cpp:1020:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] un->GetResourceType (i, &ResourceTypes[i]); ^ In file included from src/include/ccmap.h:11, from src/game/structure.cpp:3: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~src/game/unitanimations.cpp: In member function 'int UHarvestEvent::GetBaseRefineryPos()': src/game/unitanimations.cpp:1083:4: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] y += 2; ~~^~~~ src/game/unitanimations.cpp:1084:38: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] temppos = p::ccmap->translateToPos(x+xdiv, y); ~^~~~~ src/game/unitanimations.cpp:1087:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] while ( p::ccmap->getCost(temppos, un) > 4 && y < p::ccmap->getHeight() && un->getPos() != temppos ){ ^~~~~~~ src/game/unitanimations.cpp:1091:6: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] y += 1; ~~^~~~ src/game/unitanimations.cpp:1095:39: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] temppos = p::ccmap->translateToPos(x+xdiv, y); ~^~~~~ src/game/unitanimations.cpp: In member function 'virtual void UHarvestEvent::run()': src/game/unitanimations.cpp:1145:12: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] un->move(MoveTargePos, false); ^~~~~~~~~~~~ src/game/unitanimations.cpp:1174:46: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if (p::uspool->cellOccupied(MoveTargePos) && un->getPos() != MoveTargePos || RetryMoveCounter > 2){ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/unitanimations.cpp:1178:13: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] un->move(MoveTargePos, false); ^~~~~~~~~~~~ src/game/unitanimations.cpp:1200:63: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] un->setImageNum(32+(facing*8) + index, NumbLayers - 1); ~~~~~~~~~~~^~~ src/game/unitanimations.cpp:1231:45: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] un->move(this->GetBaseRefineryPos (), false); ~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/unitanimations.cpp:1257:50: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] un->setImageNum(32+(8*8) + index, NumbLayers - 1); ~~~~~~~~~~~^~~ src/game/unitanimations.cpp:1261:42: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] un->setImageNum(OrgImage, NumbLayers - 1); ~~~~~~~~~~~^~~ ~~ In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/game/unitandstructurepool.cpp:4: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ c++ -o src/video/imagecache.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/imagecache.cpp In file included from src/include/playerpool.h:10, from src/include/ai.h:8, from src/include/unit.h:17, from src/game/weaponspool.cpp:10: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/game/weaponspool.cpp:10: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from src/include/playerpool.h:10, from src/game/buildqueue.cpp:8: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/game/structureanims.cpp:8: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from src/include/unitandstructurepool.h:10, from src/game/weaponspool.cpp:11: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/include/unitandstructurepool.h:10, from src/game/weaponspool.cpp:11: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/include/unitandstructurepool.h:10, from src/game/weaponspool.cpp:11: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/game/structure.cpp:3: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/include/unitandstructurepool.h:10, from src/game/buildqueue.cpp:9: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/ccmap.h:11, from src/include/unitandstructurepool.h:10, from src/game/buildqueue.cpp:9: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/unitandstructurepool.cpp:4: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/ccmap.h:10, from src/game/structure.cpp:3: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/game/structure.cpp:3: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/game/loadmap.cpp:5: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/game/weaponspool.cpp:11: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ src/game/weaponspool.cpp: In constructor 'Warhead::Warhead(const char*, INIFile*)': src/game/weaponspool.cpp:32:47: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] explosionimage = pc::imagepool->size()<<16; ~~~~~~~~~~~~~~~~~~~~~^~~~ src/game/weaponspool.cpp:34:51: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] temp = new SHPImage(tmpname, mapscaleq); ^ src/game/weaponspool.cpp:42:42: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] explosionanimsteps = temp->getNumImg(); ~~~~~~~~~~~~~~~^~ src/game/weaponspool.cpp: In constructor 'Projectile::Projectile(const char*, INIFile*)': src/game/weaponspool.cpp:86:41: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] imagenum = pc::imagepool->size()<<16; ~~~~~~~~~~~~~~~~~~~~~^~~~ src/game/weaponspool.cpp:88:49: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] temp = new SHPImage(iname, mapscaleq); ^ src/game/weaponspool.cpp:98:35: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] rotationimgs = temp->getNumImg(); ~~~~~~~~~~~~~~~^~ In file included from src/include/ccmap.h:11, from src/game/unitandstructurepool.cpp:4: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/playerpool.h:10, from src/game/structure.cpp:7: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/include/unitandstructurepool.h:10, from src/game/buildqueue.cpp:9: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/include/unitandstructurepool.h:10, from src/game/buildqueue.cpp:9: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/include/unitandstructurepool.h:10, from src/game/buildqueue.cpp:9: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ src/game/weaponspool.cpp: In constructor 'Weapon::Weapon(const char*)': src/game/weaponspool.cpp:154:23: warning: conversion from 'int' to 'char' may change value [-Wconversion] *p++ = toupper(*p); ~~~~~~~^~~~ src/game/weaponspool.cpp:165:23: warning: conversion from 'int' to 'char' may change value [-Wconversion] *p++ = toupper(*p); ~~~~~~~^~~~ src/game/weaponspool.cpp:205:35: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] speed = weapini->readInt(wname, "speed", 100); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/weaponspool.cpp:206:35: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] range = weapini->readInt(wname, "range", 4); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/game/weaponspool.cpp:207:35: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] reloadtime = weapini->readInt(wname, "reloadtime", 50); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ src/game/weaponspool.cpp:208:35: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] damage = weapini->readInt(wname, "damage", 10); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/weaponspool.cpp:209:35: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] burst = weapini->readInt(wname, "burst", 1); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/game/weaponspool.cpp:213:40: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] fireimage = pc::imagepool->size()<<16; ~~~~~~~~~~~~~~~~~~~~~^~~~ src/game/weaponspool.cpp:227:34: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] fuel = weapini->readInt(wname, "fuel", 0); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/weaponspool.cpp:228:34: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] seekfuel = weapini->readInt(wname, "seekfuel", 0); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ src/game/weaponspool.cpp:241:59: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] fireanimtemp = new SHPImage(faimage, mapscaleq); ^ src/game/weaponspool.cpp:247:48: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] numfireimages = fireanimtemp->getNumImg(); ~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/weaponspool.cpp:248:45: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] numfiredirections = weapini->readInt(faname, "directions", 1); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ src/game/weaponspool.cpp:262:71: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] fireanimtemp = new SHPImage(faimage, mapscaleq); ^ src/game/weaponspool.cpp:266:59: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] fireimages[i-1]=(pc::imagepool->size()<<16); ~~~~~~~~~~~~~~~~~~~~~~^~~~~ src/game/weaponspool.cpp:267:62: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] numfireimages += fireanimtemp->getNumImg(); ^ src/game/weaponspool.cpp: In member function 'void Weapon::fire(UnitOrStructure*, Uint16, Uint8)': src/game/weaponspool.cpp:312:20: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] facing >>= 2; ~~~~~~~^~~~~ In file included from src/game/structure.cpp:11: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ In file included from src/game/unitandstructurepool.cpp:4: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/game/unitandstructurepool.cpp:4: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/game/unitandstructurepool.cpp:4: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/game/buildqueue.cpp:9: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ In file included from src/game/structureanims.cpp:9: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ src/game/structureanims.cpp: In member function 'virtual void BuildingAnimEvent::updateDamaged()': src/game/structureanims.cpp:128:58: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] anim_data.damagedelta = getaniminfo().loopend+1; ~~~~~~~~~~~~~~~~~~~~~^~ src/game/structureanims.cpp:130:64: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] anim_data.damagedelta2 = getaniminfo().loopend2+1; ~~~~~~~~~~~~~~~~~~~~~~^~ c++ -o src/video/shpimage.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/shpimage.cpp src/game/structureanims.cpp: In constructor 'BuildAnimEvent::BuildAnimEvent(Uint32, Structure*, bool)': src/game/structureanims.cpp:146:26: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] framend = getaniminfo().makenum; ~~~~~~~~~~~~~~^~~~~~~ src/game/structureanims.cpp:147:15: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] frame = (sell?(framend-1):1); ~~~~~^~~~~~~~~~~~~~~ src/game/structureanims.cpp: In member function 'virtual void RepairAnimEvent::anim_func(anim_nfo*)': src/game/structureanims.cpp:227:43: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] data->frame0 = structure->getRealImageNum(0); //(structure->getImageNums()[0]&0x7FF /*0x1f*/); //structure->getImageNum(0)&0x7FF; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/game/structureanims.cpp:236:13: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dmg_cost -= cost; ~~~~~~~~~^~~~~~~ src/game/structureanims.cpp:268:34: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] data->frame0 -= getaniminfo().dmgoff; ^~~~~~ src/game/structureanims.cpp: In member function 'virtual void LoopAnimEvent::anim_func(anim_nfo*)': src/game/structureanims.cpp:299:23: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] frame = data->damagedelta; ~~~~~~^~~~~~~~~~~ src/game/structureanims.cpp: In member function 'virtual void ProcAnimEvent::anim_func(anim_nfo*)': src/game/structureanims.cpp:316:23: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] frame = data->damagedelta; ~~~~~~^~~~~~~~~~~ src/game/structureanims.cpp: In member function 'virtual void ProcAnimEvent::updateDamaged()': src/game/structureanims.cpp:326:19: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] frame += 30; ~~~~~~^~~~~ src/game/structureanims.cpp: In constructor 'BTurnAnimEvent::BTurnAnimEvent(Uint32, Structure*, Uint8)': src/game/structureanims.cpp:337:34: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] layerface = str->getRealImageNum(0); ~~~~~~~~~~~~~~~~~~~~^~~ src/game/structureanims.cpp: In member function 'virtual void BTurnAnimEvent::anim_func(anim_nfo*)': src/game/structureanims.cpp:356:19: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] layerface += turnmod; ~~~~~~~~~~^~~~~~~~~~ src/game/structureanims.cpp:361:29: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] data->frame0 = layerface+data->damagedelta; ~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/structureanims.cpp: In member function 'virtual void DoorAnimEvent::updateDamaged()': src/game/structureanims.cpp:430:44: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] framestart = getaniminfo().loopend2+1; ~~~~~~~~~~~~~~~~~~~~~~^~ src/game/structureanims.cpp:431:29: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] framend = framestart+getaniminfo().loopend2; ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ src/game/structureanims.cpp:433:19: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] frame += framestart; ~~~~~~^~~~~~~~~~~~~ src/game/structureanims.cpp:439:24: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] frame0 = anim_data.damagedelta; ~~~~~~~~~~^~~~~~~~~~~ src/game/structureanims.cpp: In member function 'virtual void RefineAnimEvent::updateDamaged()': src/game/structureanims.cpp:473:36: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] frame += getaniminfo().dmgoff; ^~~~~~ src/game/structureanims.cpp:476:41: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] framestart = getaniminfo().loopend+1+anim_data.damagedelta; ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ src/game/structureanims.cpp:477:26: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] framend = framestart + 17; // fixme: avoid hardcoded values ~~~~~~~~~~~^~~~ src/game/structureanims.cpp: In destructor 'virtual BAttackAnimEvent::~BAttackAnimEvent()': src/game/structureanims.cpp:496:17: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] frame = StartFrame; ^~~~~~~~~~ In file included from src/include/ccmap.h:9, from src/game/structureanims.cpp:2: src/game/structureanims.cpp: In member function 'virtual void BAttackAnimEvent::run()': src/include/common.h:114:16: warning: conversion from 'double' to 'float' changes value from '-1.5707963267948966e+0' to '-1.57079637e+0f' [-Wfloat-conversion] #define M_PI_2 1.57079632679489661923 ^~~~~~~~~~~~~~~~~~~~~~ src/game/structureanims.cpp:560:22: note: in expansion of macro 'M_PI_2' alpha = -M_PI_2; ^~~~~~ src/include/common.h:114:16: warning: conversion from 'double' to 'float' changes value from '1.5707963267948966e+0' to '1.57079637e+0f' [-Wfloat-conversion] #define M_PI_2 1.57079632679489661923 ^~~~~~~~~~~~~~~~~~~~~~ src/game/structureanims.cpp:562:21: note: in expansion of macro 'M_PI_2' alpha = M_PI_2; ^~~~~~ src/game/structureanims.cpp:565:21: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] alpha = atan((float)ytiles/(float)xtiles); ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/structureanims.cpp:567:25: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] alpha = M_PI+alpha; src/game/structureanims.cpp:586:25: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] frame = StartFrame; ^~~~~~~~~~ src/game/structureanims.cpp:602:17: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] frame = StartFrame; ^~~~~~~~~~ src/game/structureanims.cpp:612:94: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] strct->type->getWeapon()->fire(strct, target->getBPos(strct->getPos()), target->getSubpos()); ~~~~~~~~~~~~~~~~~^~ src/game/structureanims.cpp: In constructor 'BExplodeAnimEvent::BExplodeAnimEvent(Uint32, Structure*)': src/game/structureanims.cpp:629:47: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] lastframe = getType()->getSHPTNum()[0]-1; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/structureanims.cpp: In member function 'virtual void BRepairUnitAnimEvent::run()': src/game/structureanims.cpp:730:13: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dmg_cost -= cost; ~~~~~~~~~^~~~~~~ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/buildqueue.cpp: In member function 'bool BuildQueue::BQueue::tick()': src/game/buildqueue.cpp:223:22: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 delta = min((p::aequeue->getCurtick()-last)/buildspeed, left); ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/buildqueue.cpp: In member function 'ConStatus BuildQueue::BQueue::getStatus(const UnitOrStructureType*, Uint8*, Uint8*) const': src/game/buildqueue.cpp:288:52: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *progress = 100*(it->first->getCost()-left)/getCurrentType()->getCost(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/include/playerpool.h:10, from src/game/unitandstructurepool.cpp:9: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ c++ -o src/video/sdllayer.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/sdllayer.cpp In file included from src/game/structure.cpp:12: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ src/game/structure.cpp: In constructor 'StructureType::StructureType(const char*, INIFile*, INIFile*, const char*)': src/game/structure.cpp:83:28: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] xsize = artini->readInt(tname, "xsize",1); ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/structure.cpp:84:28: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] ysize = artini->readInt(tname, "ysize",1); ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/structure.cpp:96:25: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint8' {aka 'signed char'} may change value [-Wconversion] xoffset = -(i%xsize)*24; ~~~~~~~~~~^~~ src/game/structure.cpp:97:25: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint8' {aka 'signed char'} may change value [-Wconversion] yoffset = -(i/xsize)*24; ~~~~~~~~~~^~~ src/game/structure.cpp:99:16: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] blckoff = i; ^ src/game/structure.cpp:104:25: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint8' {aka 'signed char'} may change value [-Wconversion] xoffset = -(i%xsize)*24; ~~~~~~~~~~^~~ src/game/structure.cpp:105:25: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint8' {aka 'signed char'} may change value [-Wconversion] yoffset = -(i/xsize)*24; ~~~~~~~~~~^~~ src/game/structure.cpp:107:16: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] blckoff = i; ^ src/game/structure.cpp:121:33: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] numshps = structini->readInt(tname, "layers",1); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:126:36: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] buildlevel = structini->readInt(tname,"buildlevel",100); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:127:35: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] techlevel = structini->readInt(tname,"techlevel",99); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:132:41: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] powerinfo.power = structini->readInt(tname,"power",0); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/game/structure.cpp:133:41: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] powerinfo.drain = structini->readInt(tname,"drain",0); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/game/structure.cpp:135:35: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maxhealth = structini->readInt(tname,"health",100); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:170:55: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] shpimage = new SHPImage(shpname, mapscaleq); ^ src/game/structure.cpp:175:59: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] shpimage = new SHPImage(shpname, mapscaleq); ^ src/game/structure.cpp:182:41: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] shpnums[i] = pc::imagepool->size(); ~~~~~~~~~~~~~~~~~~~^~ src/game/structure.cpp:188:46: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.loopend = structini->readInt(tname,"loopend",0); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:189:47: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.loopend2 = structini->readInt(tname,"loopend2",0); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:191:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.animspeed = structini->readInt(tname,"animspeed", 3); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:196:47: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.animtype = structini->readInt(tname, "animtype", 0); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:197:47: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.sectype = structini->readInt(tname, "sectype", 0); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:199:47: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.dmgoff = structini->readInt(tname, "dmgoff", ((shptnum[0])>>1)); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:201:50: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] animinfo.dmgoff2 = structini->readInt(tname, "dmgoff2", (shptnum[1]>>1)); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:205:47: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] defaultface = structini->readInt(tname, "defaultface", 0); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:213:56: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] makeimage = new SHPImage(shpname, mapscaleq); ^ src/game/structure.cpp:214:42: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] makeimg = pc::imagepool->size(); ~~~~~~~~~~~~~~~~~~~^~ src/game/structure.cpp:240:43: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] turnspeed = structini->readInt(tname,"rot",3); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/game/structure.cpp:243:43: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] numwalllevels = structini->readInt(tname,"levels",1); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/structure.cpp:248:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cost = structini->readInt(tname, "cost", 0); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/structure.cpp: In constructor 'Structure::Structure(StructureType*, Uint16, Uint8, Uint16, Uint8, std::__cxx11::string)': src/game/structure.cpp:322:69: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[i] |= (p::ppool->getStructpalNum(owner)<<11); ^ src/game/structure.cpp:328:64: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] bcellpos = cellpos+(type->getBlckOff() % type->getXsize()) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ((type->getBlckOff()/type->getXsize())*p::ccmap->getWidth()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:346:5: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] y += 2; ~~^~~~ src/game/structure.cpp:348:54: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] while ( !p::ccmap->isBuildableAt(this->getOwner(), temppos) && y < p::ccmap->getHeight() ){ ^~~~~~~ In file included from src/game/unitandstructurepool.cpp:11: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/game/structure.cpp:349:6: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] y += 1; ~~^~~~ src/game/structure.cpp:353:49: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] if (p::ccmap->isBuildableAt(this->getOwner(), temppos)){ ^~~~~~~ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/game/structure.cpp:355:68: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] p::uspool->createUnit(this->type->getDeployWith()[j]/*"HARV"*/, temppos, 0, owner, 256, 0); ^~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp: In member function 'virtual Uint16 Structure::getBPos(Uint16) const': src/game/structure.cpp:394:16: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] x = cellpos%mwid; ~~~~~~~^~~~~ src/game/structure.cpp:397:17: warning: conversion from 'unsigned int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dx = min((unsigned)(type->getXsize()-1),(unsigned)((pos%mwid)-x)-1); ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:399:16: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] y = cellpos/mwid; ~~~~~~~^~~~~ src/game/structure.cpp:402:17: warning: conversion from 'unsigned int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dy = min((unsigned)(type->getYsize()-1),(unsigned)((pos/mwid)-y)-1); ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:404:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] retpos = (x+dx)+(y+dy)*mwid; ~~~~~~^~~~~~~~~~~~ src/game/structure.cpp:406:11: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] sc = x+y*mwid; ~^~~~~~~ src/game/structure.cpp:407:27: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dw = type->getXsize() - mwid; ~~~~~~~~~~~~~~~~~^~~~~~ src/game/structure.cpp:408:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] bpos = retpos - sc + dy*dw; ~~~~~~~~~~~~^~~~~~~ src/game/structure.cpp:409:31: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] while (!type->isBlocked(dx+dy*type->getXsize())) { ~~^~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:420:31: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] retpos = (x+t)+(y+dy)*mwid; ~~~~~^~~~~~~~~~~~ src/game/structure.cpp:421:38: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] bpos = retpos - sc + dy*dw; ~~~~~~~~~~~~^~~~~~~ src/game/structure.cpp:428:31: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] retpos = (x+t)+(y+dy)*mwid; ~~~~~^~~~~~~~~~~~ src/game/structure.cpp:429:38: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] bpos = retpos - sc + dy*dw; ~~~~~~~~~~~~^~~~~~~ src/game/structure.cpp:439:24: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] retpos = (x+dx)+(y+dy)*mwid; ~~~~~~^~~~~~~~~~~~ src/game/structure.cpp: In member function 'Uint16 Structure::getFreePos(Uint8*, bool)': src/game/structure.cpp:476:7: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] y += ysize; // bottom left of building ~~^~~~~~~~ src/game/structure.cpp:487:40: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] curpos = p::ccmap->translateToPos(x+1,y-1); ~^~ src/game/structure.cpp:487:44: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] curpos = p::ccmap->translateToPos(x+1,y-1); ~^~ src/game/structure.cpp:487:38: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] curpos = p::ccmap->translateToPos(x+1,y-1); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ src/game/structure.cpp:493:38: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] curpos = p::ccmap->translateToPos(x,y); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ src/game/structure.cpp:502:42: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] curpos = p::ccmap->translateToPos(x, y); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ src/game/structure.cpp:509:42: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] curpos = p::ccmap->translateToPos(x, y); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ src/game/structure.cpp:515:42: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] curpos = p::ccmap->translateToPos(x, y); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ src/game/structure.cpp:521:42: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] curpos = p::ccmap->translateToPos(x, y); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ src/game/structure.cpp: In member function 'void Structure::runAnim(Uint32)': src/game/structure.cpp:676:53: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] buildAnim = new BTurnAnimEvent(speed,this,(mode>>4)); ~~~~~^~~~ src/game/structure.cpp: In member function 'void Structure::runSecAnim(Uint32, bool)': src/game/structure.cpp:726:56: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] sec_anim = new RefineAnimEvent(2,this,param); ^ src/game/structure.cpp: In member function 'virtual void Structure::applyDamage(Sint16, Weapon*, UnitOrStructure*)': src/game/structure.cpp:815:10: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] health -= amount; ~~~~~~~^~~~~~~~~ src/game/structure.cpp: In member function 'void Structure::ChangeHealth(Sint16)': src/game/structure.cpp:882:10: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] health += amount; ~~~~~~~^~~~~~~~~ src/game/structure.cpp: In member function 'virtual void Structure::setImageNum(Uint32, Uint8)': src/game/structure.cpp:1030:28: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]=(num)|(p::ppool->getStructpalNum(owner)<<11); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/game/loadmap.cpp:5: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/game/unitandstructurepool.cpp:13: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ In file included from src/include/ccmap.h:11, from src/game/loadmap.cpp:5: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ src/game/unitandstructurepool.cpp: In member function 'bool UnitAndStructurePool::getUnitOrStructureLimAt(Uint32, float*, float*, Uint32*, Uint8*, Uint8*, Uint8*, bool*)': src/game/unitandstructurepool.cpp:287:23: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (igrp->UnitAt(i) != NULL) ^ src/game/unitandstructurepool.cpp:288:15: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *igroup |= 1<getBPos(curpos); ^~~~~~ src/game/unitandstructurepool.cpp:327:23: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (igrp->UnitAt(i) != NULL) ^ src/game/unitandstructurepool.cpp:328:15: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *igroup |= 1<::mapped_type' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] numentries = numl2images[pos]; ^ src/game/unitandstructurepool.cpp: In member function 'std::multimap::iterator UnitAndStructurePool::addL2overlay(Uint16, L2Overlay*)': src/game/unitandstructurepool.cpp:371:26: warning: conversion from 'int' to 'std::map::mapped_type' {aka 'short unsigned int'} may change value [-Wconversion] numl2images[cellpos] += ov->numimages; src/game/unitandstructurepool.cpp: In member function 'void UnitAndStructurePool::removeL2overlay(std::multimap::iterator)': src/game/unitandstructurepool.cpp:382:24: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'std::map::key_type' {aka 'short unsigned int'} may change value [-Wconversion] numl2images[cellpos] -= entry->second->numimages; ^ src/game/unitandstructurepool.cpp:382:44: warning: conversion from 'int' to 'std::map::mapped_type' {aka 'short unsigned int'} may change value [-Wconversion] numl2images[cellpos] -= entry->second->numimages; ^~~~~~~~~ src/game/unitandstructurepool.cpp:384:21: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'std::multimap::key_type' {aka 'short unsigned int'} may change value [-Wconversion] if( l2pool.find(cellpos) == l2pool.end() ) { ^~~~~~~ src/game/unitandstructurepool.cpp: In member function 'bool UnitAndStructurePool::createStructure(StructureType*, Uint16, Uint8, Uint16, Uint8, bool, std::__cxx11::string)': src/game/unitandstructurepool.cpp:429:39: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] structnum = structurepool.size(); ~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:439:34: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] structnum = structurepool.size(); ~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:443:45: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] unitandstructmat[cellpos].structurenumb = structnum; ^~~~~~~~~ src/game/unitandstructurepool.cpp:450:55: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] if (type->isBlocked(y*type->getXsize()+x)) { ~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:473:55: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] if (type->isBlocked(y*type->getXsize()+x)) { ~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:477:37: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] structnum = structurepool.size(); ~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:481:44: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] if (type->isBlocked(y*type->getXsize()+x) == 2) { ~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:483:50: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] unitandstructmat[curpos+x].structurenumb = structnum; ^~~~~~~~~ src/game/unitandstructurepool.cpp:487:50: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] unitandstructmat[curpos+x].structurenumb = structnum; ^~~~~~~~~ src/game/unitandstructurepool.cpp:524:18: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] frame = x+y*4; ~^~~~ src/game/unitandstructurepool.cpp:530:18: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] frame = x+y*3; ~^~~~ src/game/unitandstructurepool.cpp:536:18: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] frame = x+y*2; ~^~~~ src/game/unitandstructurepool.cpp: In member function 'bool UnitAndStructurePool::createReinforcements(RA_Teamtype*)': src/game/unitandstructurepool.cpp:581:49: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] owner = p::ppool->getPlayerNumByHouseNum(Team->country); ~~~~~~^~~~~~~ src/game/unitandstructurepool.cpp:581:42: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] owner = p::ppool->getPlayerNumByHouseNum(Team->country); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/game/unitandstructurepool.cpp:583:13: warning: format '%i' expects argument of type 'int', but argument 4 has type 'std::vector::size_type' {aka 'long unsigned int'} [-Wformat=] printf ("%s line %i: Team size = %i, Owner = %i\n", __FILE__, __LINE__, Team->Units.size(), (int)owner); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ src/game/unitandstructurepool.cpp:586:47: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] cellpos = p::ccmap->getWaypoint(Team->waypoint); ~~~~~~^~~~~~~~ src/game/unitandstructurepool.cpp:586:40: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cellpos = p::ccmap->getWaypoint(Team->waypoint); ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ src/game/unitandstructurepool.cpp: In member function 'bool UnitAndStructurePool::createUnit(UnitType*, Uint16, Uint8, Uint8, Uint16, Uint8, Uint8, std::__cxx11::string)': src/game/unitandstructurepool.cpp:639:92: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] if (getStructureAt(cellpos) != NULL && (unitandstructmat[cellpos].flags&(US_HIGH_COST) == 0)) { ~~~~~~~~~~~~~~~^~~~ src/game/unitandstructurepool.cpp:657:32: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] unitnum = unitpool.size(); ~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:674:26: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] unitnum = unitpool.size(); ~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:678:40: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] unitandstructmat[cellpos].unitnumb = unitnum; ^~~~~~~ src/game/unitandstructurepool.cpp:684:43: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] unitandstructmat[cellpos].airunitnumb = unitnum; ^~~~~~~ src/game/unitandstructurepool.cpp: In member function 'Unit* UnitAndStructurePool::getUnitAt(Uint32, Uint8)': src/game/unitandstructurepool.cpp:761:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if( !(unitandstructmat[cell].flags & (US_IS_UNIT|US_IS_AIRUNIT))) ^~ src/game/unitandstructurepool.cpp:764:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' if (unitandstructmat[cell].flags & US_IS_AIRUNIT) ^~ src/game/unitandstructurepool.cpp: In member function 'Unit* UnitAndStructurePool::getUnitAt(Uint32)': src/game/unitandstructurepool.cpp:786:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if( !(unitandstructmat[cell].flags & (US_IS_UNIT|US_IS_AIRUNIT))) ^~ src/game/unitandstructurepool.cpp:789:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' if (unitandstructmat[cell].flags & US_IS_UNIT) ^~ src/game/unitandstructurepool.cpp: In member function 'Unit* UnitAndStructurePool::getFlyingAt(Uint32, Uint8)': src/game/unitandstructurepool.cpp:876:7: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if( ((UnitType *)un->getType())->isInfantry() ) ^~ src/game/unitandstructurepool.cpp:878:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' return (un); ^~~~~~ In file included from src/game/loadmap.cpp:5: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traitsgetInfantryGroup()->IsClear(i) ) ^ ator, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ src/game/unitandstructurepool.cpp:947:79: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if(unitpool[unitandstructmat[pos].unitnumb]->getInfantryGroup()->UnitAt(i)->isSelected() ) ^ In file included from src/include/ccmap.h:10, from src/game/loadmap.cpp:5: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ src/game/unitandstructurepool.cpp:948:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] selected |= 1<getInfantryGroup()->IsClear(i) ) ^ src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/game/unitandstructurepool.cpp:965:82: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if(unitpool[unitandstructmat[pos].airunitnumb]->getInfantryGroup()->UnitAt(i)->isSelected() ) ^ src/game/unitandstructurepool.cpp:966:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] selected |= 1<> 8; src/game/unitandstructurepool.cpp:980:110: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return (((StructureType *)structurepool[unitandstructmat[pos].structurenumb]->getType())->getXsize()<<8) | 1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/game/unitandstructurepool.cpp: In member function 'Uint16 UnitAndStructurePool::preMove(Unit*, Uint8, Sint8*, Sint8*, Unit**)': src/game/unitandstructurepool.cpp:1002:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] newpos = un->getPos()-ccmap->getWidth(); ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/include/playerpool.h:10, from src/game/loadmap.cpp:15: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ src/game/unitandstructurepool.cpp:1004:12: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *ymod = -unitmod; ^~~~~~~~ src/game/unitandstructurepool.cpp:1007:43: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] newpos = un->getPos()-ccmap->getWidth()+1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1009:12: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *ymod = -unitmod; ^~~~~~~~ src/game/unitandstructurepool.cpp:1012:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] newpos = un->getPos()+1; ~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1017:43: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] newpos = un->getPos()+ccmap->getWidth()+1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1022:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] newpos = un->getPos()+ccmap->getWidth(); ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/unitandstructurepool.cpp:1027:43: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] newpos = un->getPos()+ccmap->getWidth()-1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1028:12: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xmod = -unitmod; ^~~~~~~~ src/game/unitandstructurepool.cpp:1032:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] newpos = un->getPos()-1; ~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1033:12: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xmod = -unitmod; ^~~~~~~~ src/game/unitandstructurepool.cpp:1037:43: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] newpos = un->getPos()-ccmap->getWidth()-1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1038:12: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xmod = -unitmod; ^~~~~~~~ src/game/unitandstructurepool.cpp:1039:12: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *ymod = -unitmod; ^~~~~~~~ src/game/unitandstructurepool.cpp:1051:52: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] if (unitandstructmat[newpos].flags&(US_HIGH_COST) != 0) ~~~~~~~~~~~~~~~^~~~ src/game/unitandstructurepool.cpp:1069:104: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] if (unitandstructmat[newpos].flags&(US_IS_STRUCTURE) && (unitandstructmat[newpos].flags&(US_IS_UNIT) == 0)) { ~~~~~~~~~~~~~^~~~ src/game/unitandstructurepool.cpp: In member function 'Uint8 UnitAndStructurePool::unhideUnit(Unit*, Uint16, bool)': src/game/unitandstructurepool.cpp:1210:25: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] subpos = un->getSubpos(); ~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1233:71: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] unitandstructmat[un->getPos()].unitnumb = ig->UnitAt(i)->getNum(); ~~~~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1247:74: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] unitandstructmat[un->getPos()].airunitnumb = ig->UnitAt(i)->getNum(); ~~~~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1272:51: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] unitandstructmat[newpos].unitnumb = un->getNum(); ~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1301:51: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] unitandstructmat[newpos].unitnumb = un->getNum(); ~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1309:54: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] unitandstructmat[newpos].airunitnumb = un->getNum(); ~~~~~~~~~~^~ src/game/unitandstructurepool.cpp: In member function 'void UnitAndStructurePool::hideUnit(Unit*)': src/game/unitandstructurepool.cpp:1333:45: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] ig->RemoveInfantry(un->getSubpos()); ~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp: In member function 'void UnitAndStructurePool::abortMove(Unit*, Uint32)': src/game/unitandstructurepool.cpp:1351:39: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses] if( !(unitandstructmat[pos].flags & US_MOVING_HERE|US_AIR_MOVING_HERE) ) { src/game/structure.cpp: In constructor 'StructureType::StructureType(const char*, INIFile*, INIFile*, const char*)': src/game/structure.cpp:163:20: warning: 'char* strncat(char*, const char*, size_t)' specified bound 13 equals destination size [-Wstringop-overflow=] strncat(shpname, ".SHP", 13); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:209:20: warning: 'char* strncat(char*, const char*, size_t)' specified bound 13 equals destination size [-Wstringop-overflow=] strncat(shpname, "make.shp", 13); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ src/game/unitandstructurepool.cpp: In member function 'Uint16 UnitAndStructurePool::getTileCost(Uint16) const': src/game/unitandstructurepool.cpp:1370:12: warning: variable 'str' set but not used [-Wunused-but-set-variable] Structure *str; ^~~ src/game/unitandstructurepool.cpp: In member function 'Uint16 UnitAndStructurePool::getTileCost(Uint16, Unit*) const': src/game/unitandstructurepool.cpp:1425:4: warning: variable 'WaterBound' set but not used [-Wunused-but-set-variable] WaterBound = false; ^~~~~~~~~~ src/game/unitandstructurepool.cpp: In member function 'UnitType* UnitAndStructurePool::getUnitTypeByName(const char*)': src/game/unitandstructurepool.cpp:1554:36: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] typenum = unittypepool.size(); ~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp: In member function 'StructureType* UnitAndStructurePool::getStructureTypeByName(const char*)': src/game/unitandstructurepool.cpp:1583:41: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] typenum = structuretypepool.size(); ~~~~~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp: In member function 'void UnitAndStructurePool::removeUnit(Unit*)': src/game/unitandstructurepool.cpp:1613:45: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] infgrp->RemoveInfantry(un->getSubpos()); ~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1619:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if(!infgrp->IsClear(i)) { ^ src/game/unitandstructurepool.cpp:1621:78: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] unitandstructmat[un->getPos()].unitnumb = infgrp->UnitAt(i)->getNum(); ^ src/game/unitandstructurepool.cpp:1621:88: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] unitandstructmat[un->getPos()].unitnumb = infgrp->UnitAt(i)->getNum(); ~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp: In member function 'void UnitAndStructurePool::removeStructure(Structure*)': src/game/unitandstructurepool.cpp:1658:111: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] if( ((StructureType *)st->getType())->isBlocked(y*((StructureType *)st->getType())->getXsize()+x) ) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/game/unitandstructurepool.cpp:1678:39: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] curpos += ccmap->getWidth(); ^ src/game/unitandstructurepool.cpp: In member function 'void UnitAndStructurePool::splitORPreReqs(const char*, std::vector*)': src/game/unitandstructurepool.cpp:1839:30: warning: conversion from 'int' to 'char' may change value [-Wconversion] tmp[i2] = toupper(prereqs[i]); ~~~~~~~^~~~~~~~~~~~ src/game/unitandstructurepool.cpp: In member function 'void UnitAndStructurePool::preloadUnitAndStructures(Uint8)': src/game/unitandstructurepool.cpp:1855:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] ltech = unitini->readInt(secname.c_str(),"techlevel",100); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/unitandstructurepool.cpp:1875:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] ltech = structini->readInt(secname.c_str(),"techlevel",100); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/unitandstructurepool.cpp: In member function 'void UnitAndStructurePool::generateProductionGroups()': src/game/unitandstructurepool.cpp:1903:25: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] (*ut)->setPType(ptype); ^~~~~ src/game/unitandstructurepool.cpp:1906:29: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] (*st)->setPType(ptype); ^~~~~ In file included from src/game/loadmap.cpp:17: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ src/game/loadmap.cpp: In member function 'void CnCMap::loadIni()': src/game/loadmap.cpp:108:27: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] p::ppool->setPlayer(i+1, Nick.c_str(), i+offset, "nod" /* pc::Config.mside.c_str() */); ~^~ src/game/loadmap.cpp:113:27: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] p::ppool->setLPlayer(i+1, pc::Config.nick.c_str(),pc::Config.side_colour.c_str(), pc::Config.mside.c_str()); ~^~ src/game/loadmap.cpp:123:50: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] pips = new SHPImage("hpips.shp",mapscaleq); ^ src/game/loadmap.cpp:126:54: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] pips = new SHPImage("pips.shp", mapscaleq); ^ src/game/loadmap.cpp:132:36: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] pipsnum = pc::imagepool->size()<<16; ~~~~~~~~~~~~~~~~~~~~~^~~~ src/game/loadmap.cpp:138:56: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] moveflash = new SHPImage(moveflsh,mapscaleq); ^ src/game/loadmap.cpp:145:62: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] moveflash = new SHPImage("moveflsh.shp",mapscaleq); ^ src/game/loadmap.cpp:151:37: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] flashnum = pc::imagepool->size()<<16; ~~~~~~~~~~~~~~~~~~~~~^~~~ src/game/loadmap.cpp: In member function 'void CnCMap::simpleSections(INIFile*)': src/game/loadmap.cpp:206:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] height = temp; ^~~~ src/game/loadmap.cpp:213:11: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] width = temp; ^~~~ src/game/loadmap.cpp:220:7: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] x = temp; ^~~~ src/game/loadmap.cpp:227:7: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] y = temp; ^~~~ src/game/loadmap.cpp:239:46: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] missionData.buildlevel = inifile->readInt("BASIC", "BUILDLEVEL",1); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ src/game/loadmap.cpp: In member function 'void CnCMap::advancedSections(INIFile*)': src/game/loadmap.cpp:326:45: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] tmp2 = translateToPos(tx-x, ty-y); ~~^~ src/game/loadmap.cpp:326:51: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] tmp2 = translateToPos(tx-x, ty-y); ~~^~ src/game/loadmap.cpp:326:42: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] tmp2 = translateToPos(tx-x, ty-y); ~~~~~~~~~~~~~~^~~~~~~~~~~~ src/game/loadmap.cpp:327:34: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] setWaypoint (tmpval, tmp2); ^~~~~~ src/game/loadmap.cpp:329:50: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollbookmarks[0].x = tx-x; ~~^~ src/game/loadmap.cpp:330:50: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollbookmarks[0].y = ty-y; ~~^~ src/game/loadmap.cpp:338:50: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollbookmarks[0].x = tx-x; ~~^~ src/game/loadmap.cpp:339:50: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollbookmarks[0].y = ty-y; ~~^~ src/game/loadmap.cpp:343:38: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] setWaypoint (tmpval, tmp2); ^~~~~~ src/game/loadmap.cpp:351:50: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] p::ppool->setPlayerStarts(k, getWaypoint(k)); ^ src/game/loadmap.cpp:351:35: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] p::ppool->setPlayerStarts(k, getWaypoint(k)); ^ src/game/loadmap.cpp:356:53: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] image = new SHPImage("SHADOW.SHP", mapscaleq); ^ src/game/loadmap.cpp:360:36: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] image->getImageAsAlpha(i, &shadowimages[i]); ^ src/game/loadmap.cpp:385:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] image = new SHPImage(sname.c_str(), mapscaleq); ^ src/game/loadmap.cpp:386:56: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'std::vector::value_type' {aka 'unsigned int'} may change value [-Wconversion] resourcebases.push_back(pc::imagepool->size()); ~~~~~~~~~~~~~~~~~~~^~ src/game/loadmap.cpp:397:56: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] image = new SHPImage(shpname, mapscaleq); ^ src/game/loadmap.cpp:405:56: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] image = new SHPImage(shpname, mapscaleq); ^ src/game/loadmap.cpp:437:38: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] xsize = arts->readInt(shpname, "XSIZE",1); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/game/loadmap.cpp:438:38: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ysize = arts->readInt(shpname, "YSIZE",1); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/game/loadmap.cpp:444:75: warning: conversion from 'Uint16' {aka 'short unsigned int'} to '__gnu_cxx::__alloc_traits, unsigned char>::value_type' {aka 'unsigned char'} may change value [-Wconversion] terraintypes[(ywalk+ty-y)*width+xwalk+tx-x] = ttype; ^~~~~ src/game/loadmap.cpp:462:54: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] tmpterrain.xoffset = -(linenum%ysize)*24; ~~~~~~~~~~~~~~~~^~~ src/game/loadmap.cpp:463:54: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] tmpterrain.yoffset = -(linenum/ysize)*24; ~~~~~~~~~~~~~~~~^~~ src/game/loadmap.cpp:465:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] tx += linenum%ysize; ~~~^~~~~~~~~~~~~~~~ src/game/loadmap.cpp:467:40: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] tmpterrain.xoffset += 1+tx-(width+x); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/game/loadmap.cpp:468:33: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] tx = width+x-1; ~~~~~~~^~ src/game/loadmap.cpp:470:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ty += linenum/ysize; ~~~^~~~~~~~~~~~~~~~ src/game/loadmap.cpp:472:40: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] tmpterrain.yoffset += 1+ty-(height+y); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/loadmap.cpp:473:34: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ty = height+y-1; ~~~~~~~~^~ src/game/loadmap.cpp:491:61: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'std::map, unsigned int>::mapped_type' {aka 'unsigned int'} may change value [-Wconversion] imagelist[shpname] = pc::imagepool->size(); ~~~~~~~~~~~~~~~~~~~^~ src/game/loadmap.cpp:493:62: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] tmpterrain.shpnum = pc::imagepool->size()<<16; ~~~~~~~~~~~~~~~~~~~~~^~~~ src/game/loadmap.cpp:496:64: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] image = new SHPImage(shpname, mapscaleq); ^ src/game/loadmap.cpp:557:54: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] p::uspool->createStructure(type, linenum, p::ppool->getPlayerNum(owner), ^~~~~~~ src/game/loadmap.cpp:558:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] health, facing, false, trigger); ^~~~~~ src/game/loadmap.cpp:558:33: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] health, facing, false, trigger); ^~~~~~ src/game/loadmap.cpp:574:54: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] p::uspool->createStructure(type, linenum, p::ppool->getPlayerNum(owner), ^~~~~~~ src/game/loadmap.cpp:575:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] health, facing, false, trigger); ^~~~~~ src/game/loadmap.cpp:575:33: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] health, facing, false, trigger); ^~~~~~ src/game/loadmap.cpp:595:45: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] p::uspool->createUnit(type, linenum, 5, p::ppool->getPlayerNum(owner), health, facing, UnitActionToNr(action), trigger); ^~~~~~~ src/game/loadmap.cpp:595:88: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] p::uspool->createUnit(type, linenum, 5, p::ppool->getPlayerNum(owner), health, facing, UnitActionToNr(action), trigger); ^~~~~~ src/game/loadmap.cpp:595:96: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] p::uspool->createUnit(type, linenum, 5, p::ppool->getPlayerNum(owner), health, facing, UnitActionToNr(action), trigger); ^~~~~~ src/game/loadmap.cpp:617:45: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] p::uspool->createUnit(type, linenum, subpos, p::ppool->getPlayerNum(owner), health, facing, UnitActionToNr(action), trigger); ^~~~~~~ src/game/loadmap.cpp:617:54: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] p::uspool->createUnit(type, linenum, subpos, p::ppool->getPlayerNum(owner), health, facing, UnitActionToNr(action), trigger); ^~~~~~ src/game/loadmap.cpp:617:93: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] p::uspool->createUnit(type, linenum, subpos, p::ppool->getPlayerNum(owner), health, facing, UnitActionToNr(action), trigger); ^~~~~~ src/game/loadmap.cpp:617:101: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] p::uspool->createUnit(type, linenum, subpos, p::ppool->getPlayerNum(owner), health, facing, UnitActionToNr(action), trigger); ^~~~~~ src/game/loadmap.cpp:637:40: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] CellTrig.cellpos = linenum; ^~~~~~~ src/game/loadmap.cpp:697:40: warning: conversion from 'std::__cxx11::basic_string::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] pos = key->second.find (teamname,0); ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ src/game/loadmap.cpp:704:37: warning: conversion from 'std::__cxx11::basic_string::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] pos = temp.find (",", 0); ~~~~~~~~~~^~~~~~~~ src/video/sdllayer.cpp: In function 'void set_pixel(SDL_Surface*, Uint32, Uint32, Uint32)': src/video/sdllayer.cpp:97:15: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] DestRect.x = x; ^ src/video/sdllayer.cpp:98:15: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] DestRect.y = y; ^ src/video/sdllayer.cpp: In function 'void draw_rectangle(SDL_Surface*, Uint32, Uint16, Uint16, Uint16, Uint16, Uint8)': src/video/sdllayer.cpp:144:23: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] DestRect.y = y+height-1; ~~~~~~~~^~ src/video/sdllayer.cpp:154:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] DestRect.x = x+width-1; ~~~~~~~^~ src/game/loadmap.cpp: In member function 'void CnCMap::parseBin(TileList*)': src/game/loadmap.cpp:924:29: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses] tile = xtile&3 | (ytile&3 << 2); ~~~~~^~ src/game/loadmap.cpp:924:32: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] tile = xtile&3 | (ytile&3 << 2); ~~~~~~~~^~~~~~~~~~~~~~~~ src/game/loadmap.cpp:926:29: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses] tile = xtile&1 | (ytile&1 << 1); ~~~~~^~ src/game/loadmap.cpp:926:32: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] tile = xtile&1 | (ytile&1 << 1); ~~~~~~~~^~~~~~~~~~~~~~~~ src/game/loadmap.cpp:950:42: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] tileidx = tileimages.size(); ~~~~~~~~~~~~~~~^~ src/game/loadmap.cpp:952:33: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] tiledata.type = tiletype; ^~~~~~~~ src/game/loadmap.cpp:958:45: warning: conversion from 'Uint32' {aka 'unsigned int'} to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] tilematrix[width*ytile+xtile] = tileidx; ^~~~~~~ src/game/loadmap.cpp:960:51: warning: conversion from 'Uint32' {aka 'unsigned int'} to '__gnu_cxx::__alloc_traits, unsigned char>::value_type' {aka 'unsigned char'} may change value [-Wconversion] terraintypes[width*ytile+xtile] = tiletype; ^~~~~~~~ src/game/loadmap.cpp: In member function 'void CnCMap::unOverlayPack(INIFile*)': src/game/loadmap.cpp:1025:18: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] for (ytile = y; ytile <= y+height; ++ytile){ ^ src/game/loadmap.cpp:1026:22: warning: conversion from 'Uint16' {aka 'short unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] for (xtile = x; xtile <= x+width; ++xtile){ ^ src/game/loadmap.cpp: In member function 'void CnCMap::parseOverlay(const Uint32&, const string&)': src/game/loadmap.cpp:1046:50: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] p::uspool->createStructure(name.c_str(), linenum, p::ppool->getPlayerNum("NEUTRAL"), 256, 0, false); ^~~~~~~ src/game/loadmap.cpp:1055:58: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] frame = pc::imgcache->loadImage(shpname.c_str()) >> 16; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ src/game/loadmap.cpp:1059:62: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] frame = pc::imgcache->loadImage(shpname.c_str()) >> 16; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ src/game/loadmap.cpp:1087:38: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] type = resourcebases.size(); ~~~~~~~~~~~~~~~~~~^~ src/game/loadmap.cpp:1090:24: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] res = type | ((i-1) << 8); ~~~~~^~~~~~~~~~~~~~ src/game/loadmap.cpp:1094:29: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] res = t->second | ((i-1) << 8); ~~~~~~~~~~^~~~~~~~~~~~~~ src/game/loadmap.cpp: In member function 'void CnCMap::loadPal(const string&, SDL_Color*)': src/game/loadmap.cpp:1142:22: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].r <<= 2; ~~~~~~~~~~~~~^~~~~ src/game/loadmap.cpp:1143:22: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].g <<= 2; ~~~~~~~~~~~~~^~~~~ src/game/loadmap.cpp:1144:22: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].b <<= 2; ~~~~~~~~~~~~~^~~~~ src/game/loadmap.cpp: In member function 'SDL_Surface* CnCMap::loadTile(INIFile*, Uint16, Uint8, Uint32*)': src/game/loadmap.cpp:1214:75: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] theaterfile = new TemplateImage(tilefilename, mapscaleq, 1); ^ src/game/loadmap.cpp:1216:72: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] theaterfile = new TemplateImage(tilefilename, mapscaleq); ^ c++ -o src/video/loadingscreen.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/loadingscreen.cpp c++ -o src/video/vqa.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/vqa.cpp In file included from src/include/common.h:5, from src/video/imagecache.cpp:2: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ c++ -o src/video/glSDL.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/glSDL.cpp In file included from src/include/common.h:5, from src/include/vfs.h:8, from src/video/shpimage.cpp:16: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ src/video/shpimage.cpp: In member function 'SDL_Surface* SHPBase::scale(SDL_Surface*, int)': src/video/shpimage.cpp:374:33: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] return scaler->scale(input, quality); ^~~~~~~ In file included from src/video/shpimage.cpp:11: src/video/shpimage.cpp: In constructor 'SHPImage::SHPImage(const char*, Sint8)': src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/shpimage.cpp:406:24: note: in expansion of macro 'readword' header.NumImages = readword(shpdata,0); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/shpimage.cpp:407:20: note: in expansion of macro 'readword' header.Width = readword(shpdata, 6); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/shpimage.cpp:409:21: note: in expansion of macro 'readword' header.Height = readword(shpdata, 8); ^~~~~~~~ src/video/shpimage.cpp: In member function 'void SHPImage::getImageAsAlpha(Uint16, SDL_Surface**)': src/video/shpimage.cpp:548:29: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] imgdata[i] = 17 - imgdata[i]; ~~~^~~~~~~~~~~~ src/video/shpimage.cpp: In member function 'void SHPImage::DecodeSprite(Uint8*, Uint16)': src/video/shpimage.cpp:605:31: warning: argument to 'sizeof' in 'void* memset(void*, int, size_t)' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memset(imgdst, 0, sizeof(imgdst)); ^~~~~~~~~~~~~~ src/video/shpimage.cpp:614:34: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] DecodeSprite(imgdst, i); ^ src/video/shpimage.cpp:622:41: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] DecodeSprite(imgdst, imgnum - 1); ~~~~~~~^~~ In file included from src/video/shpimage.cpp:11: src/video/shpimage.cpp: In member function 'Uint32 Dune2Image::getD2Header(Uint16)': src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/shpimage.cpp:730:12: note: in expansion of macro 'readword' imgs = readword(shpdata, 0); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/shpimage.cpp:744:26: note: in expansion of macro 'readword' header.compression = readword(shpdata, curpos); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/shpimage.cpp:748:17: note: in expansion of macro 'readword' header.cx = readword(shpdata, curpos); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/shpimage.cpp:752:22: note: in expansion of macro 'readword' header.size_in = readword(shpdata, curpos); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/shpimage.cpp:754:23: note: in expansion of macro 'readword' header.size_out = readword(shpdata, curpos); ^~~~~~~~ In file included from src/include/playerpool.h:10, from src/video/imagecache.cpp:6: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ c++ -o src/video/message.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/message.cpp src/video/imagecache.cpp: In member function 'Uint32 ImageCache::loadImage(const char*, int)': src/video/imagecache.cpp:165:67: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] imagepool->push_back(new SHPImage(name.c_str(), scaleq)); ^ src/game/structure.cpp:159:28: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=] sprintf(imagename, "image%d", i+1); ^~~~~~~~~ src/game/structure.cpp:159:16: note: 'sprintf' output between 7 and 9 bytes into a destination of size 8 sprintf(imagename, "image%d", i+1); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:165:20: warning: 'char* strncpy(char*, const char*, size_t)' specified bound 13 equals destination size [-Wstringop-truncation] strncpy(shpname, tmp, 13); ~~~~~~~^~~~~~~~~~~~~~~~~~ src/game/structure.cpp:173:20: warning: 'char* strncat(char*, const char*, size_t)' specified bound 13 equals destination size [-Wstringop-truncation] strncat(shpname, thext, 13); ~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/game/structure.cpp:173:20: warning: 'char* strncat(char*, const char*, size_t)' specified bound 13 equals destination size [-Wstringop-overflow=] c++ -o src/video/graphicsengine.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/graphicsengine.cpp src/video/glSDL.cpp: In function 'void clip_rect(SDL_Rect*, SDL_Rect*)': src/video/glSDL.cpp:77:10: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] r->x = dx1; ^~~ src/video/glSDL.cpp:78:10: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] r->y = dy1; ^~~ src/video/glSDL.cpp:79:14: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] r->w = dx2 - dx1; ~~~~^~~~~ src/video/glSDL.cpp:80:14: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] r->h = dy2 - dy1; ~~~~^~~~~ c++ -o src/video/wsa.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/wsa.cpp src/video/glSDL.cpp: In function 'SDL_Surface* glSDL_SetVideoMode(int, int, int, Uint32)': src/video/glSDL.cpp:905:37: warning: conversion from 'int' to 'float' may change value [-Wconversion] gl.Ortho(0, scale * (float)screen->w, scale * (float)screen->h, 0, ^ src/video/glSDL.cpp:905:63: warning: conversion from 'int' to 'float' may change value [-Wconversion] gl.Ortho(0, scale * (float)screen->w, scale * (float)screen->h, 0, ^ src/video/glSDL.cpp: In function 'void glSDL_UpdateRect(SDL_Surface*, Sint32, Sint32, Uint32, Uint32)': src/video/glSDL.cpp:949:8: warning: conversion from 'Sint32' {aka 'int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] r.x = x; ^ src/video/glSDL.cpp:950:8: warning: conversion from 'Sint32' {aka 'int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] r.y = y; ^ src/video/glSDL.cpp:951:8: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] r.w = w; ^ src/video/glSDL.cpp:952:8: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] r.h = h; ^ src/video/glSDL.cpp: In function 'SDL_bool glSDL_SetClipRect(SDL_Surface*, SDL_Rect*)': src/video/glSDL.cpp:1077:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] fsr.w = screen->w; ~~~~~~~~^ src/video/glSDL.cpp:1078:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] fsr.h = screen->h; ~~~~~~~~^ src/video/glSDL.cpp:1083:12: warning: variable 'r' set but not used [-Wunused-but-set-variable] SDL_Rect r; ^ src/video/glSDL.cpp: In function 'int glSDL_BlitFromGL(SDL_Rect*, SDL_Surface*, SDL_Rect*)': src/video/glSDL.cpp:1115:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dr.w = fake_screen->w; ~~~~~~~~~~~~~^ src/video/glSDL.cpp:1116:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dr.h = fake_screen->h; ~~~~~~~~~~~~~^ src/video/glSDL.cpp:1124:15: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] sr.w = dst->w; ~~~~~^ src/video/glSDL.cpp:1144:14: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] sr.y = sy0 + i; ~~~~^~~ src/video/glSDL.cpp:1145:14: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dr.y = dy0 - i; ~~~~^~~ src/video/glSDL.cpp: In function 'void BlitGL_single(glSDL_TexInfo*, float, float, SDL_Rect*, unsigned char)': src/video/glSDL.cpp:1164:17: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] texscale = 1.0 / (float)txi->texsize; ~~~~^~~~~~~~~~~~~~~~~~~~~ src/video/glSDL.cpp: In function 'void BlitGL_htile(glSDL_TexInfo*, float, float, SDL_Rect*, unsigned char)': src/video/glSDL.cpp:1189:23: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] float texscale = 1.0 / (float)txi->texsize; ~~~~^~~~~~~~~~~~~~~~~~~~~ src/video/glSDL.cpp:1195:14: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] tile = floor(sx1); ~~~~~^~~~~ src/video/glSDL.cpp:1197:18: warning: conversion from 'int' to 'float' may change value [-Wconversion] yo = ((int)tile % txi->tilespertex) * tileh; ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/video/glSDL.cpp:1216:30: warning: conversion from 'int' to 'float' may change value [-Wconversion] tdx1 -= (int)(tsx1 * txi->texsize); ~~~~~^~~~~~~ src/video/glSDL.cpp:1249:8: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] tile += 1.0; ~~~~~^~~~~~ src/video/glSDL.cpp: In function 'void BlitGL_vtile(glSDL_TexInfo*, float, float, SDL_Rect*, unsigned char)': src/video/glSDL.cpp:1261:23: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] float texscale = 1.0 / (float)txi->texsize; ~~~~^~~~~~~~~~~~~~~~~~~~~ src/video/glSDL.cpp:1267:14: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] tile = floor(sy1); ~~~~~^~~~~ src/video/glSDL.cpp:1269:18: warning: conversion from 'int' to 'float' may change value [-Wconversion] xo = ((int)tile % txi->tilespertex) * tilew; ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/video/glSDL.cpp:1288:30: warning: conversion from 'int' to 'float' may change value [-Wconversion] tdy1 -= (int)(tsy1 * txi->texsize); ~~~~~^~~~~~~ src/video/glSDL.cpp:1321:8: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] tile += 1.0; ~~~~~^~~~~~ src/video/glSDL.cpp: In function 'void BlitGL_hvtile(SDL_Surface*, glSDL_TexInfo*, float, float, SDL_Rect*, unsigned char)': src/video/glSDL.cpp:1333:23: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] float texscale = 1.0 / (float)txi->texsize; ~~~~^~~~~~~~~~~~~~~~~~~~~ src/video/glSDL.cpp:1348:31: warning: conversion from 'int' to 'float' may change value [-Wconversion] for(y = (int)floor(sy1); y < sy2; ++y) ^~~ src/video/glSDL.cpp:1352:22: warning: conversion from 'int' to 'float' may change value [-Wconversion] float tsy1 = sy1 - y; ^ src/video/glSDL.cpp:1353:22: warning: conversion from 'int' to 'float' may change value [-Wconversion] float tsy2 = sy2 - y; ^ src/video/glSDL.cpp:1358:30: warning: conversion from 'int' to 'float' may change value [-Wconversion] tdy1 -= (int)(tsy1 * txi->texsize); ~~~~~^~~~~~~ src/video/glSDL.cpp:1366:32: warning: conversion from 'int' to 'float' may change value [-Wconversion] for(x = (int)floor(sx1); x < sx2; ++x) ^~~ src/video/glSDL.cpp:1370:23: warning: conversion from 'int' to 'float' may change value [-Wconversion] float tsx1 = sx1 - x; ^ src/video/glSDL.cpp:1371:23: warning: conversion from 'int' to 'float' may change value [-Wconversion] float tsx2 = sx2 - x; ^ src/video/glSDL.cpp:1376:31: warning: conversion from 'int' to 'float' may change value [-Wconversion] tdx1 -= (int)(tsx1 * txi->texsize); ~~~~~^~~~~~~ In file included from src/include/common.h:5, from src/video/vqa.cpp:8: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ src/video/glSDL.cpp: In function 'int blitclip(SDL_Rect*, int, int, int*, int*, SDL_Rect*)': src/video/glSDL.cpp:1489:12: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] rect->x = dx1; ^~~ src/video/glSDL.cpp:1490:12: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] rect->y = dy1; ^~~ src/video/glSDL.cpp:1491:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] rect->w = dx2 - dx1; ~~~~^~~~~ src/video/glSDL.cpp:1492:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] rect->h = dy2 - dy1; ~~~~^~~~~ src/video/glSDL.cpp: In function 'int glSDL_BlitGL(SDL_Surface*, SDL_Rect*, SDL_Surface*, SDL_Rect*)': src/video/glSDL.cpp:1513:14: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] r.w = src->w; ~~~~~^ src/video/glSDL.cpp:1514:14: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] r.h = src->h; ~~~~~^ src/video/glSDL.cpp:1568:22: warning: conversion from 'int' to 'float' may change value [-Wconversion] BlitGL_single(txi, x, y, &r, alpha); ^ src/video/glSDL.cpp:1568:25: warning: conversion from 'int' to 'float' may change value [-Wconversion] BlitGL_single(txi, x, y, &r, alpha); ^ src/video/glSDL.cpp:1571:21: warning: conversion from 'int' to 'float' may change value [-Wconversion] BlitGL_htile(txi, x, y, &r, alpha); ^ src/video/glSDL.cpp:1571:24: warning: conversion from 'int' to 'float' may change value [-Wconversion] BlitGL_htile(txi, x, y, &r, alpha); ^ src/video/glSDL.cpp:1574:21: warning: conversion from 'int' to 'float' may change value [-Wconversion] BlitGL_vtile(txi, x, y, &r, alpha); ^ src/video/glSDL.cpp:1574:24: warning: conversion from 'int' to 'float' may change value [-Wconversion] BlitGL_vtile(txi, x, y, &r, alpha); ^ src/video/glSDL.cpp:1577:27: warning: conversion from 'int' to 'float' may change value [-Wconversion] BlitGL_hvtile(src, txi, x, y, &r, alpha); ^ src/video/glSDL.cpp:1577:30: warning: conversion from 'int' to 'float' may change value [-Wconversion] BlitGL_hvtile(src, txi, x, y, &r, alpha); ^ src/video/glSDL.cpp: In function 'int glSDL_FillRect(SDL_Surface*, SDL_Rect*, Uint32)': src/video/glSDL.cpp:1664:16: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dstrect->x = dx1; ^~~ src/video/glSDL.cpp:1665:16: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dstrect->y = dy1; ^~~ src/video/glSDL.cpp:1666:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dstrect->w = dx2 - dx1; ~~~~^~~~~ src/video/glSDL.cpp:1667:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dstrect->h = dy2 - dy1; ~~~~^~~~~ src/video/glSDL.cpp:1693:14: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'GLubyte' {aka 'unsigned char'} may change value [-Wconversion] gl.Color3ub(r, g, b); ^ src/video/glSDL.cpp:1693:17: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'GLubyte' {aka 'unsigned char'} may change value [-Wconversion] gl.Color3ub(r, g, b); ^ src/video/glSDL.cpp:1693:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'GLubyte' {aka 'unsigned char'} may change value [-Wconversion] gl.Color3ub(r, g, b); ^ src/video/glSDL.cpp: In function 'int glSDL_SaveBMP(SDL_Surface*, const char*)': src/video/glSDL.cpp:1862:21: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] r.w = fake_screen->w; ~~~~~~~~~~~~~^ src/video/glSDL.cpp:1863:21: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] r.h = fake_screen->h; ~~~~~~~~~~~~~^ src/video/glSDL.cpp: In function 'void glSDL_Invalidate(SDL_Surface*, SDL_Rect*)': src/video/glSDL.cpp:1891:34: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] txi->invalid_area.w = surface->w; ~~~~~~~~~^ src/video/glSDL.cpp:1892:34: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] txi->invalid_area.h = surface->h; ~~~~~~~~~^ c++ -o src/video/cpsimage.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/cpsimage.cpp In file included from src/include/common.h:5, from src/video/loadingscreen.cpp:1: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ src/game/loadmap.cpp: In member function 'void CnCMap::simpleSections(INIFile*)': src/game/loadmap.cpp:167:26: warning: 'key' may be used uninitialized in this function [-Wmaybe-uninitialized] logger->error("Error loading map: unable to find \"%s\"\n",key); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/include/playerpool.h:10, from src/include/graphicsengine.h:12, from src/video/vqa.cpp:11: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ src/video/vqa.cpp: In function 'Uint8 VQAPriv::VQA_HI_BYTE(Uint32)': src/video/vqa.cpp:32:29: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return (x & 0xff000000) >> 24; ~~~~~~~~~~~~~~~~~^~~~~ In file included from src/include/playerpool.h:10, from src/include/graphicsengine.h:12, from src/video/loadingscreen.cpp:4: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ src/video/vqa.cpp: In member function 'void VQAMovie::play()': src/video/vqa.cpp:224:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = header.Width<<1; ~~~~~~~~~~~~^~~ src/video/vqa.cpp:225:24: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = header.Height<<1; ~~~~~~~~~~~~~^~~ src/video/vqa.cpp:226:53: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = (pc::gfxeng->getWidth()-(header.Width<<1))>>1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/video/vqa.cpp:227:55: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = (pc::gfxeng->getHeight()-(header.Height<<1))>>1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/video/vqa.cpp:219:14: warning: variable 'dest' set but not used [-Wunused-but-set-variable] SDL_Rect dest; ^~~~ src/video/vqa.cpp: In member function 'bool VQAMovie::DecodeFORMChunk()': src/video/vqa.cpp:374:25: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] BlockS = header.BlockH * header.BlockW; ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/video/vqa.cpp: In member function 'Uint32 VQAMovie::DecodeSNDChunk(Uint8*)': src/video/vqa.cpp:525:41: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Sound::IMADecode(outbuf, inbuf, chunklen, sndsample, sndindex); ^~~~~~~~ src/video/vqa.cpp: In member function 'void VQAMovie::DecodeCPLChunk(SDL_Color*)': src/video/vqa.cpp:691:22: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].r <<= 2; ~~~~~~~~~~~~~^~~~~ src/video/vqa.cpp:692:22: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].g <<= 2; ~~~~~~~~~~~~~^~~~~ src/video/vqa.cpp:693:22: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].b <<= 2; ~~~~~~~~~~~~~^~~~~ In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/video/graphicsengine.cpp:10: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ c++ -o src/video/pcximage.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/pcximage.cpp In file included from src/include/common.h:5, from src/video/wsa.cpp:3: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ c++ -o src/video/imageproc.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/imageproc.cpp In file included from src/include/common.h:5, from src/include/vfs.h:8, from src/video/cpsimage.cpp:9: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ c++ -o src/video/renderer.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/video/renderer.cpp In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/video/graphicsengine.cpp:10: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/ccmap.h:11, from src/video/graphicsengine.cpp:10: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~In file included from src/include/common.h:5, from src/include/message.h:9, from src/video/message.cpp:1: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ ~~~~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/video/cpsimage.cpp:6: src/video/cpsimage.cpp: In constructor 'CPSImage::CPSImage(const char*, int)': src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/cpsimage.cpp:22:22: note: in expansion of macro 'readword' header.size = readword(cpsdata,0); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/cpsimage.cpp:23:22: note: in expansion of macro 'readword' header.unknown = readword(cpsdata,2); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/cpsimage.cpp:24:22: note: in expansion of macro 'readword' header.imsize = readword(cpsdata,4); ^~~~~~~~ src/video/cpsimage.cpp: In member function 'void CPSImage::readPalette()': src/video/cpsimage.cpp:49:22: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].r <<= 2; ~~~~~~~~~~~~~^~~~~ src/video/cpsimage.cpp:50:22: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].g <<= 2; ~~~~~~~~~~~~~^~~~~ src/video/cpsimage.cpp:51:22: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].b <<= 2; ~~~~~~~~~~~~~^~~~~ src/video/cpsimage.cpp: In member function 'void CPSImage::loadImage()': src/video/cpsimage.cpp:89:37: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] image = scaler.scale(imgtmp,scaleq); ^~~~~~ In file included from src/video/graphicsengine.cpp:10: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/video/graphicsengine.cpp:10: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/video/graphicsengine.cpp:10: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/video/graphicsengine.cpp:13: src/include/cursor.h: In member function 'Uint16 Cursor::getX()': src/include/cursor.h:43:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return x+cursor_offset; ~^~~~~~~~~~~~~~ src/include/cursor.h: In member function 'Uint16 Cursor::getY()': src/include/cursor.h:47:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return y+cursor_offset; ~^~~~~~~~~~~~~~ In file included from src/include/playerpool.h:10, from src/include/graphicsengine.h:12, from src/video/wsa.cpp:6: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ c++ -o src/vfs/vfs.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/vfs/vfs.cpp In file included from src/video/wsa.cpp:5: src/video/wsa.cpp: In constructor 'WSA::WSA(const char*)': src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/wsa.cpp:44:28: note: in expansion of macro 'readword' header.NumFrames = readword(wsadata, 0); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/wsa.cpp:45:23: note: in expansion of macro 'readword' header.xpos = readword(wsadata, 2); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/wsa.cpp:46:23: note: in expansion of macro 'readword' header.ypos = readword(wsadata, 4); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/wsa.cpp:47:24: note: in expansion of macro 'readword' header.width = readword(wsadata, 6); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/wsa.cpp:48:25: note: in expansion of macro 'readword' header.height = readword(wsadata, 8); ^~~~~~~~ src/video/wsa.cpp:63:26: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].r <<= 2; ~~~~~~~~~~~~~^~~~~ src/video/wsa.cpp:64:26: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].g <<= 2; ~~~~~~~~~~~~~^~~~~ src/video/wsa.cpp:65:26: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].b <<= 2; ~~~~~~~~~~~~~^~~~~ src/video/wsa.cpp:78:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] header.NumFrames += 1; /* Add loop frame */ ~~~~~~~~~~~~~~~~~^~~~ src/video/wsa.cpp: In member function 'void WSA::animate()': src/video/wsa.cpp:137:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = header.width<<1; ~~~~~~~~~~~~^~~ src/video/wsa.cpp:138:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = header.height<<1; ~~~~~~~~~~~~~^~~ src/video/wsa.cpp:139:56: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = (pc::gfxeng->getWidth()-(header.width<<1))>>1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/video/wsa.cpp:140:58: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = (pc::gfxeng->getHeight()-(header.height<<1))>>1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/video/wsa.cpp:157:29: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] frame = decodeFrame(i); ^ src/video/wsa.cpp:131:14: warning: variable 'dest' set but not used [-Wunused-but-set-variable] SDL_Rect dest; ^~~~ In file included from src/include/playerpool.h:10, from src/include/graphicsengine.h:12, from src/video/graphicsengine.cpp:14: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/include/input.h:9, from src/video/graphicsengine.cpp:15: src/include/selection.h: In member function 'Uint32 Selection::numbUnits() const': src/include/selection.h:35:52: warning: conversion from 'std::__cxx11::list::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 numbUnits() const {return sel_units.size();} ~~~~~~~~~~~~~~^~ In file included from src/video/graphicsengine.cpp:19: src/include/sidebar.h: In member function 'Uint16 Sidebar::width()': src/include/sidebar.h:59:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return sbar->w; ~~~~~~^ src/video/message.cpp: In member function 'SDL_Surface* MessagePool::getMessages()': src/video/message.cpp:70:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = textimg->w; ~~~~~~~~~^ src/video/message.cpp:71:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = textimg->h; ~~~~~~~~~^ c++ -o src/ui/menu.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/ui/menu.cpp In file included from src/video/graphicsengine.cpp:20: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ c++ -o src/ui/sidebar.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/ui/sidebar.cpp src/video/imageproc.cpp: In member function 'void ImageProc::scaleInterlace(SDL_Surface*, SDL_Surface*)': src/video/imageproc.cpp:32:38: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] xpos[cx] = (Uint16)(cxf+0.5f)*src->format->BytesPerPixel; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/imageproc.cpp: In member function 'void ImageProc::scaleNearest(SDL_Surface*, SDL_Surface*)': src/video/imageproc.cpp:76:38: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] xpos[cx] = (Uint16)(cxf+0.5f)*src->format->BytesPerPixel; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/video/graphicsengine.cpp:21: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::setupCurrentGame()': src/video/graphicsengine.cpp:182:42: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] tilewidth = p::ccmap->getMapTile(0)->w; ~~~~~~~~~~~~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:183:40: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] tileheight = p::ccmap->getMapTile(0)->h; ~~~~~~~~~~~~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:187:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maparea.h = height-pc::sidebar->getTabLocation()->h; ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:189:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maparea.w = width-pc::sidebar->getTabLocation()->w; ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:192:41: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maparea.w = p::ccmap->getWidth()*tilewidth; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:195:42: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maparea.h = p::ccmap->getHeight()*tilewidth; ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:207:67: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] minizoom.normal = (tilewidth*pc::sidebar->getTabLocation()->w)/max(maparea.w, maparea.h); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:208:26: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] minizoom.max = max(1,tilewidth*pc::sidebar->getTabLocation()->w / max( ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p::ccmap->getWidth()*tilewidth, p::ccmap->getHeight()*tilewidth)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::clipToMaparea(SDL_Rect*)': src/video/graphicsengine.cpp:228:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest->w -= maparea.x-dest->x; ~~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:232:29: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest->h = maparea.y - dest->y; ~~~~~~~~~~^~~~~~~~~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::clipToMaparea(SDL_Rect*, SDL_Rect*)': src/video/graphicsengine.cpp:240:28: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] src->x = maparea.x - dest->x; ~~~~~~~~~~^~~~~~~~~ src/video/graphicsengine.cpp:241:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] src->w -= src->x; ~~~~~~~^~~~~~~~~ src/video/graphicsengine.cpp:246:28: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] src->y = maparea.y - dest->y; ~~~~~~~~~~^~~~~~~~~ src/video/graphicsengine.cpp:247:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] src->h -= src->y; ~~~~~~~^~~~~~~~~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawMinimap()': src/video/graphicsengine.cpp:400:37: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = maparea.x+maparea.w+clip.x; ~~~~~~~~~~~~~~~~~~~^~~~~~~ src/video/graphicsengine.cpp:401:27: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = maparea.y+clip.y; ~~~~~~~~~^~~~~~~ src/video/graphicsengine.cpp:403:39: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] src.x = p::ccmap->getXScroll()*minizoom; ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ src/video/graphicsengine.cpp:404:39: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] src.y = p::ccmap->getYScroll()*minizoom; ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ src/video/graphicsengine.cpp:408:32: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] src.x = minimap->w - src.w; ~~~~~~~~~~~^~~~~~~ src/video/graphicsengine.cpp:411:32: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] src.y = minimap->h - src.h; ~~~~~~~~~~~^~~~~~~ src/video/graphicsengine.cpp:416:19: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] minx = min(curpos%mapwidth, mapwidth - clip.tilew); ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:435:42: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = maparea.x+maparea.w+clip.x+xpos*minizoom; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ src/video/graphicsengine.cpp:436:32: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = maparea.y+clip.y+ypos*minizoom; ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ src/video/graphicsengine.cpp:446:56: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = maparea.x+maparea.w+clip.x+xpos*minizoom; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ src/video/graphicsengine.cpp:447:46: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = maparea.y+clip.y+ypos*minizoom; ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ src/video/graphicsengine.cpp:448:38: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = minizoom+2; ~~~~~~~~^~ src/video/graphicsengine.cpp:449:36: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = dest.w+1; ~~~~~~^~ src/video/graphicsengine.cpp: In member function 'bool GraphicsEngine::MapPosToScreenXY(Uint32, Sint16*, Sint16*)': src/video/graphicsengine.cpp:478:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] *ScreenX *= tilewidth; ~~~~~~~~~^~~~~~~~~~~~ src/video/graphicsengine.cpp:479:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] *ScreenY *= tileheight; ~~~~~~~~~^~~~~~~~~~~~~ src/video/graphicsengine.cpp:484:39: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] *ScreenX -= p::ccmap->getXTileScroll(); ^ src/video/graphicsengine.cpp:485:39: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] *ScreenY -= p::ccmap->getYTileScroll(); ^ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawRepairing()': src/video/graphicsengine.cpp:623:62: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.x = xpos + (str->getType()->getXsize() * tilewidth/2)- (RepairImg->w/2); //+ (str->getType()->getXsize() * tilewidth) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:624:64: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.y = ypos + (str->getType()->getYsize() * tileheight/2) - (RepairImg->h/2)/* + (str->getType()->getYsize() * tileheight) */; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:625:24: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.w = RepairImg->w; ~~~~~~~~~~~^ src/video/graphicsengine.cpp:626:24: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.h = RepairImg->h; ~~~~~~~~~~~^ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawVehicleSmoke()': src/video/graphicsengine.cpp:638:9: warning: variable 'NumbSmokeImg' set but not used [-Wunused-but-set-variable] Uint32 NumbSmokeImg; ^~~~~~~~~~~~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawGroundUnitHealthBars(SDL_Rect, SDL_Rect, Uint32)': src/video/graphicsengine.cpp:724:47: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] un = p::uspool->getGroundUnitAt(curdpos,i); ^ src/video/graphicsengine.cpp:729:24: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.x = dest.x + un->getXoffset(); ~~~~~~~^~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:730:24: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.y = dest.y + un->getYoffset(); ~~~~~~~^~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:733:16: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.x += 6; ~~~~~~~~^~~~ src/video/graphicsengine.cpp:734:16: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.y += 5; ~~~~~~~~^~~~ src/video/graphicsengine.cpp:736:16: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.x += 12; ~~~~~~~~^~~~~ src/video/graphicsengine.cpp:738:16: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.y += 10; ~~~~~~~~^~~~~ src/video/graphicsengine.cpp:740:16: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.x += 12; ~~~~~~~~^~~~~ src/video/graphicsengine.cpp:741:16: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.y += 10; ~~~~~~~~^~~~~ src/video/graphicsengine.cpp:748:15: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.h -= 2; ~~~~~~~~^~~~ src/video/graphicsengine.cpp:766:13: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.h -= 2; ~~~~~~~~^~~~ src/video/graphicsengine.cpp:779:47: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.x = dest.x + 7 + un->getXoffset() + k * 7; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ src/video/graphicsengine.cpp:780:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.y = dest.y + 43 + un->getYoffset(); ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:786:32: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (un->GetResourceType (k, &ResourceType)) ^ src/video/graphicsengine.cpp:790:15: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.h -= 2; ~~~~~~~~^~~~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawFlyingUnitHealthBars(SDL_Rect, SDL_Rect, Uint32)': src/video/graphicsengine.cpp:832:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.h -= 2; ~~~~~~~~^~~~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawStructureHealthBars(SDL_Rect, SDL_Rect, Uint32)': src/video/graphicsengine.cpp:868:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.h -= 2; ~~~~~~~~^~~~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawFogOfWar(SDL_Rect, SDL_Rect, SDL_Rect)': src/video/graphicsengine.cpp:889:66: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] mapWidth = (maparea.w+p::ccmap->getXTileScroll()+tilewidth-1)/tilewidth; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:891:67: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] mapHeight = (maparea.h+p::ccmap->getYTileScroll()+tilewidth-1)/tilewidth; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:899:20: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = maparea.y-p::ccmap->getYTileScroll(); ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:903:21: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = maparea.x-p::ccmap->getXTileScroll(); ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:940:49: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] SDL_BlitSurface(p::ccmap->getShadowTile(0+shadowoffs), &src, screen, &udest); ~^~~~~~~~~~~ src/video/graphicsengine.cpp:943:49: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] SDL_BlitSurface(p::ccmap->getShadowTile(1+shadowoffs), &src, screen, &udest); ~^~~~~~~~~~~ src/video/graphicsengine.cpp:946:49: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] SDL_BlitSurface(p::ccmap->getShadowTile(3+shadowoffs), &src, screen, &udest); ~^~~~~~~~~~~ src/video/graphicsengine.cpp:949:49: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] SDL_BlitSurface(p::ccmap->getShadowTile(5+shadowoffs), &src, screen, &udest); ~^~~~~~~~~~~ src/video/graphicsengine.cpp:952:49: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] SDL_BlitSurface(p::ccmap->getShadowTile(8+shadowoffs), &src, screen, &udest); ~^~~~~~~~~~~ src/video/graphicsengine.cpp:955:49: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] SDL_BlitSurface(p::ccmap->getShadowTile(9+shadowoffs), &src, screen, &udest); ~^~~~~~~~~~~ src/video/graphicsengine.cpp:958:50: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] SDL_BlitSurface(p::ccmap->getShadowTile(10+shadowoffs), &src, screen, &udest); ~~^~~~~~~~~~~ src/video/graphicsengine.cpp:961:50: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] SDL_BlitSurface(p::ccmap->getShadowTile(11+shadowoffs), &src, screen, &udest); ~~^~~~~~~~~~~ src/video/graphicsengine.cpp:1001:50: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] SDL_BlitSurface(p::ccmap->getShadowTile(8+shadowoffs), &src, screen, &udest); ~^~~~~~~~~~~ src/video/graphicsengine.cpp:1004:50: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] SDL_BlitSurface(p::ccmap->getShadowTile(9+shadowoffs), &src, screen, &udest); ~^~~~~~~~~~~ src/video/graphicsengine.cpp:1007:51: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] SDL_BlitSurface(p::ccmap->getShadowTile(10+shadowoffs), &src, screen, &udest); ~~^~~~~~~~~~~ src/video/graphicsengine.cpp:1010:51: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] SDL_BlitSurface(p::ccmap->getShadowTile(11+shadowoffs), &src, screen, &udest); ~~^~~~~~~~~~~ src/video/graphicsengine.cpp:1038:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x += tilewidth; ~~~~~~~^~~~~~~~~~~~ src/video/graphicsengine.cpp:1042:10: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y += tilewidth; ~~~~~~~^~~~~~~~~~~~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawMap(SDL_Rect, SDL_Rect, SDL_Rect)': src/video/graphicsengine.cpp:1078:66: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] mapWidth = (maparea.w+p::ccmap->getXTileScroll()+tilewidth-1)/tilewidth; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:1080:67: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] mapHeight = (maparea.h+p::ccmap->getYTileScroll()+tilewidth-1)/tilewidth; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:1083:12: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] xmax = min(p::ccmap->getWidth()-(p::ccmap->getXScroll()+mapWidth), 4); ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1084:12: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] ymax = min(p::ccmap->getHeight()-(p::ccmap->getYScroll()+mapHeight), 4); ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1088:23: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = maparea.y-p::ccmap->getYTileScroll(); ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1094:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = maparea.x - p::ccmap->getXTileScroll(); ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1142:33: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] if (p::uspool->hasL2overlay(curpos)) { ^~~~~~ src/video/graphicsengine.cpp:1143:27: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'std::vector::value_type' {aka 'short unsigned int'} may change value [-Wconversion] l2overlays.push_back(curpos); ^~~~~~ src/video/graphicsengine.cpp:1158:12: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y -= (tilewidth<<1); ~~~~~~~^~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1166:29: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] src.w = images.image->w; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1167:29: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] src.h = images.image->h; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1168:23: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.x = dest.x+txoff; ~~~~~~^~~~~~ src/video/graphicsengine.cpp:1169:23: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.y = dest.y+tyoff; ~~~~~~^~~~~~ src/video/graphicsengine.cpp:1170:31: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.w = images.image->w; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1171:31: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.h = images.image->h; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1183:42: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] numshps = p::uspool->getStructureNum(curdpos, &unitorstructshps, &uxoffsets, &uyoffsets); ^~~~~~~ src/video/graphicsengine.cpp:1190:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] src.w = images.image->w; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1191:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] src.h = images.image->h; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1192:24: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.x = dest.x+uxoffsets[i]; ~~~~~~^~~~~~~~~~~~~ src/video/graphicsengine.cpp:1193:24: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.y = dest.y+uyoffsets[i]; ~~~~~~^~~~~~~~~~~~~ src/video/graphicsengine.cpp:1194:32: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.w = images.image->w; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1195:32: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.h = images.image->h; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1219:12: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y += (tilewidth<<1); ~~~~~~~^~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1221:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x += tilewidth; ~~~~~~~^~~~~~~~~~~~ src/video/graphicsengine.cpp:1225:10: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y += tilewidth; ~~~~~~~^~~~~~~~~~~~ src/video/graphicsengine.cpp:1230:23: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = maparea.y-p::ccmap->getYTileScroll(); ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1234:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = maparea.x - p::ccmap->getXTileScroll(); ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1247:12: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y -= (tilewidth<<1); ~~~~~~~^~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1287:37: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] numshps = p::uspool->getUnitNum(curdpos, &unitorstructshps, &uxoffsets, &uyoffsets); ^~~~~~~ src/video/graphicsengine.cpp:1294:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] src.w = images.image->w; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1295:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] src.h = images.image->h; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1296:24: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.x = dest.x+uxoffsets[i]; ~~~~~~^~~~~~~~~~~~~ src/video/graphicsengine.cpp:1297:24: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.y = dest.y+uyoffsets[i]; ~~~~~~^~~~~~~~~~~~~ src/video/graphicsengine.cpp:1298:32: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.w = images.image->w; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1299:32: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.h = images.image->h; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1321:43: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] numshps = p::uspool->getFlyingUnitNum(curdpos, &unitorstructshps, &uxoffsets, &uyoffsets); ^~~~~~~ src/video/graphicsengine.cpp:1329:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] src.w = images.image->w; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1330:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] src.h = images.image->h; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1331:24: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.x = dest.x+uxoffsets[i]; ~~~~~~^~~~~~~~~~~~~ src/video/graphicsengine.cpp:1332:24: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.y = dest.y+uyoffsets[i]; ~~~~~~^~~~~~~~~~~~~ src/video/graphicsengine.cpp:1333:32: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.w = images.image->w; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1334:32: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.h = images.image->h; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1356:12: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y += (tilewidth<<1); ~~~~~~~^~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1358:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x += tilewidth; ~~~~~~~^~~~~~~~~~~~ src/video/graphicsengine.cpp:1362:10: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y += tilewidth; ~~~~~~~^~~~~~~~~~~~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawL2Overlays()': src/video/graphicsengine.cpp:1384:48: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = maparea.x-p::ccmap->getXTileScroll()+(curpos%p::ccmap->getWidth()-p::ccmap->getXScroll())*tilewidth; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1385:48: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = maparea.y-p::ccmap->getYTileScroll()+(curpos/p::ccmap->getWidth()-p::ccmap->getYScroll())*tilewidth; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1386:38: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] numshps = p::uspool->getL2overlays(curpos, &unitorstructshps, &uxoffsets, &uyoffsets); ^~~~~~ src/video/graphicsengine.cpp:1400:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.x = dest.x + uxoffsets[curdpos]; ~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1401:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] udest.y = dest.y + uyoffsets[curdpos]; ~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1402:29: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.w = images.image->w; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1403:29: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] udest.h = images.image->h; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawSelectionBox()': src/video/graphicsengine.cpp:1429:15: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = abs(Input::getMarkRect().x - Input::getMarkRect().w); ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1432:64: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y += abs(Input::getMarkRect().y - Input::getMarkRect().h); ^ src/video/graphicsengine.cpp:1434:64: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y -= abs(Input::getMarkRect().y - Input::getMarkRect().h); ^ src/video/graphicsengine.cpp:1435:15: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = abs(Input::getMarkRect().y - Input::getMarkRect().h); ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1438:64: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x += abs(Input::getMarkRect().x - Input::getMarkRect().w); ^ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawMouse()': src/video/graphicsengine.cpp:1464:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = curimg->w; ~~~~~~~~^ src/video/graphicsengine.cpp:1465:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = curimg->h; ~~~~~~~~^ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawTooltip()': src/video/graphicsengine.cpp:1487:10: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x -= curimg->w; ~~~~~~~^~~~~~~~~~~~ src/video/graphicsengine.cpp:1488:10: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x -= 2; ~~~~~~~^~~~ src/video/graphicsengine.cpp:1492:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = curimg->w; ~~~~~~~~^ src/video/graphicsengine.cpp:1493:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = curimg->h; ~~~~~~~~^ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::renderScene(bool)': src/video/graphicsengine.cpp:1540:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = curimg->w; ~~~~~~~~^ src/video/graphicsengine.cpp:1541:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = curimg->h; ~~~~~~~~^ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::drawSidebar()': src/video/graphicsengine.cpp:1588:31: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maparea.h = height-tabpos->h; ~~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:1590:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maparea.w = width-tabpos->w; ~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:1593:49: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maparea.w = p::ccmap->getWidth()*tilewidth; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:1594:56: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] maparea.x = (width-tabpos->w-maparea.w)>>1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/video/graphicsengine.cpp:1597:50: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maparea.h = p::ccmap->getHeight()*tilewidth; ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:1598:38: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] maparea.y = tabpos->h+((height-tabpos->h-maparea.h)>>1); ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1603:24: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = width - tabpos->w; ~~~~~~^~~~~~~~~~~ src/video/graphicsengine.cpp:1606:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = height - tabpos->h; ~~~~~~~^~~~~~~~~~~ src/video/graphicsengine.cpp:1614:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maparea.h = height-tabpos->h; ~~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:1619:45: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maparea.w = p::ccmap->getWidth()*tilewidth; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:1620:42: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] maparea.x = (width-maparea.w)>>1; ~~~~~~~~~~~~~~~~~^~~ src/video/graphicsengine.cpp:1623:46: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] maparea.h = p::ccmap->getHeight()*tilewidth; ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/video/graphicsengine.cpp:1624:34: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] maparea.y = tabpos->h+((height-tabpos->h-maparea.h)>>1); ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1644:36: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = tabpos->y + tabpos->h - OptionsLabel->getHeight(); ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1645:55: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = ( (tabpos->w - OptionsLabel->getWidth()) >>1);//+tabpos->x; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/video/graphicsengine.cpp:1654:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = OptionsSurface->w; ~~~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1655:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = OptionsSurface->h; ~~~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1659:57: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = ((TabImage->w - OptionsLabel->getWidth()) >>1); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/video/graphicsengine.cpp:1660:37: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = tabpos->y + tabpos->h - OptionsLabel->getHeight(); ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1671:23: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] tabpos->x = width - tabpos->w; ~~~~~~^~~~~~~~~~~ src/video/graphicsengine.cpp:1690:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = MoneySurface->w; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1691:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = MoneySurface->h; ~~~~~~~~~~~~~~^ src/video/graphicsengine.cpp:1697:49: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = ((tabpos->w - MoneyLabel->getWidth())>>1); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/video/graphicsengine.cpp:1698:34: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = tabpos->y + tabpos->h - MoneyLabel->getHeight(); ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1708:30: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] framerate = (frames*1000)/(tick - firstframe+1); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp:1711:24: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] clearCoor.w = width-2*tabpos->w;/*100;*/ ~~~~~^~~~~~~~~~~~ src/video/graphicsengine.cpp:1712:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] clearCoor.h = tabpos->h+4;/*20;*/ ~~~~~~~~~^~ src/video/graphicsengine.cpp:1736:39: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] clearCoor.y = tabpos->y + tabpos->h - FrameRateLabel->getHeight(); ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::drawVQAFrame(SDL_Surface*)': src/video/graphicsengine.cpp:1757:21: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = frame->w; ~~~~~~~^ src/video/graphicsengine.cpp:1758:21: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = frame->h; ~~~~~~~^ src/video/graphicsengine.cpp:1759:34: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = (screen->w-frame->w)>>1; ~~~~~~~~~~~~~~~~~~~~^~~ src/video/graphicsengine.cpp:1760:34: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = (screen->h-frame->h)>>1; ~~~~~~~~~~~~~~~~~~~~^~~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::renderLoading(const string&, SDL_Surface*)': src/video/graphicsengine.cpp:1816:33: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = (width-logo->w)/2; ~~~~~~~~~~~~~~~^~ src/video/graphicsengine.cpp:1817:34: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = (height-logo->h)/2; ~~~~~~~~~~~~~~~~^~ src/video/graphicsengine.cpp:1834:35: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = (width-curimg->w)/2; ~~~~~~~~~~~~~~~~~^~ src/video/graphicsengine.cpp:1835:36: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = (height-curimg->h)/2; ~~~~~~~~~~~~~~~~~~^~ src/video/graphicsengine.cpp:1836:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = curimg->w; ~~~~~~~~^ src/video/graphicsengine.cpp:1837:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = curimg->h; ~~~~~~~~^ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::drawLine(Sint16, Sint16, Sint16, Sint16, Uint16, Uint32)': src/video/graphicsengine.cpp:1855:18: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] length = sqrt(xmod*xmod+ymod*ymod); ~~~~^~~~~~~~~~~~~~~~~~~~~ c++ -o src/ui/font.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/ui/font.cpp In file included from src/include/common.h:5, from src/video/renderer.cpp:4: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ c++ -o src/ui/input.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/ui/input.cpp src/game/loadmap.cpp: In member function 'SDL_Surface* CnCMap::loadTile(INIFile*, Uint16, Uint8, Uint32*)': src/game/loadmap.cpp:1189:22: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=] sprintf(tilenum, "tiletype%d", tile); ^~~~~~~~~~~~ src/game/loadmap.cpp:1189:12: note: 'sprintf' output between 10 and 12 bytes into a destination of size 11 sprintf(tilenum, "tiletype%d", tile); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/include/common.h:5, from src/include/vfs.h:8, from src/video/pcximage.cpp:9: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ c++ -o src/ui/cursorpool.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/ui/cursorpool.cpp c++ -o src/ui/logger.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/ui/logger.cpp In file included from src/video/pcximage.cpp:6: src/video/pcximage.cpp: In constructor 'PCXImage::PCXImage(const char*, int)': src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/pcximage.cpp:45:18: note: in expansion of macro 'readword' header.XMin = readword(pcxdata,4); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/pcximage.cpp:46:18: note: in expansion of macro 'readword' header.YMin = readword(pcxdata,6); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/pcximage.cpp:47:18: note: in expansion of macro 'readword' header.XMax = readword(pcxdata,8); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/pcximage.cpp:48:18: note: in expansion of macro 'readword' header.YMax = readword(pcxdata,10); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/pcximage.cpp:49:18: note: in expansion of macro 'readword' header.HRes = readword(pcxdata,12); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/pcximage.cpp:50:18: note: in expansion of macro 'readword' header.VRes = readword(pcxdata,14); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/pcximage.cpp:71:21: note: in expansion of macro 'readword' header.BytesLine = readword(pcxdata,66); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/pcximage.cpp:72:20: note: in expansion of macro 'readword' header.PalType = readword(pcxdata,68); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/pcximage.cpp:73:23: note: in expansion of macro 'readword' header.HscreenSize = readword(pcxdata,70); ^~~~~~~~ src/include/fcnc_endian.h:17:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] #define readword(x,y) x[y] + (x[y+1] << 8) src/video/pcximage.cpp:74:23: note: in expansion of macro 'readword' header.VscreenSize = readword(pcxdata,72); ^~~~~~~~ src/video/pcximage.cpp: In member function 'void PCXImage::loadImage()': src/video/pcximage.cpp:177:19: warning: conversion from 'int' to 'unsigned char' may change value [-Wconversion] Number = Pixel-192; ~~~~~^~~~ src/video/pcximage.cpp:202:31: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] image = scaler.scale(imgtmp,scaleq); ^~~~~~ src/video/graphicsengine.cpp: In member function 'void GraphicsEngine::DrawGroundUnitHealthBars(SDL_Rect, SDL_Rect, Uint32)': src/video/graphicsengine.cpp:797:20: warning: 'ResourceType' may be used uninitialized in this function [-Wmaybe-uninitialized] SDL_FillRect(screen, &udest, ResourceType > 4?greenpix:redpix); In file included from src/include/common.h:5, from src/include/buildqueue.h:7, from src/ui/sidebar.cpp:10: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/common.h:5, from src/include/vfs.h:8, from src/ui/font.cpp:7: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/common.h:5, from src/vfs/vfs.cpp:13: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ c++ -o src/ui/pause_menu.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/ui/pause_menu.cpp In file included from src/include/common.h:5, from src/ui/menu.cpp:2: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/input.h:9, from src/ui/sidebar.cpp:14: src/include/selection.h: In member function 'Uint32 Selection::numbUnits() const': src/include/selection.h:35:52: warning: conversion from 'std::__cxx11::list::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 numbUnits() const {return sel_units.size();} ~~~~~~~~~~~~~~^~ In file included from src/ui/sidebar.cpp:18: src/include/sidebar.h: In member function 'Uint16 Sidebar::width()': src/include/sidebar.h:59:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return sbar->w; ~~~~~~^ src/ui/font.cpp: In member function 'void Font::Load(std::__cxx11::string)': src/ui/font.cpp:235:18: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] chrdest[i].x = fntotalw; ^~~~~~~~ src/ui/font.cpp:253:31: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, unsigned char>::value_type' {aka 'unsigned char'} may change value [-Wconversion] chardata[pos+i+1] = (data>>4); ~~~~~^~~~ src/ui/font.cpp: In member function 'void Font::drawText(const string&, SDL_Surface*, Uint32, Uint32, SDL_Surface*, SDL_Color, Uint32, Uint32)': src/ui/font.cpp:421:12: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] destr.x = DestStartx; ^~~~~~~~~~ src/ui/font.cpp:422:12: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] destr.y = DestStarty; ^~~~~~~~~~ src/ui/font.cpp:452:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] destr.x += src_rect->w+1; ~~~~~~~~^~~~~~~~~~~~~~~~ src/ui/font.cpp:457:27: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 Length = destr.x -DestStartx; ~~~~~~~~^~~~~~~~~~~ src/ui/font.cpp:458:51: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_h_line ( DestSurf, FGcolor, 0, DestSurf->h - 4, Length, 1 ); ~~~~~~~~~~~~^~~ src/ui/font.cpp:463:27: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 Length = destr.x -DestStartx; ~~~~~~~~^~~~~~~~~~~ src/ui/font.cpp:464:51: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_h_line ( DestSurf, FGcolor, 0, DestSurf->h - 4, Length, 1 ); ~~~~~~~~~~~~^~~ src/ui/font.cpp:465:51: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_h_line ( DestSurf, FGcolor, 0, DestSurf->h - 2, Length, 1 ); ~~~~~~~~~~~~^~~ In file included from src/include/playerpool.h:10, from src/ui/sidebar.cpp:20: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/include/unitandstructurepool.h:10, from src/ui/sidebar.cpp:21: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/ccmap.h:11, from src/include/unitandstructurepool.h:10, from src/ui/sidebar.cpp:21: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/common.h:5, from src/ui/cursorpool.cpp:2: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/common.h:5, from src/include/buildqueue.h:7, from src/ui/input.cpp:7: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/unitandstructurepool.h:10, from src/ui/sidebar.cpp:21: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/include/unitandstructurepool.h:10, from src/ui/sidebar.cpp:21: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/include/unitandstructurepool.h:10, from src/ui/sidebar.cpp:21: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/ui/sidebar.cpp:21: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ In file included from src/ui/sidebar.cpp:22: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from src/ui/sidebar.cpp:25: src/include/cursor.h: In member function 'Uint16 Cursor::getX()': src/include/cursor.h:43:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return x+cursor_offset; ~^~~~~~~~~~~~~~ src/include/cursor.h: In member function 'Uint16 Cursor::getY()': src/include/cursor.h:47:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return y+cursor_offset; ~^~~~~~~~~~~~~~ src/ui/sidebar.cpp: In constructor 'Sidebar::Sidebar(Player*, Uint16, const char*)': src/ui/sidebar.cpp:135:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] tablocation.w = tmp->w; ~~~~~^ src/ui/sidebar.cpp:136:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] tablocation.h = tmp->h; ~~~~~^ src/ui/sidebar.cpp:154:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] side += 6; ~~~~~^~~~ src/ui/sidebar.cpp:168:22: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] side += 3; ~~~~~^~~~ src/ui/sidebar.cpp:170:22: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] side -= 3; ~~~~~^~~~ src/ui/sidebar.cpp:195:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] radarlocation.w = radar->w; radarlocation.h = radar->h; ~~~~~~~^ src/ui/sidebar.cpp:195:59: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] radarlocation.w = radar->w; radarlocation.h = radar->h; ~~~~~~~^ src/ui/sidebar.cpp: In member function 'SDL_Surface* Sidebar::ReadShpImage(char*, int)': src/ui/sidebar.cpp:260:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] TempPic->getImage(ImageNumb, &image, &shadow, 1); ^~~~~~~~~ src/ui/sidebar.cpp: In member function 'SDL_Surface* Sidebar::getSidebarImage(SDL_Rect)': src/ui/sidebar.cpp:337:31: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = texture->h; ~~~~~~~~~^ src/ui/sidebar.cpp:341:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] src.h = texture->h; ~~~~~~~~~^ src/ui/sidebar.cpp:342:58: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] for (dest.y = 0; dest.y < location.h; dest.y += dest.h) { ~~~~~~~^~~~~~~~~ src/ui/sidebar.cpp:369:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] newdest.h = radar->h; ~~~~~~~^ src/ui/sidebar.cpp:370:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] newdest.w = radar->w; ~~~~~~~^ src/ui/sidebar.cpp:384:34: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Sint8' {aka 'signed char'} may change value [-Wconversion] for (Sint8 x = buttons.size()-1;x>=0;--x) { ~~~~~~~~~~~~~~^~ src/ui/sidebar.cpp: In member function 'void Sidebar::SetupButtons(Uint16)': src/ui/sidebar.cpp:425:33: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] strip = new SHPImage(tmpname, scaleq); ^~~~~~ src/ui/sidebar.cpp:431:28: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] geom.bh = strip->getHeight(); ~~~~~~~~~~~~~~~~^~ src/ui/sidebar.cpp:432:27: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] geom.bw = strip->getWidth(); ~~~~~~~~~~~~~~~^~ src/ui/sidebar.cpp:437:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] geom.bh = geom.bh>>2; ~~~~~~~^~~ src/ui/sidebar.cpp:439:41: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] buildbut = ((height-startoffs)/geom.bh)-2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/ui/sidebar.cpp:444:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollbase = startoffs + geom.bh*buildbut; ~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/ui/sidebar.cpp:445:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos+geom.bw,scrollbase,"stripup.shp",sbo_scroll|sbo_unit|sbo_up,0); // 0 ~~~~~~~~~~^~~~~~~~ src/ui/sidebar.cpp:446:13: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos,scrollbase,"stripup.shp",sbo_scroll|sbo_structure|sbo_up,0); // 1 ^~~~~~~~~~ src/ui/sidebar.cpp:448:31: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos+geom.bw+(geom.bw>>1),scrollbase,"stripdn.shp",sbo_scroll|sbo_unit|sbo_down,0); // 2 ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ src/ui/sidebar.cpp:449:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos+(geom.bw>>1),scrollbase,"stripdn.shp",sbo_scroll|sbo_structure|sbo_down,0); // 3 ~~~~~~~~~~^~~~~~~~~~~~~ src/ui/sidebar.cpp:451:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollbase = startoffs + geom.bh*buildbut; ~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/ui/sidebar.cpp:452:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos+geom.bw,scrollbase,"stripup.shp",sbo_scroll|sbo_unit|sbo_up,0); // 0 ~~~~~~~~~~^~~~~~~~ src/ui/sidebar.cpp:453:13: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos,scrollbase,"stripup.shp",sbo_scroll|sbo_structure|sbo_up,0); // 1 ^~~~~~~~~~ src/ui/sidebar.cpp:455:31: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos+geom.bw+(geom.bw>>1),scrollbase,"stripdn.shp",sbo_scroll|sbo_unit|sbo_down,0); // 2 ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ src/ui/sidebar.cpp:456:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos+(geom.bw>>1),scrollbase,"stripdn.shp",sbo_scroll|sbo_structure|sbo_down,0); // 3 ~~~~~~~~~~^~~~~~~~~~~~~ src/ui/sidebar.cpp:466:24: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos+geom.bw,startoffs+geom.bh*t,"stripus.shp",sbo_build|sbo_unit,0); ~~~~~~~~~~^~~~~~~~ src/ui/sidebar.cpp:466:42: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos+geom.bw,startoffs+geom.bh*t,"stripus.shp",sbo_build|sbo_unit,0); ~~~~~~~~~^~~~~~~~~~ src/ui/sidebar.cpp:468:24: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos+geom.bw,startoffs+geom.bh*t,"stripna.shp",sbo_build|sbo_unit,0); ~~~~~~~~~~^~~~~~~~ src/ui/sidebar.cpp:468:42: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos+geom.bw,startoffs+geom.bh*t,"stripna.shp",sbo_build|sbo_unit,0); ~~~~~~~~~^~~~~~~~~~ src/ui/sidebar.cpp:470:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos+geom.bw,startoffs+geom.bh*t,"strip.shp",sbo_build|sbo_unit,0); ~~~~~~~~~~^~~~~~~~ src/ui/sidebar.cpp:470:41: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos+geom.bw,startoffs+geom.bh*t,"strip.shp",sbo_build|sbo_unit,0); ~~~~~~~~~^~~~~~~~~~ src/ui/sidebar.cpp:475:14: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos,startoffs+geom.bh*t,"stripus.shp",sbo_build|sbo_structure,spalnum); ^~~~~~~~~~ src/ui/sidebar.cpp:475:34: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos,startoffs+geom.bh*t,"stripus.shp",sbo_build|sbo_structure,spalnum); ~~~~~~~~~^~~~~~~~~~ src/ui/sidebar.cpp:477:14: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos,startoffs+geom.bh*t,"stripna.shp",sbo_build|sbo_structure,spalnum); ^~~~~~~~~~ src/ui/sidebar.cpp:477:34: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos,startoffs+geom.bh*t,"stripna.shp",sbo_build|sbo_structure,spalnum); ~~~~~~~~~^~~~~~~~~~ src/ui/sidebar.cpp:479:13: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos,startoffs+geom.bh*t,"strip.shp",sbo_build|sbo_structure,spalnum); ^~~~~~~~~~ src/ui/sidebar.cpp:479:33: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] AddButton(ButtonXpos,startoffs+geom.bh*t,"strip.shp",sbo_build|sbo_structure,spalnum); ~~~~~~~~~^~~~~~~~~~ src/ui/sidebar.cpp: In member function 'void Sidebar::GetButtonName(Uint8, char*)': src/ui/sidebar.cpp:522:32: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 VecPtrIndex = index - 3 - ((function&sbo_unit)?0:buildbut); ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/include/common.h:5, from src/ui/logger.cpp:3: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ src/ui/sidebar.cpp: In member function 'void Sidebar::DrawButton(Uint8)': src/ui/sidebar.cpp:597:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] src.y = ButtonYpos/* * dest.h*/; ^~~~~~~~~~ src/ui/sidebar.cpp:598:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] src.w = temp->w; ~~~~~~^ src/ui/sidebar.cpp:610:27: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 offset = index - 4 + // First four buttons are scroll buttons ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ((func&sbo_unit) ~~~~~~~~~~~~~~~~ ? unitoff // Unit buttons are created first ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ : (structoff-buildbut) // See comment around line 265 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ); ~ src/ui/sidebar.cpp:624:42: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 length = strlen(icons[offset])-8; if (length>13) length = 13; ~~~~~~~~~~~~~~~~~~~~~^~ src/ui/sidebar.cpp:667:30: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] imgnum = (steps*progress)/100; ~~~~~~~~~~~~~~~~^~~~ src/ui/sidebar.cpp: In member function 'void Sidebar::DrawPowerbar()': src/ui/sidebar.cpp:698:24: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Powerbar_up->w; ~~~~~~~~~~~~~^ src/ui/sidebar.cpp:699:24: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Powerbar_up->h; ~~~~~~~~~~~~~^ src/ui/sidebar.cpp:704:27: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = radarlocation.h + Powerbar_up->h; ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ src/ui/sidebar.cpp:705:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Powerbar_down->w; ~~~~~~~~~~~~~~~^ src/ui/sidebar.cpp:706:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Powerbar_down->h; ~~~~~~~~~~~~~~~^ src/ui/sidebar.cpp: In member function 'void Sidebar::UpdatePowerbar()': src/ui/sidebar.cpp:756:24: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Powerbar_up->w; ~~~~~~~~~~~~~^ src/ui/sidebar.cpp:757:24: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Powerbar_up->h; ~~~~~~~~~~~~~^ src/ui/sidebar.cpp:762:27: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = radarlocation.h + Powerbar_up->h; ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ src/ui/sidebar.cpp:763:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Powerbar_down->w; ~~~~~~~~~~~~~~~^ src/ui/sidebar.cpp:764:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Powerbar_down->h; ~~~~~~~~~~~~~~~^ src/ui/sidebar.cpp:774:45: warning: conversion from 'unsigned int' to 'unsigned char' may change value [-Wconversion] unsigned char PowerPercentage = power * 100/ MaxPower; ~~~~~~~~~~~^~~~~~~~~~ src/ui/sidebar.cpp:779:49: warning: conversion from 'unsigned int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = radarlocation.h + 31 + MaxPowerHeight - PowerHeight; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ src/ui/sidebar.cpp:781:11: warning: conversion from 'unsigned int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = PowerHeight; ^~~~~~~~~~~ src/ui/sidebar.cpp:801:9: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x += 2; ~~~~~~~^~~~ src/ui/sidebar.cpp:810:91: warning: conversion from 'unsigned int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = radarlocation.h + 31 + MaxPowerHeight - (MaxPowerHeight * powerused / MaxPower) - PowerIndicator->h/2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ src/ui/sidebar.cpp:811:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = PowerIndicator->w; ~~~~~~~~~~~~~~~~^ src/ui/sidebar.cpp:812:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = PowerIndicator->h; ~~~~~~~~~~~~~~~~^ src/ui/sidebar.cpp: In member function 'void Sidebar::DrawSpecialIcons()': src/ui/sidebar.cpp:903:45: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] RepairLoc.y = radarlocation.h - Repair->h +2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/ui/sidebar.cpp:904:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] RepairLoc.w = Repair->w; ~~~~~~~~^ src/ui/sidebar.cpp:905:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] RepairLoc.h = Repair->h; ~~~~~~~~^ src/ui/sidebar.cpp:913:17: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] SellLoc.x = 18+IconSpacing; ~~^~~~~~~~~~~~ src/ui/sidebar.cpp:914:41: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] SellLoc.y = radarlocation.h - Sell->h +2; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/ui/sidebar.cpp:915:21: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SellLoc.w = Sell->w; ~~~~~~^ src/ui/sidebar.cpp:916:21: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SellLoc.h = Sell->h; ~~~~~~^ src/ui/sidebar.cpp:924:16: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] MapLoc.x = 18+2*IconSpacing; ~~^~~~~~~~~~~~~~ src/ui/sidebar.cpp:925:39: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] MapLoc.y = radarlocation.h - Map->h +2; ~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/ui/sidebar.cpp:926:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] MapLoc.w = Map->w; ~~~~~^ src/ui/sidebar.cpp:927:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] MapLoc.h = Map->h; ~~~~~^ src/ui/cursorpool.cpp: In member function 'cursorinfo* CursorPool::getCursorByName(const char*)': src/ui/cursorpool.cpp:35:21: warning: conversion from 'int' to 'char' may change value [-Wconversion] *p = toupper(*p); ~~~~~~~^~~~ src/ui/cursorpool.cpp:47:44: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] datum->anstart = cursorini->readInt(name,"start",0); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ src/ui/cursorpool.cpp:48:42: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] datum->anend = cursorini->readInt(name,"end",0); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ src/ui/sidebar.cpp: In member function 'void Sidebar::DrawClock(Uint8, Uint8)': src/ui/sidebar.cpp:1013:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Clocks[imgnum]->w; ~~~~~~~~~~~~~~~~^ src/ui/sidebar.cpp:1014:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Clocks[imgnum]->h; ~~~~~~~~~~~~~~~~^ src/ui/sidebar.cpp:1010:12: warning: variable 'dest' set but not used [-Wunused-but-set-variable] SDL_Rect dest; ^~~~ src/ui/sidebar.cpp: In member function 'void Sidebar::ClickButton(Uint8, char*, createmode_t*)': src/ui/sidebar.cpp:1059:25: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Build(index - 3 - ((f&sbo_unit)?0:buildbut),(f&sbo_unit),unitname, createmode); ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ui/sidebar.cpp: In member function 'void Sidebar::UpdateAvailableLists()': src/ui/sidebar.cpp:1149:38: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] prev_units_avail = uniticons.size(); ~~~~~~~~~~~~~~^~ src/ui/sidebar.cpp:1150:42: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] prev_structs_avail = structicons.size(); ~~~~~~~~~~~~~~~~^~ src/ui/sidebar.cpp: In member function 'void Sidebar::UpdateIcons()': src/ui/sidebar.cpp:1228:29: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Sint8' {aka 'signed char'} may change value [-Wconversion] for (Sint8 x=buttons.size()-1;x>=0;--x) { ~~~~~~~~~~~~~~^~ src/ui/sidebar.cpp: In member function 'SDL_Surface* Sidebar::SidebarButton::Fallback(const char*)': src/ui/sidebar.cpp:1304:25: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 slen = strlen(fname); ~~~~~~^~~~~~~ src/ui/sidebar.cpp: In member function 'void Sidebar::SidebarButton::ChangeImage(const char*, Uint8, Uint8)': src/ui/sidebar.cpp:1326:21: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 slen = strlen(fname); ~~~~~~^~~~~~~ src/ui/sidebar.cpp:1376:18: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] picloc.w = pic->w; ~~~~~^ src/ui/sidebar.cpp:1377:18: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] picloc.h = pic->h; ~~~~~^ src/ui/sidebar.cpp:1380:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] picloc.h >>=2; ~~~~~~~~~^~~~ src/ui/sidebar.cpp: In member function 'virtual void Sidebar::RadarAnimEvent::run()': src/ui/sidebar.cpp:1452:24: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = radarFrame->h; ~~~~~~~~~~~~^ src/ui/sidebar.cpp:1467:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = radarFrame->h; ~~~~~~~~~~~~^ src/ui/sidebar.cpp:1477:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = radarFrame->h; ~~~~~~~~~~~~^ In file included from src/include/playerpool.h:10, from src/include/graphicsengine.h:12, from src/ui/menu.cpp:5: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ c++ -o src/ui/selection.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/ui/selection.cpp In file included from src/ui/menu.cpp:8: src/include/cursor.h: In member function 'Uint16 Cursor::getX()': src/include/cursor.h:43:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return x+cursor_offset; ~^~~~~~~~~~~~~~ src/include/cursor.h: In member function 'Uint16 Cursor::getY()': src/include/cursor.h:47:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return y+cursor_offset; ~^~~~~~~~~~~~~~ src/ui/menu.cpp: In constructor 'MenuClass::MenuClass()': src/ui/menu.cpp:70:27: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] #define MIN(a, b) (a < b ? a : b) ~~~~~~~^~~~~~~~ src/ui/menu.cpp:76:17: note: in expansion of macro 'MIN' scale_factor = MIN(1.0 * display->w / unscaled_logo->w , 1.0 * display->h / unscaled_logo->h); ^~~ src/ui/menu.cpp:70:27: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] #define MIN(a, b) (a < b ? a : b) ~~~~~~~^~~~~~~~ src/ui/menu.cpp:76:17: note: in expansion of macro 'MIN' scale_factor = MIN(1.0 * display->w / unscaled_logo->w , 1.0 * display->h / unscaled_logo->h); ^~~ src/ui/menu.cpp:70:27: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] #define MIN(a, b) (a < b ? a : b) ~~~~~~~^~~~~~~~ src/ui/menu.cpp:79:17: note: in expansion of macro 'MIN' scale_factor = MIN(1.0 * display->w / unscaled_logo->w , 1.0 * display->h / unscaled_logo->h); ^~~ src/ui/menu.cpp:70:27: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion] #define MIN(a, b) (a < b ? a : b) ~~~~~~~^~~~~~~~ src/ui/menu.cpp:79:17: note: in expansion of macro 'MIN' scale_factor = MIN(1.0 * display->w / unscaled_logo->w , 1.0 * display->h / unscaled_logo->h); ^~~ src/ui/menu.cpp:237:7: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Ypos += 14; ~~~~~^~~~~ src/ui/menu.cpp:262:7: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Ypos += 14; ~~~~~^~~~~ src/ui/menu.cpp:284:7: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Ypos += 14; ~~~~~^~~~~ c++ -o src/ui/cursor.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/ui/cursor.cpp src/ui/menu.cpp: In member function 'void MenuClass::loadPal(const string&, SDL_Color*)': src/ui/menu.cpp:355:16: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].r <<= 2; ~~~~~~~~~~~~~^~~~~ src/ui/menu.cpp:356:16: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].g <<= 2; ~~~~~~~~~~~~~^~~~~ src/ui/menu.cpp:357:16: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] palette[i].b <<= 2; ~~~~~~~~~~~~~^~~~~ src/ui/menu.cpp: In member function 'void MenuClass::DrawMenuBackground()': src/ui/menu.cpp:369:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = display->w; ~~~~~~~~~^ src/ui/menu.cpp:370:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = display->h; ~~~~~~~~~^ src/ui/menu.cpp:378:37: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = (display->w - SDLlogo->w)/2; ~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/ui/menu.cpp:379:37: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = (display->h - SDLlogo->h)/2; ~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/ui/menu.cpp: In member function 'void MenuClass::DrawMousePointer()': src/ui/menu.cpp:416:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = mx; ^~ src/ui/menu.cpp:417:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = my; ^~ src/ui/menu.cpp:422:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = my_cursor->w; ~~~~~~~~~~~^ src/ui/menu.cpp:423:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = my_cursor->h; ~~~~~~~~~~~^ src/ui/menu.cpp: In member function 'void MenuClass::HandleInput()': src/ui/menu.cpp:516:26: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] numb_ai_players = Numb; ^~~~ src/ui/menu.cpp:616:38: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] pc::Config.totalplayers = 1 + numb_ai_players; ~~^~~~~~~~~~~~~~~~~ src/ui/menu.cpp: In member function 'int MenuClass::HandleMenu()': src/ui/menu.cpp:669:4: warning: variable 'old_mx' set but not used [-Wunused-but-set-variable] old_mx = 0, ^~~~~~ src/ui/menu.cpp:670:4: warning: variable 'old_my' set but not used [-Wunused-but-set-variable] old_my = 100; ^~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/ui/input.cpp:8: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/include/ccmap.h:11, from src/ui/input.cpp:8: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ src/ui/sidebar.cpp: In member function 'void Sidebar::GetButtonName(Uint8, char*)': src/ui/sidebar.cpp:514:9: warning: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation] strncpy(UnitOrStructureName,"xxxx",4); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/ui/input.cpp:8: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ In file included from src/include/ccmap.h:10, from src/ui/input.cpp:8: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ In file included from src/ui/input.cpp:8: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[pos] & 0xFF; src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/ui/input.cpp:11: src/include/cursor.h: In member function 'Uint16 Cursor::getX()': src/include/cursor.h:43:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return x+cursor_offset; ~^~~~~~~~~~~~~~ src/include/cursor.h: In member function 'Uint16 Cursor::getY()': src/include/cursor.h:47:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return y+cursor_offset; ~^~~~~~~~~~~~~~ In file included from src/include/input.h:9, from src/ui/input.cpp:13: src/include/selection.h: In member function 'Uint32 Selection::numbUnits() const': src/include/selection.h:35:52: warning: conversion from 'std::__cxx11::list::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 numbUnits() const {return sel_units.size();} ~~~~~~~~~~~~~~^~ c++ -o src/ui/widgets.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/ui/widgets.cpp In file included from src/include/playerpool.h:10, from src/ui/input.cpp:15: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ c++ -o src/vfs/filesystem/externalvfs.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/vfs/filesystem/externalvfs.cpp In file included from src/include/common.h:5, from src/ui/pause_menu.cpp:2: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/ui/input.cpp:18: src/include/sidebar.h: In member function 'Uint16 Sidebar::width()': src/include/sidebar.h:59:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return sbar->w; ~~~~~~^ c++ -o src/vfs/mix/mixvfs.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/vfs/mix/mixvfs.cpp In file included from src/ui/input.cpp:21: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from src/ui/input.cpp:22: src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbUnits()': src/include/unitandstructurepool.h:105:54: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbUnits (void) { return unitpool.size(); } ~~~~~~~~~~~~~^~ src/include/unitandstructurepool.h: In member function 'Uint32 UnitAndStructurePool::getNumbStructures()': src/include/unitandstructurepool.h:110:64: warning: conversion from 'std::vector::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 getNumbStructures (void) { return structurepool.size(); } ~~~~~~~~~~~~~~~~~~^~ src/ui/input.cpp: In constructor 'Input::Input(Uint16, Uint16, SDL_Rect*)': src/ui/input.cpp:50:40: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] tilewidth(p::ccmap->getMapTile(0)->w), lplayer(p::ppool->getLPlayer()), ~~~~~~~~~~~~~~~~~~~~~~~~~^ src/ui/input.cpp: In member function 'void Input::handle()': src/ui/input.cpp:100:38: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] markrect.x = mx; ^~ src/ui/input.cpp:101:38: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] markrect.y = my; ^~ src/ui/input.cpp:116:43: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (pc::sidebar->getSpecialButtonState(i) == 1){ // button down ^ src/ui/input.cpp:118:41: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] pc::sidebar->setSpecialButtonState(i, 0); // Set button up ^ src/ui/input.cpp:121:41: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] pc::sidebar->setSpecialButtonState(i, 2); // Set button down ^ src/ui/input.cpp:129:44: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] if (pc::sidebar->getSpecialButtonState(i) == 2){ // button down ^ src/ui/input.cpp:131:41: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] pc::sidebar->setSpecialButtonState(i, 0); // Set button up ^ src/ui/input.cpp:232:58: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 groupnum = event.key.keysym.sym-48; ~~~~~~~~~~~~~~~~~~~~^~~ src/ui/input.cpp:261:56: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 locnum = event.key.keysym.sym-282; ~~~~~~~~~~~~~~~~~~~~^~~~ src/ui/input.cpp:325:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] k_temp &= ~k_shift; ~~~~~~~^~~~~~~~~~~ src/ui/input.cpp:330:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] k_temp &= ~k_ctrl; ~~~~~~~^~~~~~~~~~ src/ui/input.cpp:335:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] k_temp &= ~k_alt; ~~~~~~~^~~~~~~~~ src/ui/input.cpp: In member function 'void Input::updateMousePos()': src/ui/input.cpp:469:41: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] int button = pc::sidebar->getButton( mx, my ); ^~ src/ui/input.cpp:469:45: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] int button = pc::sidebar->getButton( mx, my ); ^~ src/ui/input.cpp:473:36: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] pc::sidebar->DrawButtonTooltip(button); ^~~~~~ src/ui/input.cpp:489:47: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] markrect.w = maparea->x+maparea->w-1; ~~~~~~~~~~~~~~~~~~~~~^~ src/ui/input.cpp:491:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] markrect.w = mx; ^~ src/ui/input.cpp:493:29: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] markrect.h = my = maparea->y; ~~~^~~~~~~~~~~~ src/ui/input.cpp:495:47: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] markrect.h = maparea->y+maparea->h-1; ~~~~~~~~~~~~~~~~~~~~~^~ src/ui/input.cpp:497:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] markrect.h = my; ^~ src/ui/input.cpp:507:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] markrect.w = mx; ^~ src/ui/input.cpp:508:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] markrect.h = my; ^~ src/ui/input.cpp:526:46: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] tmp = p::ccmap->absScroll((mx-sx),(my-sy), 5); ~~~^~~~ src/ui/input.cpp:526:54: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] tmp = p::ccmap->absScroll((mx-sx),(my-sy), 5); ~~~^~~~ src/ui/input.cpp:537:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cursornum += CUR_SCROLLUP; src/ui/input.cpp:540:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cursornum += CUR_SCROLLUL; src/ui/input.cpp:543:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cursornum += CUR_SCROLLLEFT; src/ui/input.cpp:546:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cursornum += CUR_SCROLLDL; src/ui/input.cpp:549:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cursornum += CUR_SCROLLDOWN; src/ui/input.cpp:552:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cursornum += CUR_SCROLLDR; src/ui/input.cpp:555:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cursornum += CUR_SCROLLRIGHT; src/ui/input.cpp:558:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] cursornum += CUR_SCROLLUR; src/ui/input.cpp:571:31: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pc::cursor->setXY(mx, my); ^~ src/ui/input.cpp:571:35: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pc::cursor->setXY(mx, my); ^~ src/ui/input.cpp:577:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pc::cursor->setXY(mx, my); ^~ src/ui/input.cpp:577:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pc::cursor->setXY(mx, my); ^~ src/ui/input.cpp: In member function 'void Input::clickedTile(int, int, Uint16*, Uint8*)': src/ui/input.cpp:862:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] tx = mx/tilewidth; ~~^~~~~~~~~~ src/ui/input.cpp:863:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ty = my/tilewidth; ~~^~~~~~~~~~ src/ui/input.cpp:867:51: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *pos = (my/tilewidth)*p::ccmap->getWidth()+mx/tilewidth; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ src/ui/input.cpp:868:40: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *pos += p::ccmap->getScrollPos(); ^ src/ui/input.cpp:871:15: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] xrest = mx%tilewidth; ~~^~~~~~~~~~ src/ui/input.cpp:872:15: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] yrest = my%tilewidth; ~~^~~~~~~~~~ src/ui/input.cpp:879:18: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] (*subpos)+=2; ~~~~~~~~~^~~ src/ui/input.cpp: In member function 'void Input::setCursorByPos(int, int)': src/ui/input.cpp:918:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (p::uspool->getStructureAt(pos)->isRefinery ()) ^~ src/ui/input.cpp:920:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' return; ^~~~~~ src/ui/input.cpp: In member function 'void Input::selectRegion()': src/ui/input.cpp:1100:99: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] startx = (min(markrect.x, (Sint16)markrect.w)-maparea->x+p::ccmap->getXTileScroll())/tilewidth+p::ccmap->getXScroll(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ src/ui/input.cpp:1101:99: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] starty = (min(markrect.y, (Sint16)markrect.h)-maparea->y+p::ccmap->getYTileScroll())/tilewidth+p::ccmap->getYScroll(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ src/ui/input.cpp:1102:55: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] stopx = (abs(markrect.x - markrect.w)+1)/tilewidth+startx; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ src/ui/input.cpp:1103:55: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] stopy = (abs(markrect.y - markrect.h)+1)/tilewidth+starty; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ src/ui/input.cpp:1105:38: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] stopx = p::ccmap->getWidth() - 1; ~~~~~~~~~~~~~~~~~~~~~^~~ src/ui/input.cpp:1107:39: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] stopy = p::ccmap->getHeight() - 1; ~~~~~~~~~~~~~~~~~~~~~~^~~ src/ui/input.cpp:1111:51: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] curpos = scannery*p::ccmap->getWidth()+scannerx; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ src/ui/input.cpp: In member function 'void Input::clickSidebar(int, int, bool)': src/ui/input.cpp:1143:43: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] butclick = pc::sidebar->getSpecialButton(mx,my); ^~ src/ui/input.cpp:1143:46: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] butclick = pc::sidebar->getSpecialButton(mx,my); ^~ src/ui/input.cpp:1146:21: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if (butclick == 1 && pc::sidebar->getSpecialButtonState(2) == 0 || butclick == 2 && pc::sidebar->getSpecialButtonState(1) == 0 || butclick == 3){ ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ui/input.cpp:1152:39: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] butclick = pc::sidebar->getButton(mx,my); ^~ src/ui/input.cpp:1152:42: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] butclick = pc::sidebar->getButton(mx,my); ^~ src/ui/input.cpp: In member function 'Uint16 Input::checkPlace(int, int)': src/ui/input.cpp:1235:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pc::cursor->setXY(mx, my); ^~ src/ui/input.cpp:1235:31: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pc::cursor->setXY(mx, my); ^~ src/ui/input.cpp:1242:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pc::cursor->setXY(mx, my); ^~ src/ui/input.cpp:1242:31: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pc::cursor->setXY(mx, my); ^~ src/ui/input.cpp:1249:37: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] delta = (maparea->w / tilewidth)+p::ccmap->getXScroll(); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ src/ui/input.cpp:1250:44: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] delta -= (x + (placetype->getXsize()-1)); ^ src/ui/input.cpp:1252:11: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] x += delta-1; ~~^~~~~~~~~~ src/ui/input.cpp:1260:39: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pos = p::ccmap->translateToPos(x,y); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ src/ui/input.cpp:1262:37: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] delta = (maparea->h / tilewidth)+p::ccmap->getYScroll(); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ src/ui/input.cpp:1263:44: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] delta -= (y + (placetype->getYsize()-1)); ^ src/ui/input.cpp:1265:11: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] y += delta-1; ~~^~~~~~~~~~ src/ui/input.cpp:1271:38: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pos = p::ccmap->translateToPos(x,y); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ src/ui/input.cpp:1283:56: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] curpos = pos+placeypos*p::ccmap->getWidth()+placexpos; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/input.cpp:1284:55: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] placeoff = placeypos*placetype->getXsize()+placexpos; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/input.cpp:1316:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pc::cursor->setXY(mx, my); ^~ src/ui/input.cpp:1316:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] pc::cursor->setXY(mx, my); ^~ c++ -o src/vfs/mix/ws-key.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/vfs/mix/ws-key.cpp In file included from src/include/common.h:5, from src/ui/cursor.cpp:4: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ In file included from src/include/playerpool.h:10, from src/include/graphicsengine.h:12, from src/ui/pause_menu.cpp:5: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ In file included from src/include/common.h:5, from src/include/ccmap.h:9, from src/ui/selection.cpp:4: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ src/ui/input.cpp: In member function 'void Input::clickSidebar(int, int, bool)': src/ui/input.cpp:1160:12: warning: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation] strncpy(placename,"xxxx",4); ~~~~~~~^~~~~~~~~~~~~~~~~~~~ In file included from src/ui/pause_menu.cpp:8: src/include/cursor.h: In member function 'Uint16 Cursor::getX()': src/include/cursor.h:43:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return x+cursor_offset; ~^~~~~~~~~~~~~~ src/include/cursor.h: In member function 'Uint16 Cursor::getY()': src/include/cursor.h:47:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return y+cursor_offset; ~^~~~~~~~~~~~~~ In file included from src/ui/pause_menu.cpp:9: src/include/sidebar.h: In member function 'Uint16 Sidebar::width()': src/include/sidebar.h:59:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return sbar->w; ~~~~~~^ src/ui/pause_menu.cpp: In member function 'void PauseMenuClass::DrawMousePointer()': src/ui/pause_menu.cpp:74:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = mx; ^~ src/ui/pause_menu.cpp:75:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = my; ^~ src/ui/pause_menu.cpp:80:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = my_cursor->w; ~~~~~~~~~~~^ src/ui/pause_menu.cpp:81:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = my_cursor->h; ~~~~~~~~~~~^ src/ui/pause_menu.cpp: In member function 'void PauseMenuClass::HandleInput()': src/ui/pause_menu.cpp:118:28: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] p::ppool->getPlayer(i)->resumeBuilding(); ^ src/ui/pause_menu.cpp:125:28: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] p::ppool->getPlayer(i)->resumeBuilding(); ^ src/ui/pause_menu.cpp: In member function 'int PauseMenuClass::HandleMenu()': src/ui/pause_menu.cpp:152:23: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] p::ppool->getPlayer(i)->pauseBuilding(); ^ src/ui/pause_menu.cpp:144:5: warning: variable 'old_mx' set but not used [-Wunused-but-set-variable] old_mx = 0, ^~~~~~ src/ui/pause_menu.cpp:145:5: warning: variable 'old_my' set but not used [-Wunused-but-set-variable] old_my = 100; ^~~~~~ In file included from src/include/structure.h:9, from src/include/ccmap.h:11, from src/ui/selection.cpp:4: src/include/weaponspool.h: In member function 'Uint8 Warhead::getVersus(armour_t)': src/include/weaponspool.h:45:36: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return versus[(Uint8)armour]; ~~~~~~~~~~~~~~~~~~~~^ In file included from src/ui/cursor.cpp:6: src/include/cursor.h: In member function 'Uint16 Cursor::getX()': src/include/cursor.h:43:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return x+cursor_offset; ~^~~~~~~~~~~~~~ src/include/cursor.h: In member function 'Uint16 Cursor::getY()': src/include/cursor.h:47:12: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] return y+cursor_offset; ~^~~~~~~~~~~~~~ In file included from src/include/ccmap.h:11, from src/ui/selection.cpp:4: src/include/structure.h: In member function 'void Structure::changeImage(Uint8, Sint16)': src/include/structure.h:191:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] imagenumbers[layer]+=imagechange; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from src/include/playerpool.h:10, from src/include/graphicsengine.h:12, from src/ui/cursor.cpp:10: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ src/ui/cursor.cpp: In constructor 'Cursor::Cursor()': src/ui/cursor.cpp:38:57: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] transicn = new TemplateImage("trans.icn", mapscaleq, 1); ^ src/ui/cursor.cpp:41:54: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] transicn = new TemplateImage("trans.icn", mapscaleq); ^ src/ui/cursor.cpp: In member function 'void Cursor::reloadImages()': src/ui/cursor.cpp:100:13: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] setCursor(cursornum, nimgs); ^~~~~~~~~ src/ui/cursor.cpp: In member function 'void Cursor::setCursor(Uint16, Uint8)': src/ui/cursor.cpp:121:43: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] image[i] = cursorimg->getImage(cursornum+i); ~~~~~~~~~^~ src/ui/cursor.cpp:124:19: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] cursor_offset = -((image[0]->w)>>1); ^~~~~~~~~~~~~~~~~~~ src/ui/cursor.cpp: In member function 'void Cursor::setCursor(const char*)': src/ui/cursor.cpp:140:50: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] setCursor(ci->anstart, ci->anend - ci->anstart + 1); ~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/ui/cursor.cpp: In member function 'void Cursor::setPlaceCursor(Uint8, Uint8, Uint8*)': src/ui/cursor.cpp:189:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = transw->w; ~~~~~~~~^ src/ui/cursor.cpp:190:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = transw->h; ~~~~~~~~^ src/ui/cursor.cpp:198:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x += dest.w; ~~~~~~~^~~~~~~~~ src/ui/cursor.cpp:222:10: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x += dest.w; ~~~~~~~^~~~~~~~~ src/ui/cursor.cpp:224:10: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y += dest.h; ~~~~~~~^~~~~~~~~ src/ui/cursor.cpp: In member function 'void Cursor::setTooltip(std::__cxx11::string)': src/ui/cursor.cpp:279:37: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] h = 2*ToolTipLabel[0].getHeight() + 6; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/ui/cursor.cpp:281:36: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] w = ToolTipLabel[0].getWidth () + 10; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/ui/cursor.cpp:283:36: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] w = ToolTipLabel[1].getWidth () + 10; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/ui/cursor.cpp:298:73: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_solidrectangle ( TooltipSurface, CK_color, 0, 0, TooltipSurface->w, TooltipSurface->h ); ~~~~~~~~~~~~~~~~^ src/ui/cursor.cpp:298:92: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_solidrectangle ( TooltipSurface, CK_color, 0, 0, TooltipSurface->w, TooltipSurface->h ); ~~~~~~~~~~~~~~~~^ src/ui/cursor.cpp:305:57: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_solidrectangle ( TooltipSurface, BG_color, 0, 0, TopTextWidth, TextHeigth ); ^~~~~~~~~~~~ src/ui/cursor.cpp:305:71: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_solidrectangle ( TooltipSurface, BG_color, 0, 0, TopTextWidth, TextHeigth ); ^~~~~~~~~~ src/ui/cursor.cpp:308:54: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_solidrectangle ( TooltipSurface, BG_color, 0, TextHeigth, BottumTextWidth, TextHeigth ); ^~~~~~~~~~ src/ui/cursor.cpp:308:66: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_solidrectangle ( TooltipSurface, BG_color, 0, TextHeigth, BottumTextWidth, TextHeigth ); ^~~~~~~~~~~~~~~ src/ui/cursor.cpp:308:83: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_solidrectangle ( TooltipSurface, BG_color, 0, TextHeigth, BottumTextWidth, TextHeigth ); ^~~~~~~~~~ src/ui/cursor.cpp:311:52: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, 0, 0, TopTextWidth, 1, 1 ); ^~~~~~~~~~~~ src/ui/cursor.cpp:312:46: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, TopTextWidth, TextHeigth-1, BottumTextWidth - TopTextWidth, 1, 1 ); ^~~~~~~~~~~~ src/ui/cursor.cpp:312:70: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, TopTextWidth, TextHeigth-1, BottumTextWidth - TopTextWidth, 1, 1 ); ~~~~~~~~~~^~ src/ui/cursor.cpp:312:90: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, TopTextWidth, TextHeigth-1, BottumTextWidth - TopTextWidth, 1, 1 ); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ src/ui/cursor.cpp:315:71: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, 0, 0, 1, TooltipSurface->h, 1 ); ~~~~~~~~~~~~~~~~^ src/ui/cursor.cpp:318:67: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, 0, TooltipSurface->h-1, BottumTextWidth, 1, 1 ); ~~~~~~~~~~~~~~~~~^~ src/ui/cursor.cpp:318:71: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, 0, TooltipSurface->h-1, BottumTextWidth, 1, 1 ); ^~~~~~~~~~~~~~~ src/ui/cursor.cpp:319:46: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, BottumTextWidth, TextHeigth, (TooltipSurface->w-(ToolTipLabel[1].getWidth () + 10)), 1, 1 ); ^~~~~~~~~~~~~~~ src/ui/cursor.cpp:319:64: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, BottumTextWidth, TextHeigth, (TooltipSurface->w-(ToolTipLabel[1].getWidth () + 10)), 1, 1 ); ^~~~~~~~~~ In file included from src/ui/selection.cpp:4: src/include/ccmap.h: In member function 'void CnCMap::setTriggerByName(std::__cxx11::string, RA_Tiggers*)': src/include/ccmap.h:261:66: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy (&RaTriggers[i], Trig, sizeof (RA_Tiggers)); ^ src/ui/cursor.cpp:319:94: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'sIn file included from src/include/ccmap.h:10, from src/ui/selection.cpp:4: src/include/triggers.h:235:8: note: '__gnu_cxx::__alloc_traits, RA_Tiggers>::value_type' {aka 'struct RA_Tiggers'} declared here struct RA_Tiggers{ ^~~~~~~~~~ hort unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, BottumTextWidth, TextHeigth, (TooltipSurface->w-(ToolTipLabel[1].getWidth () + 10)), 1, 1 ); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ui/cursor.cpp:322:58: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, TopTextWidth-1, 0, 1, TextHeigth, 1 ); ~~~~~~~~~~~~^~ src/ui/cursor.cpp:322:69: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, TopTextWidth-1, 0, 1, TextHeigth, 1 ); ^~~~~~~~~~ src/ui/cursor.cpp:323:80: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, (ToolTipLabel[1].getWidth () + 10)-1, TextHeigth, 1, TextHeigth, 1 ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/ui/cursor.cpp:323:85: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, (ToolTipLabel[1].getWidth () + 10)-1, TextHeigth, 1, TextHeigth, 1 ); ^~~~~~~~~~ In file included from src/ui/selection.cpp:4: src/include/ccmap.h: In member function 'bool CnCMap::getResource(Uint32, Uint8*, Uint8*) const': src/include/ccmap.h:279:37: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *type = resourcematrix[src/ui/cursor.cpp:323:100: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'pos] & 0xFF; short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, (ToolTipLabel[1].getWidth () + 10)-1, TextHeigth, 1, TextHeigth, 1 ); ^~~~~~~~~~ src/include/ccmap.h:280:39: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] *amount = resourcematrix[pos] >> 8; src/include/ccmap.h: In member function 'void CnCMap::decreaseResource(Uint32, Uint8)': src/include/ccmap.h:288:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 TempAmount = resourcematrix[pos] >> 8; src/ui/cursor.cpp:343:35: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] h = ToolTipLabel[0].getHeight() + 4; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/include/ccmap.h:291:14: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] TempAmount -= amount; ~~~~~~~~~~~^~~~~~~~~ src/ui/cursor.cpp:344:35: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] w = ToolTipLabel[0].getWidth () + 10; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/include/ccmap.h:293:23: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits, short unsigned int>::value_type' {aka 'short unsigned int'} may change value [-Wconversion] resourcematrix[pos] |= (TempAmount << 8); src/ui/cursor.cpp:358:73: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_solidrectangle ( TooltipSurface, BG_color, 0, 0, TooltipSurface->w, TooltipSurface->h ); ~~~~~~~~~~~~~~~~^ src/ui/cursor.cpp:358:92: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_solidrectangle ( TooltipSurface, BG_color, 0, 0, TooltipSurface->w, TooltipSurface->h ); src/include/ccmap.h: In member function 'void CnCMap::setScrollPos(Uint32, Uint32)': src/include/ccmap.h:339:20: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] scrollpos.curx = x; ^ ~~~~~~~~~~~~~~~~^ src/include/ccmap.h:340:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka src/ui/cursor.cpp:361:68: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, 0, 0, TooltipSurface->w, TooltipSurface->h ); ~~~~~~~~~~~~~~~~^ 'short unsigned int'} may change value [-Wconversion] scrollpos.cury = y; ^ src/ui/cursor.cpp:361:87: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] draw_rectangle ( TooltipSurface, FG_color, 0, 0, TooltipSurface->w, TooltipSurface->h ); ~~~~~~~~~~~~~~~~^ src/include/ccmap.h: In member function 'void CnCMap::translateCoord(Uint32, Uint16*, Uint16*) const': src/include/ccmap.h:421:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/64; ~~~~~~~^~~ src/include/ccmap.h:424:26: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] *ty = linenum/128; ~~~~~~~^~~~ In file included from src/include/common.h:5, from src/ui/widgets.cpp:3: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ c++ -o src/vfs/mix/blowfish.o -c -pipe -O2 -fno-strict-aliasing -fpermissive -Wall -Wconversion -Wno-unused-parameter -Wall -Wconversion -Wno-unused-parameter -pthread -D_REENTRANT -D_THREAD_SAFE -Isrc/include -Isrc/include/lua -I/usr/local/include/SDL -I/usr/local/include src/vfs/mix/blowfish.cpp In file included from src/include/playerpool.h:10, from src/include/ai.h:8, from src/include/unit.h:17, from src/include/path.h:8, from src/ui/selection.cpp:7: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ src/ui/menu.cpp: In constructor 'MenuClass::MenuClass()': src/ui/menu.cpp:79:93: warning: 'unscaled_logo' may be used uninitialized in this function [-Wmaybe-uninitialized] scale_factor = MIN(1.0 * display->w / unscaled_logo->w , 1.0 * display->h / unscaled_logo->h); ^ src/vfs/mix/ws-key.cpp: In function 'void inv_bignum(Uint32*, Uint32*, Uint32)': src/vfs/mix/ws-key.cpp:364:41: warning: conversion from 'long int' to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] n2_bytelen = ((n2_bitlen - 1) / 32) * 4; ~~~~~~~~~~~~~~~~~~~~~~~^~~ src/vfs/mix/ws-key.cpp: In function 'void mul_bignum_word(Uint16*, Uint32*, Uint32, Uint32)': src/vfs/mix/ws-key.cpp:441:11: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] n1[0] += (unsigned short)tmp; ~~~~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from src/include/path.h:8, from src/ui/selection.cpp:7: src/include/unit.h: In member function 'Uint8 InfantryGroup::GetFreePos() const': src/include/unit.h:458:24: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return i; ^ src/include/unit.h: In member function 'Uint8 InfantryGroup::GetImageNums(Uint32**, Sint8**, Sint8**)': src/include/unit.h:478:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*xoffsets)[j]=positions[i]->getXoffset()+unitoffsets[i]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ src/include/unit.h:479:58: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] (*yoffsets)[j]=positions[i]->getYoffset()+unitoffsets[i+5]; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/include/unit.h: In member function 'void InfantryGroup::GetSubposOffsets(Uint8, Uint8, Sint8*, Sint8*)': src/include/unit.h:488:36: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *xoffs = unitoffsets[oldsp]-unitoffsets[newsp]; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/vfs/mix/ws-key.cpp: In function 'void calc_a_key(Uint32*, Uint32*, Uint32*, Uint32*, Uint32)': src/vfs/mix/ws-key.cpp:668:31: warning: conversion from 'Sint64' {aka 'long int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] n3_len = (n3_bitlen + 31) / 32; ~~~~~~~~~~~~~~~~~^~~~ src/include/unit.h:489:38: warning: conversion from 'int' to 'Sint8' {aka 'signed char'} may change value [-Wconversion] *yoffs = unitoffsets[oldsp+5]-unitoffsets[newsp+5]; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from src/ui/selection.cpp:9: src/include/selection.h: In member function 'Uint32 Selection::numbUnits() const': src/include/selection.h:35:52: warning: conversion from 'std::__cxx11::list::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] Uint32 numbUnits() const {return sel_units.size();} ~~~~~~~~~~~~~~^~ src/ui/selection.cpp: In member function 'Unit* Selection::getRandomUnit()': src/ui/selection.cpp:358:15: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] rnd = (int) ((double)sze*rand()/(RAND_MAX+1.0)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ui/selection.cpp: In member function 'bool Selection::loadSelection(Uint8)': src/ui/selection.cpp:403:111: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] for_each(sel_units.begin(), sel_units.end(), postloadproc(lplayernum, &enemy_selected, &numattacking)); ^ src/ui/selection.cpp:404:120: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] for_each(sel_structs.begin(), sel_structs.end(), postloadproc(lplayernum, &enemy_selected, &numattacking)); ^ In file included from src/include/playerpool.h:10, from src/include/graphicsengine.h:12, from src/ui/widgets.cpp:6: src/include/player.h: In member function 'Uint16 Player::getStructureLosses() const': src/include/player.h:94:44: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 getStructureLosses() const {return structurelosses;} ^~~~~~~~~~~~~~~ src/ui/widgets.cpp: In member function 'void RA_Label::Create()': src/ui/widgets.cpp:191:11: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Width; ^~~~~ src/ui/widgets.cpp:192:11: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Heigth; ^~~~~~ src/ui/widgets.cpp: In member function 'void RA_Label::Draw(int, int)': src/ui/widgets.cpp:263:16: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] LabelDest.x = X; ^ src/ui/widgets.cpp:264:16: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] LabelDest.y = Y; ^ src/ui/widgets.cpp:265:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] LabelDest.w = Width; ^~~~~ src/ui/widgets.cpp:266:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] LabelDest.h = Heigth; ^~~~~~ src/ui/widgets.cpp: In member function 'bool ButtonClass::handleMouseEvent(SDL_Event)': src/ui/widgets.cpp:393:65: warning: suggest parentheses around '&&' within '||' [-Wparentheses] }else if(event.type == SDL_MOUSEBUTTONUP || !this->MouseOver() && this->ButtonState != BUTTON_STATE_UP){ src/ui/widgets.cpp: In member function 'void ButtonClass::setposition(int, int)': src/ui/widgets.cpp:466:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] SizeAndPosition.x = x; ^ src/ui/widgets.cpp:467:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] SizeAndPosition.y = y; ^ src/ui/widgets.cpp: In member function 'void ButtonClass::setsize(int, int)': src/ui/widgets.cpp:472:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SizeAndPosition.w = w; ^ src/ui/widgets.cpp:473:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SizeAndPosition.h = h; ^ src/ui/widgets.cpp: In member function 'void ButtonClass::CreateSurface()': src/ui/widgets.cpp:563:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = SizeAndPosition.w - 2; ~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:573:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = SizeAndPosition.h - 2; ~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:622:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = SizeAndPosition.w - 2; ~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:632:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = SizeAndPosition.h - 2; ~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:682:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = SizeAndPosition.w - 2; ~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:692:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = SizeAndPosition.h - 2; ~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp: In member function 'void RA_WindowClass::SetupWindow(int, int, int, int)': src/ui/widgets.cpp:760:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] SizeAndPosition.x = Xpos; ^~~~ src/ui/widgets.cpp:761:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] SizeAndPosition.y = Ypos; ^~~~ src/ui/widgets.cpp:762:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SizeAndPosition.w = Width; ^~~~~ src/ui/widgets.cpp:763:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SizeAndPosition.h = Heigth; ^~~~~~ src/ui/widgets.cpp: In member function 'void RA_WindowClass::ResizeWindow(int, int)': src/ui/widgets.cpp:823:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SizeAndPosition.w = Width; ^~~~~ src/ui/widgets.cpp:824:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SizeAndPosition.h = Heigth; ^~~~~~ src/ui/widgets.cpp: In member function 'void RA_WindowClass::ChangeWindowPosition(int, int)': src/ui/widgets.cpp:847:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] SizeAndPosition.x = Xpos; ^~~~ src/ui/widgets.cpp:848:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] SizeAndPosition.y = Ypos; ^~~~ src/ui/widgets.cpp: In member function 'SDL_Surface* RA_WindowClass::ReadShpImage(char*, int, Uint8)': src/ui/widgets.cpp:878:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] TempPic->getImage(ImageNumb, &image, &shadow, palnum /*1*/); ^~~~~~~~~ src/ui/widgets.cpp: In member function 'void RA_WindowClass::DrawRaBackground()': src/ui/widgets.cpp:903:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = WindowSurface->w; ~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:904:26: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = WindowSurface->h; ~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:920:20: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = Image->w; ~~~~~~~^ src/ui/widgets.cpp:921:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = WindowSurface->w - Image->w; ~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:922:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = WindowSurface->h; ~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:925:21: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = Image->h; ~~~~~~~^ src/ui/widgets.cpp:931:20: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = Image->h; ~~~~~~~^ src/ui/widgets.cpp:932:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = WindowSurface->w; ~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:933:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = WindowSurface->h; ~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:955:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = WindowSurface->w; ~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:956:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Image->h; ~~~~~~~^ src/ui/widgets.cpp:961:20: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = Image->w; ~~~~~~~^ src/ui/widgets.cpp:962:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = WindowSurface->w - Image->w; ~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:963:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Image->h; ~~~~~~~^ src/ui/widgets.cpp:982:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = WindowSurface->h - Image->h; ~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:983:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = WindowSurface->w; ~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:984:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Image->h; ~~~~~~~^ src/ui/widgets.cpp:989:20: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = Image->w; ~~~~~~~^ src/ui/widgets.cpp:990:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = WindowSurface->w - Image->w; ~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:991:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Image->h; ~~~~~~~^ src/ui/widgets.cpp:1012:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Image->w; ~~~~~~~^ src/ui/widgets.cpp:1013:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = WindowSurface->h; ~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:1018:20: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = Image->h; ~~~~~~~^ src/ui/widgets.cpp:1019:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Image->w; ~~~~~~~^ src/ui/widgets.cpp:1020:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = WindowSurface->h - Image->h; ~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:1041:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = WindowSurface->w - Image->w; ~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:1043:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Image->w; ~~~~~~~^ src/ui/widgets.cpp:1044:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = WindowSurface->h; ~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:1048:30: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = WindowSurface->w - Image->w; ~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:1049:20: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = Image->h; ~~~~~~~^ src/ui/widgets.cpp:1050:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Image->w; ~~~~~~~^ src/ui/widgets.cpp:1051:30: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = WindowSurface->h - Image->h; ~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:1071:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Image->w; ~~~~~~~^ src/ui/widgets.cpp:1072:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Image->h; ~~~~~~~^ src/ui/widgets.cpp:1089:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = WindowSurface->w - Image->w; ~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:1091:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Image->w; ~~~~~~~^ src/ui/widgets.cpp:1092:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Image->h; ~~~~~~~^ src/ui/widgets.cpp:1110:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = WindowSurface->h - Image->h; ~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:1111:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Image->w; ~~~~~~~^ src/ui/widgets.cpp:1112:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Image->h; ~~~~~~~^ src/ui/widgets.cpp:1129:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = WindowSurface->w - Image->w; ~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:1130:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = WindowSurface->h - Image->h; ~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:1131:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Image->w; ~~~~~~~^ src/ui/widgets.cpp:1132:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Image->h; ~~~~~~~^ src/ui/widgets.cpp:1152:13: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = EdgeOffset; ^~~~~~~~~~ src/ui/widgets.cpp:1153:13: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = i; ^ src/ui/widgets.cpp:1154:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Image->w; ~~~~~~~^ src/ui/widgets.cpp:1155:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Image->h; ~~~~~~~^ src/ui/widgets.cpp:1160:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SrcRect.w = Image->w; ~~~~~~~^ src/ui/widgets.cpp:1161:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SrcRect.h = Image->h; ~~~~~~~^ src/ui/widgets.cpp:1163:43: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SrcRect.h = WindowSurface->h - dest.y - botspacing; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ src/ui/widgets.cpp:1182:43: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = WindowSurface->w - EdgeOffset - Image->w; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:1183:13: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = i; ^ src/ui/widgets.cpp:1184:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Image->w; ~~~~~~~^ src/ui/widgets.cpp:1185:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Image->h; ~~~~~~~^ src/ui/widgets.cpp:1189:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SrcRect.w = Image->w; ~~~~~~~^ src/ui/widgets.cpp:1190:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SrcRect.h = Image->h; ~~~~~~~^ src/ui/widgets.cpp:1193:43: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SrcRect.h = WindowSurface->h - dest.y - botspacing; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ src/ui/widgets.cpp: In member function 'unsigned int ListboxClass::CalcSliderHeight()': src/ui/widgets.cpp:1280:39: warning: conversion from 'std::vector >::size_type' {aka 'long unsigned int'} to 'unsigned int' may change value [-Wconversion] return (AvailableHeight * NumbLines)/MessageList.size(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ src/ui/widgets.cpp: In member function 'unsigned int ListboxClass::CalcSliderYoffset()': src/ui/widgets.cpp:1294:61: warning: conversion from 'std::vector >::size_type' {aka 'long unsigned int'} to 'unsigned int' may change value [-Wconversion] return (AvailableHeight - CalcSliderHeight()) * ScrollPos/(MessageList.size() - NumbLines - 1); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ui/widgets.cpp: In member function 'void ListboxClass::DrawSlider()': src/ui/widgets.cpp:1321:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Slider->w; ~~~~~~~~^ src/ui/widgets.cpp:1322:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Slider->h; ~~~~~~~~^ src/ui/widgets.cpp:1328:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Slider->w; ~~~~~~~~^ src/ui/widgets.cpp:1334:21: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = Slider->h - 1; ~~~~~~~~~~^~~ src/ui/widgets.cpp:1335:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Slider->w; ~~~~~~~~^ src/ui/widgets.cpp:1343:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Slider->h; ~~~~~~~~^ src/ui/widgets.cpp:1347:21: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = Slider->w - 1; ~~~~~~~~~~^~~ src/ui/widgets.cpp:1350:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Slider->h; ~~~~~~~~^ src/ui/widgets.cpp:1354:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = ListBoxSurface->w - LISTBOX_SCROLLBAR_WITH; src/ui/widgets.cpp:1355:39: warning: conversion from 'unsigned int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = LISTBOX_ARROW_UPDOWN_HEIGTH + CalcSliderYoffset(); src/ui/widgets.cpp:1356:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Slider->w; ~~~~~~~~^ src/ui/widgets.cpp:1357:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Slider->h; ~~~~~~~~^ src/ui/widgets.cpp: In member function 'SDL_Surface* ListboxClass::ReadShpImage(char*, int, Uint8)': src/ui/widgets.cpp:1378:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] TempPic->getImage(ImageNumb, &image, &shadow, palnum); ^~~~~~~~~ src/ui/widgets.cpp: In member function 'void ListboxClass::SetType(unsigned int)': src/ui/widgets.cpp:1400:16: warning: conversion from 'unsigned int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] ListBoxType = type; ^~~~ src/ui/widgets.cpp: In member function 'void ListboxClass::HandleInput(SDL_Event)': src/ui/widgets.cpp:1469:61: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 pos = (MouseYpos - Ypos - LISTBOX_BORDER_WITH) / (FontHeigth+LISTBOX_FONT_LINE_SPACING); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ui/widgets.cpp:1471:24: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SelectPos = pos + ScrollPos; ~~~~^~~~~~~~~~~ src/ui/widgets.cpp:1479:61: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Uint16 pos = (MouseYpos - Ypos - LISTBOX_BORDER_WITH) / (FontHeigth+LISTBOX_FONT_LINE_SPACING); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ui/widgets.cpp: In member function 'void ListboxClass::CreateListBox()': src/ui/widgets.cpp:1595:29: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] color.r = (color.b-40)&0xff; ~~~~~~~~~~~~^~~~~ src/ui/widgets.cpp:1617:29: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] color.r = (color.b-40)&0xff; ~~~~~~~~~~~~^~~~~ src/ui/widgets.cpp:1646:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = ListBoxSurface->w; ~~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:1647:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = ListBoxSurface->h; ~~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:1652:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = ListBoxSurface->w - LISTBOX_SCROLLBAR_WITH; src/ui/widgets.cpp:1655:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = ListBoxSurface->h; ~~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:1661:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = ListBoxSurface->w; ~~~~~~~~~~~~~~~~^ In file included from src/include/common.h:5, from src/vfs/mix/mixvfs.cpp:2: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/ui/widgets.cpp:1664:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = ListBoxSurface->h - 1; ~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:1668:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = ListBoxSurface->h; ~~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:1670:33: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = ListBoxSurface->w - 1 - LISTBOX_SCROLLBAR_WITH; src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ src/ui/widgets.cpp:1672:29: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = ListBoxSurface->w - 1; ~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:1683:30: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = ListBoxSurface->w - btn_up[btn_up_down]->w; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ src/ui/widgets.cpp:1685:33: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = btn_up[btn_up_down]->w; ~~~~~~~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:1686:33: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = btn_up[btn_up_down]->h; ~~~~~~~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:1690:30: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = ListBoxSurface->h - btn_down[btn_down_down]->h; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ui/widgets.cpp:1698:34: warning: conversion from 'std::vector >::size_type' {aka 'long unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] ScrollPos = MessageList.size() - 1; ~~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:1770:57: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = ListBoxSurface->w - LISTBOX_SCROLLBAR_WITH - 10; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/ui/widgets.cpp:1771:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = this->FontHeigth; ~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:1795:57: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = ListBoxSurface->w - LISTBOX_SCROLLBAR_WITH - 10; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/ui/widgets.cpp:1796:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = this->FontHeigth; ~~~~~~^~~~~~~~~~ src/ui/widgets.cpp:1837:14: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = BorderWidth; ^~~~~~~~~~~ src/ui/widgets.cpp:1838:19: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = With - 2*BorderWidth; ~~~~~^~~~~~~~~~~~~~~ src/ui/widgets.cpp:1839:47: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = (FontHeigth * i) + (Spacing * i) + BorderWidth; //TempImage->h * i; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ src/ui/widgets.cpp:1840:25: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = TempImage->h; ~~~~~~~~~~~^ src/ui/widgets.cpp: In member function 'void ListboxClass::DrawListBox(int, int)': src/ui/widgets.cpp:1865:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = Xpos; ^~~~ src/ui/widgets.cpp:1866:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = Ypos; ^~~~ src/ui/widgets.cpp:1867:11: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = With; ^~~~ src/ui/widgets.cpp:1868:22: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = FontHeigth * NumbLines; ~~~~~~~~~~~^~~~~~~~~~~ src/ui/widgets.cpp: In member function 'void TCheckBox::Create()': src/ui/widgets.cpp:1912:11: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Width; ^~~~~ src/ui/widgets.cpp:1913:11: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Heigth; ^~~~~~ src/ui/widgets.cpp:1921:16: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Width-2; ~~~~~^~ src/ui/widgets.cpp:1922:17: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Heigth-2; ~~~~~~^~ src/ui/widgets.cpp: In member function 'void TCheckBox::Draw(int, int)': src/ui/widgets.cpp:1941:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = X; ^ src/ui/widgets.cpp:1942:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = Y; ^ src/ui/widgets.cpp:1943:11: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = Width; ^~~~~ src/ui/widgets.cpp:1944:11: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = Heigth; ^~~~~~ src/ui/widgets.cpp: In member function 'void TTextBox::Create()': src/ui/widgets.cpp:2045:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = SizeAndPosition.w-2; ~~~~~~~~~~~~~~~~~^~ src/ui/widgets.cpp:2046:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = SizeAndPosition.h-2; ~~~~~~~~~~~~~~~~~^~ src/ui/widgets.cpp:2057:55: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Ypos = (SizeAndPosition.h - TextBoxLabel.getHeight())/2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/ui/widgets.cpp:2012:12: warning: variable 'temp' set but not used [-Wunused-but-set-variable] char *temp; ^~~~ src/ui/widgets.cpp: In member function 'char* TTextBox::getText()': src/ui/widgets.cpp:2087:46: warning: conversion from 'std::__cxx11::basic_string::size_type' {aka 'long unsigned int'} to 'unsigned int' may change value [-Wconversion] this->DeleteChar(TextBoxString.size() - 1); ~~~~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp: In member function 'void TTextBox::HandleInput(SDL_Event)': src/ui/widgets.cpp:2172:57: warning: conversion from 'std::__cxx11::basic_string::size_type' {aka 'long unsigned int'} to 'unsigned int' may change value [-Wconversion] this->DeleteChar(TextBoxString.size() - 1); ~~~~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:2191:46: warning: conversion from 'std::__cxx11::basic_string::size_type' {aka 'long unsigned int'} to 'unsigned int' may change value [-Wconversion] this->DeleteChar(TextBoxString.size() - 2); ~~~~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:2205:67: warning: conversion from 'std::__cxx11::basic_string::size_type' {aka 'long unsigned int'} to 'unsigned int' may change value [-Wconversion] this->DeleteChar(TextBoxString.size() - 1); ~~~~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp: In member function 'bool TTextBox::Draw(int, int)': src/ui/widgets.cpp:2224:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] SizeAndPosition.x = X; ^ src/ui/widgets.cpp:2225:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] SizeAndPosition.y = Y; ^ src/ui/widgets.cpp: In member function 'SDL_Surface* DropDownListBox::ReadShpImage(char*, int, Uint8)': src/ui/widgets.cpp:2311:20: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] TempPic->getImage(ImageNumb, &image, &shadow, palnum); ^~~~~~~~~ src/ui/widgets.cpp: In member function 'void DropDownListBox::Create()': src/ui/widgets.cpp:2359:58: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Spacing = (SizeAndPosition.h - ListBoxLabel.getHeight())/2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/ui/widgets.cpp:2363:120: warning: conversion from 'std::vector >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] ListBoxSurface = SDL_CreateRGBSurface(SDL_SWSURFACE|SDL_SRCCOLORKEY, SizeAndPosition.w, (SizeAndPosition.h + Spacing + (SizeAndPosition.h - Spacing)* List.size() ), 16, 0, 0, 0, 0); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ui/widgets.cpp:2375:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = ListBoxSurface->w; ~~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:2376:27: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = ListBoxSurface->h; ~~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:2384:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = ListBoxSurface->w-2; ~~~~~~~~~~~~~~~~~^~ src/ui/widgets.cpp:2385:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = SizeAndPosition.h-2; ~~~~~~~~~~~~~~~~~^~ src/ui/widgets.cpp:2394:29: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = ListBoxSurface->w-2; ~~~~~~~~~~~~~~~~~^~ src/ui/widgets.cpp:2395:34: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = ListBoxSurface->h - 2 -SizeAndPosition.h; ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/ui/widgets.cpp:2410:28: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Ypos = SizeAndPosition.h + (SizeAndPosition.h - ListBoxLabel.getHeight())/2; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ui/widgets.cpp:2412:56: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Ypos = (SizeAndPosition.h - ListBoxLabel.getHeight())/2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/ui/widgets.cpp:2418:38: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Ypos += ListBoxLabel.getHeight()+Spacing; ^~~~~~~ src/ui/widgets.cpp:2455:25: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] color.r = (color.b+10)&0xff; ~~~~~~~~~~~~^~~~~ src/ui/widgets.cpp:2458:19: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] color.b = ColRed-10; ~~~~~~^~~ src/ui/widgets.cpp: In member function 'bool DropDownListBox::MouseOver()': src/ui/widgets.cpp:2507:58: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Spacing = (SizeAndPosition.h - ListBoxLabel.getHeight())/2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/ui/widgets.cpp: In member function 'Uint32 DropDownListBox::MouseOver_entry()': src/ui/widgets.cpp:2535:58: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] Spacing = (SizeAndPosition.h - ListBoxLabel.getHeight())/2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ src/ui/widgets.cpp:2539:161: warning: conversion from 'std::vector >::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] return List.size() - (unsigned)(((SizeAndPosition.y + (SizeAndPosition.h + Spacing + (SizeAndPosition.h - Spacing) * List.size())) - my)/SizeAndPosition.h) - 1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp: In member function 'bool DropDownListBox::Draw(int, int)': src/ui/widgets.cpp:2613:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] SizeAndPosition.x = X; ^ src/ui/widgets.cpp:2614:22: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] SizeAndPosition.y = Y; ^ src/ui/widgets.cpp:2632:50: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = SizeAndPosition.x + SizeAndPosition.w - 1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:2634:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = ArrowDownImage->w; ~~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:2635:28: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = ArrowDownImage->h; ~~~~~~~~~~~~~~~~^ src/ui/widgets.cpp:2644:22: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] SizeAndPosition.h = Heigth; ^~~~~~ src/ui/widgets.cpp: In constructor 'SliderControl::SliderControl(int, int, bool)': src/ui/widgets.cpp:2665:23: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] _sizeAndPosition.w = w; ^ src/ui/widgets.cpp: In member function 'bool SliderControl::Draw(int, int)': src/ui/widgets.cpp:2710:23: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] _sizeAndPosition.x = X; ^ src/ui/widgets.cpp:2711:23: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] _sizeAndPosition.y = Y; ^ src/ui/widgets.cpp: In member function 'void SliderControl::CreateSlider(int)': src/ui/widgets.cpp:2733:11: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = x; ^ src/ui/widgets.cpp: In member function 'void SliderControl::Create()': src/ui/widgets.cpp:2767:29: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = _sizeAndPosition.w-2; ~~~~~~~~~~~~~~~~~~^~ src/ui/widgets.cpp:2768:29: warning: conversion from 'int' to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.h = _sizeAndPosition.h-2; ~~~~~~~~~~~~~~~~~~^~ src/ui/widgets.cpp: In member function 'void SliderControl::HandleInput(SDL_Event)': src/ui/widgets.cpp:2815:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (!_selected) ^~ src/ui/widgets.cpp:2817:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' case SDLK_LSHIFT: ^~~~ src/ui/widgets.cpp:2817:5: warning: case label value exceeds maximum value for type src/ui/widgets.cpp: In member function 'Uint8 RA_ProgressBar::getProgressPosition()': src/ui/widgets.cpp:2877:9: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] return _position; ^~~~~~~~~ src/ui/widgets.cpp: In member function 'void RA_ProgressBar::setCurStep(Uint8)': src/ui/widgets.cpp:2894:30: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] Uint8 perc = _curStep * 100 / _maxSteps; ~~~~~~~~~~~~~~~^~~~~~~~~~~ src/ui/widgets.cpp: In member function 'bool RA_ProgressBar::HandleMouseClick()': src/ui/widgets.cpp:2954:19: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] perc = mx * 100 / _sizeAndPosition.w; ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ src/ui/widgets.cpp:2958:25: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] perc = _curStep * 100 / _maxSteps; ~~~~~~~~~~~~~~~^~~~~~~~~~~ src/ui/widgets.cpp: In member function 'void RA_ProgressBar::Create()': src/ui/widgets.cpp:2994:45: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Uint16' {aka 'short unsigned int'} may change value [-Wconversion] dest.w = (_sizeAndPosition.w-4) * _position/100; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/ui/widgets.cpp:3010:30: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = _sizeAndPosition.h - 1; ~~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:3023:30: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = _sizeAndPosition.w - 1; ~~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:3032:45: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = (_sizeAndPosition.w-4) * _position/100; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/ui/widgets.cpp:3039:45: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = (_sizeAndPosition.w-4) * _position/100; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/ui/widgets.cpp:3047:50: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = (_sizeAndPosition.w-4) * _position/100 + 3; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp:3054:45: warning: conversion from 'Uint32' {aka 'unsigned int'} to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.x = (_sizeAndPosition.w-4) * _position/100; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/ui/widgets.cpp:3055:30: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] dest.y = _sizeAndPosition.h - 1; ~~~~~~~~~~~~~~~~~~~^~~ src/ui/widgets.cpp: In member function 'void RA_ProgressBar::Draw(int, int)': src/ui/widgets.cpp:3067:23: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] _sizeAndPosition.x = X; ^ src/ui/widgets.cpp:3068:23: warning: conversion from 'int' to 'Sint16' {aka 'short int'} may change value [-Wconversion] _sizeAndPosition.y = Y; ^ In file included from src/include/common.h:5, from src/vfs/filesystem/externalvfs.h:7, from src/vfs/filesystem/externalvfs.cpp:18: src/include/mapsini.h:11:1: warning: 'typedef' was ignored in this declaration typedef class MissionMapsClass{ ^~~~~~~ src/include/mapsini.h:28:1: warning: 'typedef' was ignored in this declaration typedef class MPmapsClass{ ^~~~~~~ src/vfs/mix/mixvfs.cpp: In member function 'virtual Uint32 MIXFiles::getFile(const char*)': src/vfs/mix/mixvfs.cpp:47:12: warning: variable 'myvfile' set but not used [-Wunused-but-set-variable] VFile *myvfile; ^~~~~~~ src/vfs/mix/mixvfs.cpp: In member function 'Uint32 MIXFiles::calcID(const char*)': src/vfs/mix/mixvfs.cpp:89:26: warning: conversion from 'int' to 'char' may change value [-Wconversion] buffer[i]=toupper(*(fname++)); ~~~~~~~^~~~~~~~~~~~ src/vfs/mix/mixvfs.cpp:99:23: warning: conversion from 'long int' to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] calc=ROL(calc)+(*(long *)(buffer+i)); ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ src/vfs/mix/mixvfs.cpp: In member function 'MIXPriv::MixRecord* MIXFiles::decodeHeader(VFile*, MIXPriv::MixHeader*, MIXPriv::tscheck_)': src/vfs/mix/mixvfs.cpp:138:42: warning: conversion from 'long unsigned int' to 'int' may change value [-Wconversion] const int m_size = sizeof(MixRecord) * header->c_files; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ src/vfs/mix/mixvfs.cpp:139:28: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses] const int m_f = m_size + 5 & ~7; ~~~~~~~^~~ src/vfs/mix/mixvfs.cpp: In member function 'void MIXFiles::readMIXHeader(VFile*)': src/vfs/mix/mixvfs.cpp:207:50: warning: conversion from 'long unsigned int' to 'int' may change value [-Wconversion] const int m_size = sizeof(MixRecord) * header.c_files; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ src/vfs/mix/mixvfs.cpp:221:35: warning: conversion from 'long unsigned int' to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] m_index[i].offset += 4 + sizeof(MixHeader) + m_size; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/vfs/mix/mixvfs.cpp:233:46: warning: conversion from 'long unsigned int' to 'int' may change value [-Wconversion] const int m_size = sizeof(MixRecord) * header.c_files; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ src/vfs/mix/mixvfs.cpp:248:48: warning: conversion from 'int' to 'Uint8' {aka 'unsigned char'} may change value [-Wconversion] mentry.filenum = (Uint8)mixfiles.size()-1; ~~~~~~~~~~~~~~~~~~~~~~^~ src/vfs/filesystem/externalvfs.cpp: In member function 'Uint32 ExternalFiles::getFile(const char*, const char*)': src/vfs/filesystem/externalvfs.cpp:90:20: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] return fnum; ^~~~ src/vfs/filesystem/externalvfs.cpp:95:54: warning: conversion from 'std::__cxx11::basic_string::size_type' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] f = fcaseopen(&filename, mode, path[i].length()); ~~~~~~~~~~~~~~^~ src/vfs/filesystem/externalvfs.cpp:106:20: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] return fnum; ^~~~ src/vfs/filesystem/externalvfs.cpp: In member function 'virtual Uint32 ExternalFiles::readByte(Uint32, Uint8*, Uint32)': src/vfs/filesystem/externalvfs.cpp:121:17: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] return fread(databuf, 1, numBytes, openfiles[file].file); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/vfs/filesystem/externalvfs.cpp: In member function 'virtual Uint32 ExternalFiles::readWord(Uint32, Uint16*, Uint32)': src/vfs/filesystem/externalvfs.cpp:132:20: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] numRead = fread(databuf, 2, numWords, openfiles[file].file); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/vfs/filesystem/externalvfs.cpp: In member function 'virtual Uint32 ExternalFiles::readThree(Uint32, Uint32*, Uint32)': src/vfs/filesystem/externalvfs.cpp:152:20: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] numRead = fread(databuf, 3, numThrees, openfiles[file].file); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/vfs/filesystem/externalvfs.cpp: In member function 'virtual Uint32 ExternalFiles::readDWord(Uint32, Uint32*, Uint32)': src/vfs/filesystem/externalvfs.cpp:173:20: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] numRead = fread(databuf, 4, numDWords, openfiles[file].file); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/vfs/filesystem/externalvfs.cpp: In member function 'virtual Uint32 ExternalFiles::writeByte(Uint32, const Uint8*, Uint32)': src/vfs/filesystem/externalvfs.cpp:192:18: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] return fwrite(databuf, 1, numBytes, openfiles[file].file); ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/vfs/filesystem/externalvfs.cpp: In member function 'virtual Uint32 ExternalFiles::writeWord(Uint32, const Uint16*, Uint32)': src/vfs/filesystem/externalvfs.cpp:213:22: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] numWrote = fwrite(databuf, 2, numWords, openfiles[file].file); ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/vfs/filesystem/externalvfs.cpp: In member function 'virtual Uint32 ExternalFiles::writeThree(Uint32, const Uint32*, Uint32)': src/vfs/filesystem/externalvfs.cpp:237:22: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] numWrote = fwrite(databuf, 3, numThrees, openfiles[file].file); ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/vfs/filesystem/externalvfs.cpp: In member function 'virtual Uint32 ExternalFiles::writeDWord(Uint32, const Uint32*, Uint32)': src/vfs/filesystem/externalvfs.cpp:260:22: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] numWrote = fwrite(databuf, 4, numDWords, openfiles[file].file); ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/vfs/filesystem/externalvfs.cpp: In member function 'virtual Uint32 ExternalFiles::getPos(Uint32) const': src/vfs/filesystem/externalvfs.cpp:296:21: warning: conversion from 'long int' to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] return ftell(i->second.file); ~~~~~^~~~~~~~~~~~~~~~ src/vfs/filesystem/externalvfs.cpp: In member function 'virtual Uint32 ExternalFiles::getSize(Uint32) const': src/vfs/filesystem/externalvfs.cpp:306:26: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'Uint32' {aka 'unsigned int'} may change value [-Wconversion] return i->second.size; ~~~~~~~~~~^~~~ src/ui/widgets.cpp: In member function 'void RA_WindowClass::DrawRaBackground()': src/ui/widgets.cpp:1151:50: warning: 'botspacing' may be used uninitialized in this function [-Wmaybe-uninitialized] for (int i = topspacing; i < (WindowSurface->h - botspacing); i+=Image->h){ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ src/ui/widgets.cpp:1153:11: warning: 'topspacing' may be used uninitialized in this function [-Wmaybe-uninitialized] dest.y = i; ~~~~~~~^~~ c++ -o freera -Wl,-rpath,/usr/local/lib -pthread src/freera.o src/misc/common.o src/misc/args.o src/misc/mapsini.o src/misc/inifile.o src/misc/compression.o src/audio/soundengine.o src/audio/soundfile.o src/game/player.o src/game/dispatcher.o src/game/projectileanim.o src/game/talkback.o src/game/map.o src/game/moneycounter.o src/game/triggers.o src/game/ai.o src/game/game.o src/game/playerpool.o src/game/actioneventqueue.o src/game/unit.o src/game/unitanimations.o src/game/structureanims.o src/game/path.o src/game/structure.o src/game/buildqueue.o src/game/weaponspool.o src/game/unitandstructurepool.o src/game/loadmap.o src/video/imagecache.o src/video/shpimage.o src/video/sdllayer.o src/video/loadingscreen.o src/video/vqa.o src/video/glSDL.o src/video/message.o src/video/graphicsengine.o src/video/wsa.o src/video/cpsimage.o src/video/pcximage.o src/video/imageproc.o src/video/renderer.o src/vfs/vfs.o src/ui/menu.o src/ui/sidebar.o src/ui/font.o src/ui/input.o src/ui/cursorpool.o src/ui/logger.o src/ui/pause_menu.o src/ui/selection.o src/ui/cursor.o src/ui/widgets.o src/vfs/filesystem/externalvfs.o src/vfs/mix/mixvfs.o src/vfs/mix/ws-key.o src/vfs/mix/blowfish.o -L/usr/local/lib -lSDL_mixer -lSDL scons: done building targets. SUCCEEDED 00:00:34 ------------------------------------------------------------------------------- -- Phase: run-depends ------------------------------------------------------------------------------- SUCCEEDED 00:00:00 ------------------------------------------------------------------------------- -- Phase: stage ------------------------------------------------------------------------------- ===> Staging for freera-080203_8 ===> Generating temporary packing list install -s -m 555 /construction/games/freera/freera++/freera /construction/games/freera/stage/usr/local/bin/ ====> Compressing man pages (compress-man) ====> Running Q/A tests (stage-qa) Warning: You have disabled the licenses framework with DISABLE_LICENSES, unable to run checks SUCCEEDED 00:00:01 ------------------------------------------------------------------------------- -- Phase: package ------------------------------------------------------------------------------- ===> Building package for freera-080203_8 file sizes/checksums [38]: 0% file sizes/checksums [38]: 100% packing files [38]: 0% packing files [38]: 100% packing directories [1]: 0% packing directories [1]: 100% SUCCEEDED 00:00:01 TOTAL TIME 00:00:50