- Einige Warnungen (int/unsigned int) beseitigt.

This commit is contained in:
Christian Schlittchen 2002-04-14 07:34:31 +00:00
parent b077f57f79
commit 09c503ba69
4 changed files with 4 additions and 6 deletions

View File

@ -109,7 +109,7 @@ read_borders(FILE * f)
fscanf(f, "%d %d %d %d ", &fx, &fy, &tx, &ty);
bid = ++nextborder;
} 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);
assert(type || !"border type not registered");
@ -209,7 +209,7 @@ b_read(border * b, FILE *f)
if (global.data_version<NEWROAD_VERSION)
fscanf(f, "%d ", (int*)&b->data);
else
fscanf(f, "%x ", (int*)&b->data);
fscanf(f, "%x ", (unsigned int*)&b->data);
}
void

View File

@ -2432,7 +2432,7 @@ rt_read(FILE * F)
{
resource_type * rt = calloc(sizeof(resource_type), 1);
unsigned int hash;
int i = fscanf(F, "%d\n", &hash);
int i = fscanf(F, "%ud\n", &hash);
if (i==0 || i==EOF) {
free(rt);
return NULL;

View File

@ -558,8 +558,6 @@ typedef struct lostdata {
int ship;
} lostdata;
static unit * lostunits;
int
main(int argc, char *argv[])
{

View File

@ -36,7 +36,7 @@ log_read(const char * filename)
char buf[64];
while (*fp) fp=&(*fp)->next;
fscanf(log, "LOGVERSION %d\n", &global.data_version);
fscanf(log, "LOGVERSION %ud\n", &global.data_version);
while (!feof(log)) {
if(fscanf(log, "%s", buf) == EOF) break;
if (strcmp(buf, "UNIT")==0) {