* [PATCH/committed 1/2] sim: rx: constify some read-only global vars
@ 2023-12-05 4:50 Mike Frysinger
2023-12-05 4:50 ` [PATCH/committed 2/2] sim: rx: mark unused static var as unused Mike Frysinger
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2023-12-05 4:50 UTC (permalink / raw)
To: gdb-patches
---
sim/rx/rx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sim/rx/rx.c b/sim/rx/rx.c
index 4a7291e6d248..7502131f1319 100644
--- a/sim/rx/rx.c
+++ b/sim/rx/rx.c
@@ -36,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "misc.h"
#ifdef WITH_PROFILE
-static const char * id_names[] = {
+static const char * const id_names[] = {
"RXO_unknown",
"RXO_mov", /* d = s (signed) */
"RXO_movbi", /* d = [s,s2] (signed) */
@@ -142,7 +142,7 @@ static const char * id_names[] = {
"RXO_sccnd", /* d = cond(s) ? 1 : 0 */
};
-static const char * optype_names[] = {
+static const char * const optype_names[] = {
" - ",
"#Imm", /* #addend */
" Rn ", /* Rn */
@@ -332,7 +332,7 @@ div_cycles(long num, long den)
#endif /* else CYCLE_ACCURATE */
-static int size2bytes[] = {
+static const int size2bytes[] = {
4, 1, 1, 1, 2, 2, 2, 3, 4
};
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH/committed 2/2] sim: rx: mark unused static var as unused
2023-12-05 4:50 [PATCH/committed 1/2] sim: rx: constify some read-only global vars Mike Frysinger
@ 2023-12-05 4:50 ` Mike Frysinger
0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2023-12-05 4:50 UTC (permalink / raw)
To: gdb-patches
This seems like a useful utility func that mirrors the int2float
helper, so mark it as unused rather than delete.
---
sim/rx/rx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sim/rx/rx.c b/sim/rx/rx.c
index 7502131f1319..a6cfcf327de7 100644
--- a/sim/rx/rx.c
+++ b/sim/rx/rx.c
@@ -754,6 +754,7 @@ typedef union {
float f;
} FloatInt;
+ATTRIBUTE_UNUSED
static inline int
float2int (float f)
{
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-05 4:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05 4:50 [PATCH/committed 1/2] sim: rx: constify some read-only global vars Mike Frysinger
2023-12-05 4:50 ` [PATCH/committed 2/2] sim: rx: mark unused static var as unused Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).