[gamecode] Pass gcc's purity test again

I guess maybe that change might make a bigger difference than I thought,
gcc wasn't happy with it.
This commit is contained in:
Bill Currie 2022-02-14 19:30:50 +09:00
parent 550c0712d8
commit 4e229169ec
8 changed files with 9 additions and 9 deletions

View File

@ -102,7 +102,7 @@ bi_il_clear (progs_t *pr, void *_res)
il_data_reset (res);
}
static il_data_t *
static il_data_t * __attribute__((pure))
get_inputline (progs_t *pr, il_resources_t *res, int arg, const char *func)
{
il_data_t *line = il_data_get (res, arg);

View File

@ -177,7 +177,7 @@ bi_Hash_NewTable (progs_t *pr, void *_res)
R_INT (pr) = table_index (res, ht);
}
static bi_hashtab_t *
static bi_hashtab_t * __attribute__((pure))
get_table (progs_t *pr, hash_resources_t *res, const char *name, int index)
{
bi_hashtab_t *ht = table_get (res, index);

View File

@ -89,7 +89,7 @@ bi_mtwist_new (progs_t *pr, void *_res)
R_INT (pr) = state_index (res, mt);
}
static mtstate_t *
static mtstate_t * __attribute__((pure))
get_state (progs_t *pr, mtwist_resources_t *res, const char *name, int index)
{
mtstate_t *mt = state_get (res, index);

View File

@ -110,7 +110,7 @@ alloc_msgbuf (msgbuf_resources_t *res, byte *buf, int size)
return msgbuf_index (res, msgbuf);
}
static msgbuf_t *
static msgbuf_t * __attribute__((pure))
get_msgbuf (progs_t *pr, msgbuf_resources_t *res, const char *name, int msgbuf)
{
msgbuf_t *mb = msgbuf_get (res, msgbuf);

View File

@ -142,7 +142,7 @@ plist_free_handle (plist_resources_t *res, bi_plist_t *plist)
plist_free (res, plist);
}
static always_inline bi_plist_t *
static always_inline bi_plist_t * __attribute__((pure))
get_plist (progs_t *pr, plist_resources_t *res, const char *name, int handle)
{
bi_plist_t *plist = plist_get (res, handle);

View File

@ -158,7 +158,7 @@ bi_Qopen (progs_t *pr, void *_res)
Qclose (file);
}
static qfile_t *
static qfile_t * __attribute__((pure))
get_handle (progs_t *pr, qfile_resources_t *res, const char *name, int handle)
{
qfile_t *h = handle_get (res, handle);

View File

@ -136,7 +136,7 @@ res_set_iter_index (set_resources_t *res, bi_set_iter_t *set_iter)
return PR_RESINDEX(res->set_iter_map, set_iter);
}
static bi_set_t *
static bi_set_t * __attribute__((pure))
get_set (progs_t *pr, set_resources_t *res, const char *name, int index)
{
bi_set_t *set = res_set_get (res, index);
@ -146,7 +146,7 @@ get_set (progs_t *pr, set_resources_t *res, const char *name, int index)
return set;
}
static bi_set_iter_t *
static bi_set_iter_t * __attribute__((pure))
get_set_iter (progs_t *pr, set_resources_t *res, const char *name, int index)
{
bi_set_iter_t *set = res_set_iter_get (res, index);

View File

@ -107,7 +107,7 @@ qpic_index (draw_resources_t *res, qpic_res_t *qp)
return PR_RESINDEX (res->qpic_map, qp);
}
static qpic_res_t *
static qpic_res_t * __attribute__((pure))
get_qpic (progs_t *pr, draw_resources_t *res, const char *name, int qpic_handle)
{
qpic_res_t *qp = qpic_get (res, qpic_handle);