type conversion warnings gefixt

This commit is contained in:
Enno Rehling 2002-02-23 11:27:19 +00:00
parent afbd3a9062
commit cf0bdf6b7f
4 changed files with 4 additions and 4 deletions

View File

@ -288,7 +288,7 @@ static int
cr_skill(const void * v, char * buffer, const void * userdata) cr_skill(const void * v, char * buffer, const void * userdata)
{ {
const faction * report = (const faction*)userdata; const faction * report = (const faction*)userdata;
skill_t sk = (skill_t)v; skill_t sk = (skill_t)(int)v;
if (sk!=NOSKILL) sprintf(buffer, "\"%s\"", if (sk!=NOSKILL) sprintf(buffer, "\"%s\"",
add_translation(skillname(sk, NULL), skillname(sk, report->locale))); add_translation(skillname(sk, NULL), skillname(sk, report->locale)));
else strcpy(buffer, "\"\""); else strcpy(buffer, "\"\"");

View File

@ -3631,7 +3631,7 @@ static void
eval_skill(struct opstack ** stack, const void * userdata) eval_skill(struct opstack ** stack, const void * userdata)
{ {
const faction * report = (const faction*)userdata; const faction * report = (const faction*)userdata;
int sk = opop(stack, int); skill_t sk = (skill_t)opop(stack, int);
const char * c = skillname(sk, report->locale); const char * c = skillname(sk, report->locale);
opush(stack, strcpy(balloc(strlen(c)+1), c)); opush(stack, strcpy(balloc(strlen(c)+1), c));
} }

View File

@ -477,7 +477,7 @@ learn(void)
} }
/* snotlings können Talente nur bis T8 lernen */ /* snotlings können Talente nur bis T8 lernen */
if (u->race == new_race[RC_SNOTLING]){ if (u->race == new_race[RC_SNOTLING]){
if (get_level(u, i) >= 8){ if (get_level(u, (skill_t)i) >= 8){
cmistake(u, findorder(u, u->thisorder), 308, MSG_EVENT); cmistake(u, findorder(u, u->thisorder), 308, MSG_EVENT);
continue; continue;
} }

View File

@ -872,7 +872,7 @@ readgame(boolean backup)
w->mode = (unsigned char)ri(F); w->mode = (unsigned char)ri(F);
w->next = pl->watchers; w->next = pl->watchers;
pl->watchers = w; pl->watchers = w;
ur_add((void*)fno, &w->faction, resolve_faction); ur_add((void*)fno, (void**)&w->faction, resolve_faction);
} }
free(s); free(s);
} }