Skip to contentSkip to conversation

disas/cris: Fix warning caused by missing 'static' attribute

PATCH Applied Stefan Weil 2 participants 3 messages Mar 1, 2015 – Mar 10, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 disas/cris: Fix warning caused by missing 'static' attribute

Warning from the Sparse static analysis tool:

disas/cris.c:1218:26: warning:
symbol 'cris_cond15s' was not declared. Should it be static?

---
 disas/cris.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
disas/cris.c +1 -1
index 9dfb4e3..a034dba 100644
@@ -1215,7 +1215,7 @@ cris_cc_strings[] =
 };
 
 /* Different names and semantics for condition 1111 (0xf).  */
-const struct cris_cond15 cris_cond15s[] =
+static const struct cris_cond15 cris_cond15s[] =
 {
   /* FIXME: In what version did condition "ext" disappear?  */
   {"ext", cris_ver_v0_3},
Signature · 1 line
1.7.10.4
#2 lore raw
In reply to Stefan Weil
Quoted 15 lines · Stefan Weil

Warning from the Sparse static analysis tool:

disas/cris.c:1218:26: warning:
symbol 'cris_cond15s' was not declared. Should it be static?

---
 disas/cris.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
disas/cris.c +0 -0
index 9dfb4e3..a034dba 100644

disas/cris.c cris_cc_strings[] = · line 1218

Quoted 5 lines
disas/cris.c +1 -1
@@ -1215,7 +1215,7 @@ cris_cc_strings[] =
 };
 
 /* Different names and semantics for condition 1111 (0xf).  */
-const struct cris_cond15 cris_cond15s[] =
+static const struct cris_cond15 cris_cond15s[] =

This is the same patch you sent 07-feb, with Message-Id:
<[email protected]>, and the same patch which makes at least clang unhappy:

disas/cris.c:1218:33: error:
unused variable 'cris_cond15s' [-Werror,-Wunused-const-variable] static const struct cris_cond15 cris_cond15s[] =

                                 ^

1 error generated.

I'll drop this patch and remove the unused variable instead.

Thanks,

/mjt