Fixed compiler warnings.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10906 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
30151b9176
commit
188042d646
@ -88,7 +88,6 @@ void ReplayPlay::Load()
|
||||
}
|
||||
m_ghost_karts.clear();
|
||||
char s[1024], s1[1024];
|
||||
int n;
|
||||
|
||||
FILE *fd = openReplayFile(/*writeable*/false);
|
||||
if(!fd)
|
||||
@ -108,7 +107,7 @@ void ReplayPlay::Load()
|
||||
exit(-2);
|
||||
}
|
||||
|
||||
int version;
|
||||
unsigned int version;
|
||||
if (sscanf(s,"Version: %d", &version)!=1)
|
||||
{
|
||||
fprintf(stderr, "ERROR: no Version information found in replay file"
|
||||
@ -119,7 +118,7 @@ void ReplayPlay::Load()
|
||||
if (version!=getReplayVersion())
|
||||
{
|
||||
fprintf(stderr, "WARNING: replay is version '%d'\n",version);
|
||||
fprintf(stderr, " STK version is '%s'\n",getReplayVersion());
|
||||
fprintf(stderr, " STK version is '%d'\n",getReplayVersion());
|
||||
fprintf(stderr, " We try to proceed, but it may fail.\n");
|
||||
}
|
||||
|
||||
@ -130,6 +129,7 @@ void ReplayPlay::Load()
|
||||
exit(-2);
|
||||
}
|
||||
|
||||
int n;
|
||||
if(sscanf(s, "difficulty: %d",&n)!=1)
|
||||
{
|
||||
fprintf(stderr,"WARNING: No difficulty found in replay file.\n");
|
||||
@ -169,18 +169,19 @@ void ReplayPlay::Load()
|
||||
for(unsigned int k=0; k<num_ghost_karts; k++)
|
||||
{
|
||||
fgets(s, 1023, fd);
|
||||
if(sscanf(s, "model %d: %s",&n, s1)!=2)
|
||||
unsigned int kart_id;
|
||||
if(sscanf(s, "model %d: %s",&kart_id, s1)!=2)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"WARNING: No model information for kart %d found.\n",
|
||||
k);
|
||||
exit(-2);
|
||||
}
|
||||
if(n != k)
|
||||
if(kart_id != k)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"WARNING: Expected kart id %d, got %d - ignored.\n",
|
||||
k, n);
|
||||
k, kart_id);
|
||||
}
|
||||
m_ghost_karts.push_back(new GhostKart(std::string(s1)));
|
||||
|
||||
|
@ -87,7 +87,7 @@ void ReplayRecorder::update(float dt)
|
||||
float time = world->getTime();
|
||||
// Once we use interpolate results, we don't have to increase
|
||||
// m_next by num_karts, so count how often to increase
|
||||
unsigned int count = 0;
|
||||
|
||||
for(unsigned int i=0; i<num_karts; i++)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
|
Loading…
x
Reference in New Issue
Block a user