From e58d53d4b6145a8daecf93405c323bed12450b05 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 14 Feb 2022 19:30:50 +0900 Subject: [PATCH] [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. --- libs/console/bi_inputline.c | 2 +- libs/ruamoko/rua_hash.c | 2 +- libs/ruamoko/rua_mersenne.c | 2 +- libs/ruamoko/rua_msgbuf.c | 2 +- libs/ruamoko/rua_plist.c | 2 +- libs/ruamoko/rua_qfile.c | 2 +- libs/ruamoko/rua_set.c | 4 ++-- libs/video/renderer/r_progs.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libs/console/bi_inputline.c b/libs/console/bi_inputline.c index 1399319e5..c0da2c4e3 100644 --- a/libs/console/bi_inputline.c +++ b/libs/console/bi_inputline.c @@ -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); diff --git a/libs/ruamoko/rua_hash.c b/libs/ruamoko/rua_hash.c index c7ca65322..6f8b74547 100644 --- a/libs/ruamoko/rua_hash.c +++ b/libs/ruamoko/rua_hash.c @@ -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); diff --git a/libs/ruamoko/rua_mersenne.c b/libs/ruamoko/rua_mersenne.c index 8cb854dc3..83be30604 100644 --- a/libs/ruamoko/rua_mersenne.c +++ b/libs/ruamoko/rua_mersenne.c @@ -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); diff --git a/libs/ruamoko/rua_msgbuf.c b/libs/ruamoko/rua_msgbuf.c index 23959a2cf..d3ad525ab 100644 --- a/libs/ruamoko/rua_msgbuf.c +++ b/libs/ruamoko/rua_msgbuf.c @@ -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); diff --git a/libs/ruamoko/rua_plist.c b/libs/ruamoko/rua_plist.c index b07e365a6..c2b7414d3 100644 --- a/libs/ruamoko/rua_plist.c +++ b/libs/ruamoko/rua_plist.c @@ -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); diff --git a/libs/ruamoko/rua_qfile.c b/libs/ruamoko/rua_qfile.c index 89df29a33..ef748b914 100644 --- a/libs/ruamoko/rua_qfile.c +++ b/libs/ruamoko/rua_qfile.c @@ -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); diff --git a/libs/ruamoko/rua_set.c b/libs/ruamoko/rua_set.c index b6ee26f4d..40ed15d12 100644 --- a/libs/ruamoko/rua_set.c +++ b/libs/ruamoko/rua_set.c @@ -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); diff --git a/libs/video/renderer/r_progs.c b/libs/video/renderer/r_progs.c index ef2e5b403..c83adb15c 100644 --- a/libs/video/renderer/r_progs.c +++ b/libs/video/renderer/r_progs.c @@ -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);