forked from github/server
- Einige Warnungen (int/unsigned int) beseitigt.
This commit is contained in:
parent
b077f57f79
commit
09c503ba69
|
@ -109,7 +109,7 @@ read_borders(FILE * f)
|
||||||
fscanf(f, "%d %d %d %d ", &fx, &fy, &tx, &ty);
|
fscanf(f, "%d %d %d %d ", &fx, &fy, &tx, &ty);
|
||||||
bid = ++nextborder;
|
bid = ++nextborder;
|
||||||
} else {
|
} else {
|
||||||
fscanf(f, "%d %d %d %d %d", &bid, &fx, &fy, &tx, &ty);
|
fscanf(f, "%ud %d %d %d %d", &bid, &fx, &fy, &tx, &ty);
|
||||||
}
|
}
|
||||||
type = find_bordertype(zText);
|
type = find_bordertype(zText);
|
||||||
assert(type || !"border type not registered");
|
assert(type || !"border type not registered");
|
||||||
|
@ -209,7 +209,7 @@ b_read(border * b, FILE *f)
|
||||||
if (global.data_version<NEWROAD_VERSION)
|
if (global.data_version<NEWROAD_VERSION)
|
||||||
fscanf(f, "%d ", (int*)&b->data);
|
fscanf(f, "%d ", (int*)&b->data);
|
||||||
else
|
else
|
||||||
fscanf(f, "%x ", (int*)&b->data);
|
fscanf(f, "%x ", (unsigned int*)&b->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -2432,7 +2432,7 @@ rt_read(FILE * F)
|
||||||
{
|
{
|
||||||
resource_type * rt = calloc(sizeof(resource_type), 1);
|
resource_type * rt = calloc(sizeof(resource_type), 1);
|
||||||
unsigned int hash;
|
unsigned int hash;
|
||||||
int i = fscanf(F, "%d\n", &hash);
|
int i = fscanf(F, "%ud\n", &hash);
|
||||||
if (i==0 || i==EOF) {
|
if (i==0 || i==EOF) {
|
||||||
free(rt);
|
free(rt);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -558,8 +558,6 @@ typedef struct lostdata {
|
||||||
int ship;
|
int ship;
|
||||||
} lostdata;
|
} lostdata;
|
||||||
|
|
||||||
static unit * lostunits;
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@ log_read(const char * filename)
|
||||||
char buf[64];
|
char buf[64];
|
||||||
|
|
||||||
while (*fp) fp=&(*fp)->next;
|
while (*fp) fp=&(*fp)->next;
|
||||||
fscanf(log, "LOGVERSION %d\n", &global.data_version);
|
fscanf(log, "LOGVERSION %ud\n", &global.data_version);
|
||||||
while (!feof(log)) {
|
while (!feof(log)) {
|
||||||
if(fscanf(log, "%s", buf) == EOF) break;
|
if(fscanf(log, "%s", buf) == EOF) break;
|
||||||
if (strcmp(buf, "UNIT")==0) {
|
if (strcmp(buf, "UNIT")==0) {
|
||||||
|
|
Loading…
Reference in New Issue