mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
fixes for building on alpha (linux)
This commit is contained in:
parent
5c26b54697
commit
cc66577f1c
5 changed files with 10 additions and 10 deletions
|
@ -99,6 +99,6 @@ extern int vsnprintf(char *s, size_t maxlen, const char *format, va_list arg);
|
|||
#endif
|
||||
|
||||
#undef field_offset
|
||||
#define field_offset(type,field) ((int)&(((type *)0)->field))
|
||||
#define field_offset(type,field) ((size_t)&(((type *)0)->field))
|
||||
|
||||
#endif // __compat_h
|
||||
|
|
|
@ -260,7 +260,7 @@ check_branch (progs_t *pr, dstatement_t *st, opcode_t *op, short offset)
|
|||
address += offset;
|
||||
if (address < 0 || address >= pr->progs->numstatements)
|
||||
PR_Error (pr, "PR_Check_Opcodes: invalid branch (statement %d: %s)\n",
|
||||
st - pr->pr_statements, op->opname);
|
||||
(int)(st - pr->pr_statements), op->opname);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
@ -269,9 +269,9 @@ check_global (progs_t *pr, dstatement_t *st, opcode_t *op, etype_t type,
|
|||
{
|
||||
if (type == ev_void && operand) {
|
||||
if (st->op != OP_RETURN && st->op != OP_DONE) //FIXME need better "not used flags"
|
||||
PR_Error (pr, "PR_Check_Opcodes: non-zero global index in void operand (statement %d: %s)\n", st - pr->pr_statements, op->opname);
|
||||
PR_Error (pr, "PR_Check_Opcodes: non-zero global index in void operand (statement %d: %s)\n", (int)(st - pr->pr_statements), op->opname);
|
||||
} else if (operand >= pr->progs->numglobals) {
|
||||
PR_Error (pr, "PR_Check_Opcodes: out of bounds global index (statement %d: %s)\n", st - pr->pr_statements, op->opname);
|
||||
PR_Error (pr, "PR_Check_Opcodes: out of bounds global index (statement %d: %s)\n", (int)(st - pr->pr_statements), op->opname);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -288,7 +288,7 @@ PR_Check_Opcodes (progs_t *pr)
|
|||
if (!op) {
|
||||
PR_Error (pr,
|
||||
"PR_Check_Opcodes: unknown opcode %d at statement %d\n",
|
||||
st->op, st - pr->pr_statements);
|
||||
st->op, (int)(st - pr->pr_statements));
|
||||
}
|
||||
switch (st->op) {
|
||||
case OP_IF:
|
||||
|
|
|
@ -352,8 +352,8 @@ Hash_Stats (hashtab_t *tab)
|
|||
chains++;
|
||||
}
|
||||
}
|
||||
Sys_Printf ("%d elements\n", tab->num_ele);
|
||||
Sys_Printf ("%d / %d chains\n", chains, tab->tab_size);
|
||||
Sys_Printf ("%d elements\n", (int)tab->num_ele);
|
||||
Sys_Printf ("%d / %d chains\n", chains, (int)tab->tab_size);
|
||||
if (chains) {
|
||||
double average = (double) tab->num_ele / chains;
|
||||
double variance = 0;
|
||||
|
|
|
@ -1083,7 +1083,7 @@ QA_alloc (unsigned flags, ...)
|
|||
&& QA_alloc_callback && QA_alloc_callback (size));
|
||||
|
||||
if (!mem && failure == QA_NOFAIL)
|
||||
Sys_Error ("QA_alloc: could not allocate %d bytes!\n", size);
|
||||
Sys_Error ("QA_alloc: could not allocate %d bytes!\n", (int)size);
|
||||
|
||||
return mem;
|
||||
} else {
|
||||
|
|
|
@ -572,8 +572,8 @@ SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg)
|
|||
state->glow_size = bound (-1024, (int) SVfloat
|
||||
(ent, glow_size), 1016) >> 3;
|
||||
|
||||
if (sv_fields.glow_color != -1 && SVvector (ent, glow_color))
|
||||
state->glow_color = (int) SVvector (ent, glow_color);
|
||||
if (sv_fields.glow_color != -1 && SVfloat (ent, glow_color))
|
||||
state->glow_color = (int) SVfloat (ent, glow_color);
|
||||
|
||||
if (sv_fields.colormod != -1
|
||||
&& SVvector (ent, colormod)[0]
|
||||
|
|
Loading…
Reference in a new issue