mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 07:11:41 +00:00
Fix some signed/unsigned comparison warnings.
It seems mingw's gcc treats pointer subtraction differently to how linux's gcc does.
This commit is contained in:
parent
34c0c82408
commit
e0e69ac71a
2 changed files with 4 additions and 3 deletions
|
@ -257,7 +257,7 @@ PR_LeaveFunction (progs_t *pr)
|
|||
VISIBLE void
|
||||
PR_BoundsCheckSize (progs_t *pr, pointer_t addr, unsigned size)
|
||||
{
|
||||
if (addr < pr->pr_return - pr->pr_globals)
|
||||
if (addr < (pointer_t) (pr->pr_return - pr->pr_globals))
|
||||
PR_RunError (pr, "null pointer access");
|
||||
if (addr >= pr->globals_size
|
||||
|| size > (unsigned) (pr->globals_size - addr))
|
||||
|
|
|
@ -507,9 +507,10 @@ add_qfo_strings (qfo_mspace_t *strings)
|
|||
{
|
||||
const char *str = strings->d.strings;
|
||||
|
||||
while (str - strings->d.strings < strings->data_size) {
|
||||
while ((pr_uint_t) (str - strings->d.strings) < strings->data_size) {
|
||||
linker_add_string (str);
|
||||
while (str - strings->d.strings < strings->data_size && *str)
|
||||
while ((pr_uint_t) (str - strings->d.strings) < strings->data_size
|
||||
&& *str)
|
||||
str++;
|
||||
str++; // advance past the terminating nul
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue