projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
55a97f4
)
Fix nearly all warnings
author
kwolekr
<kwolekr@minetest.net>
Mon, 20 May 2013 01:26:08 +0000
(21:26 -0400)
committer
kwolekr
<kwolekr@minetest.net>
Mon, 20 May 2013 01:26:56 +0000
(21:26 -0400)
15 files changed:
src/collision.cpp
patch
|
blob
|
history
src/emerge.h
patch
|
blob
|
history
src/environment.cpp
patch
|
blob
|
history
src/guiConfigureWorld.cpp
patch
|
blob
|
history
src/guiCreateWorld.cpp
patch
|
blob
|
history
src/guiPasswordChange.cpp
patch
|
blob
|
history
src/guiVolumeChange.cpp
patch
|
blob
|
history
src/map.cpp
patch
|
blob
|
history
src/mapgen_v6.cpp
patch
|
blob
|
history
src/mapgen_v7.cpp
patch
|
blob
|
history
src/player.h
patch
|
blob
|
history
src/scriptapi_env.cpp
patch
|
blob
|
history
src/scriptapi_types.cpp
patch
|
blob
|
history
src/test.cpp
patch
|
blob
|
history
src/voxel.cpp
patch
|
blob
|
history
diff --git
a/src/collision.cpp
b/src/collision.cpp
index 673966b6e89df679588db04949fa9cad7b04031b..3058426eb380f4f11acf12606b00f44723ce7580 100644
(file)
--- a/
src/collision.cpp
+++ b/
src/collision.cpp
@@
-298,7
+298,7
@@
collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
f32 distance = speed_f.getLength();
std::vector<DistanceSortedActiveObject> clientobjects;
c_env->getActiveObjects(pos_f,distance * 1.5,clientobjects);
f32 distance = speed_f.getLength();
std::vector<DistanceSortedActiveObject> clientobjects;
c_env->getActiveObjects(pos_f,distance * 1.5,clientobjects);
- for (
in
t i=0; i < clientobjects.size(); i++)
+ for (
size_
t i=0; i < clientobjects.size(); i++)
{
if ((self == 0) || (self != clientobjects[i].obj)) {
objects.push_back((ActiveObject*)clientobjects[i].obj);
{
if ((self == 0) || (self != clientobjects[i].obj)) {
objects.push_back((ActiveObject*)clientobjects[i].obj);
diff --git
a/src/emerge.h
b/src/emerge.h
index fdca93c06253676ec11501d330e6120c68438815..b42e82d38237e1dcaab047eb8dc0e46fd49febad 100644
(file)
--- a/
src/emerge.h
+++ b/
src/emerge.h
@@
-31,8
+31,8
@@
with this program; if not, write to the Free Software Foundation, Inc.,
infostream << "EmergeThread: " x << std::endl; }
class Mapgen;
infostream << "EmergeThread: " x << std::endl; }
class Mapgen;
-
class
MapgenParams;
-
class
MapgenFactory;
+
struct
MapgenParams;
+
struct
MapgenFactory;
class Biome;
class BiomeDefManager;
class EmergeThread;
class Biome;
class BiomeDefManager;
class EmergeThread;
diff --git
a/src/environment.cpp
b/src/environment.cpp
index e06b032f2f2d5cec3646f8a19b757f44379402f2..03b8ef7f69dc320fc16624f7e02138482890cb9c 100644
(file)
--- a/
src/environment.cpp
+++ b/
src/environment.cpp
@@
-910,7
+910,6
@@
void ServerEnvironment::clearAllObjects()
if(obj->getType() == ACTIVEOBJECT_TYPE_PLAYER)
continue;
u16 id = i->first;
if(obj->getType() == ACTIVEOBJECT_TYPE_PLAYER)
continue;
u16 id = i->first;
- v3f objectpos = obj->getBasePosition();
// Delete static object if block is loaded
if(obj->m_static_exists){
MapBlock *block = m_map->getBlockNoCreateNoEx(obj->m_static_block);
// Delete static object if block is loaded
if(obj->m_static_exists){
MapBlock *block = m_map->getBlockNoCreateNoEx(obj->m_static_block);
@@
-1031,8
+1030,6
@@
void ServerEnvironment::step(float dtime)
// Ignore disconnected players
if(player->peer_id == 0)
continue;
// Ignore disconnected players
if(player->peer_id == 0)
continue;
-
- v3f playerpos = player->getPosition();
// Move
player->move(dtime, *m_map, 100*BS);
// Move
player->move(dtime, *m_map, 100*BS);
@@
-2072,8
+2069,6
@@
void ClientEnvironment::step(float dtime)
*/
{
*/
{
- v3f lplayerpos = lplayer->getPosition();
-
// Apply physics
if(free_move == false && is_climbing == false)
{
// Apply physics
if(free_move == false && is_climbing == false)
{
@@
-2197,7
+2192,6
@@
void ClientEnvironment::step(float dtime)
i != m_players.end(); ++i)
{
Player *player = *i;
i != m_players.end(); ++i)
{
Player *player = *i;
- v3f playerpos = player->getPosition();
/*
Handle non-local players
/*
Handle non-local players
diff --git
a/src/guiConfigureWorld.cpp
b/src/guiConfigureWorld.cpp
index e33e87ef5f3e169525703b1b723be2eb5679063e..8f5ef937da89ed27afcab38dd87210024ead13ca 100644
(file)
--- a/
src/guiConfigureWorld.cpp
+++ b/
src/guiConfigureWorld.cpp
@@
-165,8
+165,6
@@
void GUIConfigureWorld::regenerateGui(v2u32 screensize)
DesiredRect = rect;
recalculateAbsolutePosition(false);
DesiredRect = rect;
recalculateAbsolutePosition(false);
- v2s32 size = rect.getSize();
-
v2s32 topleft = v2s32(10, 10);
/*
v2s32 topleft = v2s32(10, 10);
/*
diff --git
a/src/guiCreateWorld.cpp
b/src/guiCreateWorld.cpp
index caa884bc05e7beb36c5cc0e2e4d87946686fec86..9fc764214fe2d868e13ff8a66210eb8768966b14 100644
(file)
--- a/
src/guiCreateWorld.cpp
+++ b/
src/guiCreateWorld.cpp
@@
-112,8
+112,6
@@
void GUICreateWorld::regenerateGui(v2u32 screensize)
DesiredRect = rect;
recalculateAbsolutePosition(false);
DesiredRect = rect;
recalculateAbsolutePosition(false);
- v2s32 size = rect.getSize();
-
v2s32 topleft = v2s32(10+80, 10+70);
/*
v2s32 topleft = v2s32(10+80, 10+70);
/*
diff --git
a/src/guiPasswordChange.cpp
b/src/guiPasswordChange.cpp
index a4d16444da63abf4332463902a4c8f06bd0990e4..8b55234c2a6b914ab9fd13fd14ee85200a2ce2e0 100644
(file)
--- a/
src/guiPasswordChange.cpp
+++ b/
src/guiPasswordChange.cpp
@@
-95,7
+95,6
@@
void GUIPasswordChange::regenerateGui(v2u32 screensize)
v2s32 size = rect.getSize();
v2s32 topleft_client(40, 0);
v2s32 size = rect.getSize();
v2s32 topleft_client(40, 0);
- v2s32 size_client = size - v2s32(40, 0);
/*
Add stuff
/*
Add stuff
diff --git
a/src/guiVolumeChange.cpp
b/src/guiVolumeChange.cpp
index 4e92b82c25b3fc14d5b42fde2c4d97a1db5065f9..c272b132dc3e7f80a47ce4f8ad839da5a3cddb95 100644
(file)
--- a/
src/guiVolumeChange.cpp
+++ b/
src/guiVolumeChange.cpp
@@
-96,7
+96,6
@@
void GUIVolumeChange::regenerateGui(v2u32 screensize)
v2s32 size = rect.getSize();
v2s32 topleft_client(40, 0);
v2s32 size = rect.getSize();
v2s32 topleft_client(40, 0);
- v2s32 size_client = size - v2s32(40, 0);
int volume=(int)(g_settings->getFloat("sound_volume")*100);
/*
Add stuff
int volume=(int)(g_settings->getFloat("sound_volume")*100);
/*
Add stuff
diff --git
a/src/map.cpp
b/src/map.cpp
index 821805d4eff55b49f83f59fb5914bf9e8454f65f..d5ab8eb1e5b9365f8b68e4098b4356dd55366012 100644
(file)
--- a/
src/map.cpp
+++ b/
src/map.cpp
@@
-288,10
+288,10
@@
void Map::unspreadLight(enum LightBank bank,
continue;
// Calculate relative position in block
continue;
// Calculate relative position in block
- v3s16 relpos = pos - blockpos_last * MAP_BLOCKSIZE;
+
//
v3s16 relpos = pos - blockpos_last * MAP_BLOCKSIZE;
// Get node straight from the block
// Get node straight from the block
- MapNode n = block->getNode(relpos);
+
//
MapNode n = block->getNode(relpos);
u8 oldlight = j->second;
u8 oldlight = j->second;
@@
-937,7
+937,7
@@
void Map::addNodeAndUpdate(v3s16 p, MapNode n,
*/
v3s16 toppos = p + v3s16(0,1,0);
*/
v3s16 toppos = p + v3s16(0,1,0);
- v3s16 bottompos = p + v3s16(0,-1,0);
+
//
v3s16 bottompos = p + v3s16(0,-1,0);
bool node_under_sunlight = true;
std::set<v3s16> light_sources;
bool node_under_sunlight = true;
std::set<v3s16> light_sources;
@@
-1246,7
+1246,7
@@
void Map::removeNodeAndUpdate(v3s16 p,
// Get the brightest neighbour node and propagate light from it
v3s16 n2p = getBrightestNeighbour(bank, p);
try{
// Get the brightest neighbour node and propagate light from it
v3s16 n2p = getBrightestNeighbour(bank, p);
try{
- MapNode n2 = getNode(n2p);
+
//
MapNode n2 = getNode(n2p);
lightNeighbors(bank, n2p, modified_blocks);
}
catch(InvalidPositionException &e)
lightNeighbors(bank, n2p, modified_blocks);
}
catch(InvalidPositionException &e)
@@
-2831,7
+2831,7
@@
ServerMapSector * ServerMap::createSector(v2s16 p2d)
sector = new ServerMapSector(this, p2d, m_gamedef);
// Sector position on map in nodes
sector = new ServerMapSector(this, p2d, m_gamedef);
// Sector position on map in nodes
- v2s16 nodepos2d = p2d * MAP_BLOCKSIZE;
+
//
v2s16 nodepos2d = p2d * MAP_BLOCKSIZE;
/*
Insert to container
/*
Insert to container
diff --git
a/src/mapgen_v6.cpp
b/src/mapgen_v6.cpp
index e5ff72a609e725200313d7e191884bba9afe3ad5..eaca33988444e3059b891d8101961a5dfbecaa99 100644
(file)
--- a/
src/mapgen_v6.cpp
+++ b/
src/mapgen_v6.cpp
@@
-375,8
+375,6
@@
void MapgenV6::makeChunk(BlockMakeData *data) {
v3s16 blockpos = data->blockpos_requested;
v3s16 blockpos_min = data->blockpos_min;
v3s16 blockpos_max = data->blockpos_max;
v3s16 blockpos = data->blockpos_requested;
v3s16 blockpos_min = data->blockpos_min;
v3s16 blockpos_max = data->blockpos_max;
- v3s16 blockpos_full_min = blockpos_min - v3s16(1,1,1);
- v3s16 blockpos_full_max = blockpos_max + v3s16(1,1,1);
// Area of central chunk
node_min = blockpos_min*MAP_BLOCKSIZE;
// Area of central chunk
node_min = blockpos_min*MAP_BLOCKSIZE;
diff --git
a/src/mapgen_v7.cpp
b/src/mapgen_v7.cpp
index 2fb5d7b9b947bf0eb4257b90cfd014e909a87041..6daa5fc6abbaac2138d19a0d3fd2795f89203ad3 100644
(file)
--- a/
src/mapgen_v7.cpp
+++ b/
src/mapgen_v7.cpp
@@
-152,8
+152,6
@@
void MapgenV7::makeChunk(BlockMakeData *data) {
v3s16 blockpos_min = data->blockpos_min;
v3s16 blockpos_max = data->blockpos_max;
v3s16 blockpos_min = data->blockpos_min;
v3s16 blockpos_max = data->blockpos_max;
- v3s16 blockpos_full_min = blockpos_min - v3s16(1, 1, 1);
- v3s16 blockpos_full_max = blockpos_max + v3s16(1, 1, 1);
node_min = blockpos_min * MAP_BLOCKSIZE;
node_max = (blockpos_max + v3s16(1, 1, 1)) * MAP_BLOCKSIZE - v3s16(1, 1, 1);
full_node_min = (blockpos_min - 1) * MAP_BLOCKSIZE;
node_min = blockpos_min * MAP_BLOCKSIZE;
node_max = (blockpos_max + v3s16(1, 1, 1)) * MAP_BLOCKSIZE - v3s16(1, 1, 1);
full_node_min = (blockpos_min - 1) * MAP_BLOCKSIZE;
diff --git
a/src/player.h
b/src/player.h
index fade6de0189b3a72d5942ecf76fabdbb76e4ba17..63e166b4bd6d5d11648b70dd1c01c18ab18d4dac 100644
(file)
--- a/
src/player.h
+++ b/
src/player.h
@@
-87,7
+87,7
@@
class Map;
class IGameDef;
struct CollisionInfo;
class PlayerSAO;
class IGameDef;
struct CollisionInfo;
class PlayerSAO;
-
class
HudElement;
+
struct
HudElement;
class Player
{
class Player
{
diff --git
a/src/scriptapi_env.cpp
b/src/scriptapi_env.cpp
index efed58e66ed553be454d9035c8d685bf2e1f880a..a9d9391a7b969717e1177e4aedd8251deb6afec5 100644
(file)
--- a/
src/scriptapi_env.cpp
+++ b/
src/scriptapi_env.cpp
@@
-227,7
+227,6
@@
int EnvRef::l_get_node_light(lua_State *L)
time_of_day = 24000.0 * lua_tonumber(L, 3);
time_of_day %= 24000;
u32 dnr = time_to_daynight_ratio(time_of_day, true);
time_of_day = 24000.0 * lua_tonumber(L, 3);
time_of_day %= 24000;
u32 dnr = time_to_daynight_ratio(time_of_day, true);
- MapNode n = env->getMap().getNodeNoEx(pos);
try{
MapNode n = env->getMap().getNode(pos);
INodeDefManager *ndef = env->getGameDef()->ndef();
try{
MapNode n = env->getMap().getNode(pos);
INodeDefManager *ndef = env->getGameDef()->ndef();
@@
-373,7
+372,7
@@
int EnvRef::l_add_item(lua_State *L)
ServerEnvironment *env = o->m_env;
if(env == NULL) return 0;
// pos
ServerEnvironment *env = o->m_env;
if(env == NULL) return 0;
// pos
- v3f pos = checkFloatPos(L, 2);
+
//
v3f pos = checkFloatPos(L, 2);
// item
ItemStack item = read_item(L, 3);
if(item.empty() || !item.isKnown(get_server(L)->idef()))
// item
ItemStack item = read_item(L, 3);
if(item.empty() || !item.isKnown(get_server(L)->idef()))
diff --git
a/src/scriptapi_types.cpp
b/src/scriptapi_types.cpp
index f304511080c57c2fda5b7e504a84cf15da265bf0..f2f6b6bd831806174f751aef54ffd6548c59aa31 100644
(file)
--- a/
src/scriptapi_types.cpp
+++ b/
src/scriptapi_types.cpp
@@
-147,7
+147,7
@@
v3s16 check_v3s16(lua_State *L, int index)
video::SColor readARGB8(lua_State *L, int index)
{
video::SColor readARGB8(lua_State *L, int index)
{
- video::SColor color;
+ video::SColor color
(0)
;
luaL_checktype(L, index, LUA_TTABLE);
lua_getfield(L, index, "a");
if(lua_isnumber(L, -1))
luaL_checktype(L, index, LUA_TTABLE);
lua_getfield(L, index, "a");
if(lua_isnumber(L, -1))
diff --git
a/src/test.cpp
b/src/test.cpp
index e1dbfa6b82c6aaf2a9804cda38459c5be06286f8..3a0316e172083f8529c368e498444c23f2fbca05 100644
(file)
--- a/
src/test.cpp
+++ b/
src/test.cpp
@@
-464,7
+464,7
@@
struct TestCompress: public TestBase
std::string str_decompressed = os_decompressed.str();
UTEST(str_decompressed.size() == data_in.size(), "Output size not"
" equal (output: %u, input: %u)",
std::string str_decompressed = os_decompressed.str();
UTEST(str_decompressed.size() == data_in.size(), "Output size not"
" equal (output: %u, input: %u)",
-
str_decompressed.size(),
data_in.size());
+
(unsigned int)str_decompressed.size(), (unsigned int)
data_in.size());
for(u32 i=0; i<size && i<str_decompressed.size(); i++){
UTEST(str_decompressed[i] == data_in[i],
"index out[%i]=%i differs from in[%i]=%i",
for(u32 i=0; i<size && i<str_decompressed.size(); i++){
UTEST(str_decompressed[i] == data_in[i],
"index out[%i]=%i differs from in[%i]=%i",
diff --git
a/src/voxel.cpp
b/src/voxel.cpp
index f859a1f0382cf6025a41c0b60dd48a7c83ad3eb2..58519ed5f2ec10406b45e4ed2598b54f7205457f 100644
(file)
--- a/
src/voxel.cpp
+++ b/
src/voxel.cpp
@@
-264,7
+264,7
@@
void VoxelManipulator::clearFlag(u8 flags)
// 0-1ms on moderate area
TimeTaker timer("clearFlag", &clearflag_time);
// 0-1ms on moderate area
TimeTaker timer("clearFlag", &clearflag_time);
- v3s16 s = m_area.getExtent();
+
//
v3s16 s = m_area.getExtent();
/*dstream<<"clearFlag clearing area of size "
<<""<<s.X<<"x"<<s.Y<<"x"<<s.Z<<""
/*dstream<<"clearFlag clearing area of size "
<<""<<s.X<<"x"<<s.Y<<"x"<<s.Z<<""