aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2013-07-01 13:03:23 +0000
committerBill Meier <wmeier@newsguy.com>2013-07-01 13:03:23 +0000
commit8d5bbb41469656b27d34ac3e334333652f63cefa (patch)
tree6e47ff7a85ea3bc7efd1a64d084db7b1ca977c39 /epan
parent59e46d816b4c22e4d39778aa3ccff2ac9e847007 (diff)
Define certain 'const char *...' arrays as static.
Reduces code memory usage and execution time. (See SVN #50271) svn path=/trunk/; revision=50292
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-assa_r3.c6
-rw-r--r--epan/dissectors/packet-icq.c2
-rw-r--r--epan/dissectors/packet-kink.c2
-rw-r--r--epan/dissectors/packet-nfs.c50
-rw-r--r--epan/dissectors/packet-nstrace.c2
-rw-r--r--epan/dissectors/packet-osi-options.c4
-rw-r--r--epan/dissectors/packet-sasp.c2
-rw-r--r--epan/dissectors/packet-sita.c14
-rw-r--r--epan/dissectors/packet-tcp.c2
-rw-r--r--epan/dissectors/packet-tr.c2
-rw-r--r--epan/dissectors/packet-trmac.c2
-rw-r--r--epan/dissectors/packet-xmpp-conference.c2
-rw-r--r--epan/dissectors/packet-xmpp-core.c8
-rw-r--r--epan/dissectors/packet-xmpp-gtalk.c2
-rw-r--r--epan/dissectors/packet-xmpp-jingle.c20
-rw-r--r--epan/dissectors/packet-xmpp-other.c20
-rw-r--r--epan/dissectors/packet-xtp.c6
-rw-r--r--epan/dissectors/packet-zbee-zdp.c2
18 files changed, 75 insertions, 73 deletions
diff --git a/epan/dissectors/packet-assa_r3.c b/epan/dissectors/packet-assa_r3.c
index 03486e6a88..76d58ad42e 100644
--- a/epan/dissectors/packet-assa_r3.c
+++ b/epan/dissectors/packet-assa_r3.c
@@ -4273,9 +4273,9 @@ dissect_r3_upstreammfgfield_checkpointlog (tvbuff_t *tvb, guint32 start_offset,
proto_tree *cpe_tree = proto_item_add_subtree (cpe_item, ett_r3checkpointlogentry);
guint resettype;
const gchar *desc;
- const gchar *resets [] = { "Stack underflow", "Stack overflow", "Power-On",
- "Software", "Brown-out", "MCLR in sleep", "WDT",
- "Normal", "[Unknown Reset Type]" };
+ static const gchar *resets [] = { "Stack underflow", "Stack overflow", "Power-On",
+ "Software", "Brown-out", "MCLR in sleep", "WDT",
+ "Normal", "[Unknown Reset Type]" };
desc = val_to_str_ext_const (cp, &r3_checkpointnames_ext, "[Unknown Checkpoint]");
diff --git a/epan/dissectors/packet-icq.c b/epan/dissectors/packet-icq.c
index b9af2e78e5..427c50d026 100644
--- a/epan/dissectors/packet-icq.c
+++ b/epan/dissectors/packet-icq.c
@@ -1222,7 +1222,7 @@ icqv5_srv_meta_user(proto_tree* tree, /* Tree to put the data in */
* They are used to "implement" a poorman's exception handling
*/
int len = 0;
- const char *descr[] = {
+ static const char *descr[] = {
"Nick",
"First name",
"Last name",
diff --git a/epan/dissectors/packet-kink.c b/epan/dissectors/packet-kink.c
index 4274b81f66..38ed13ad54 100644
--- a/epan/dissectors/packet-kink.c
+++ b/epan/dissectors/packet-kink.c
@@ -774,7 +774,7 @@ dissect_payload_kink_error(packet_info *pinfo, tvbuff_t *tvb, int offset, proto_
guint16 payload_length;
guint32 error_code;
int start_payload_offset = 0; /* Keep the beginning of the payload offset */
- const char *char_error_code[] = {
+ static const char *char_error_code[] = {
"KINK_OK",
"KINK_PROTOERR",
"KINK_INVDOI",
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
index 4b48ae19b2..86c40cc296 100644
--- a/epan/dissectors/packet-nfs.c
+++ b/epan/dissectors/packet-nfs.c
@@ -1615,7 +1615,7 @@ dissect_fhandle_data_NETAPP(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree *t
proto_item *item = NULL;
proto_tree *subtree = NULL;
char *flag_string;
- const char *strings[] = { " MNT_PNT", " SNAPDIR", " SNAPDIR_ENT",
+ static const char *strings[] = { " MNT_PNT", " SNAPDIR", " SNAPDIR_ENT",
" EMPTY", " VBN_ACCESS", " MULTIVOLUME",
" METADATA" };
guint16 bit = sizeof(strings) / sizeof(strings[0]);
@@ -1685,32 +1685,32 @@ dissect_fhandle_data_NETAPP_V4(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree
guint32 inum = tvb_get_ntohl(tvb, offset + 12);
const char *handle_string=NULL;
- const char *handle_type_strings [] = { "NORMAL",
- "UNEXP",
- "VOLDIR",
- "ROOT",
- "ABSENT",
- "INVALID"
- };
+ static const char *handle_type_strings [] = { "NORMAL",
+ "UNEXP",
+ "VOLDIR",
+ "ROOT",
+ "ABSENT",
+ "INVALID"
+ };
char *flag_string;
- const char *strings[] = { " MNT_PNT",
- " SNAPDIR",
- " SNAPDIR_ENT",
- " EMPTY",
- " VBN_ACCESS",
- " MULTIVOLUME",
- " METADATA",
- " ORPHAN",
- " FOSTER",
- " NAMED_ATTR",
- " EXP_SNAPDIR",
- " VFILER",
- " NS_AGGR",
- " STRIPED",
- " NS_PRIVATE",
- " NEXT_GEN_FH"
- };
+ static const char *strings[] = { " MNT_PNT",
+ " SNAPDIR",
+ " SNAPDIR_ENT",
+ " EMPTY",
+ " VBN_ACCESS",
+ " MULTIVOLUME",
+ " METADATA",
+ " ORPHAN",
+ " FOSTER",
+ " NAMED_ATTR",
+ " EXP_SNAPDIR",
+ " VFILER",
+ " NS_AGGR",
+ " STRIPED",
+ " NS_PRIVATE",
+ " NEXT_GEN_FH"
+ };
guint16 bit = sizeof(strings) / sizeof(strings[0]);
proto_tree *flag_tree = NULL;
diff --git a/epan/dissectors/packet-nstrace.c b/epan/dissectors/packet-nstrace.c
index df4ce886ab..401652e9b1 100644
--- a/epan/dissectors/packet-nstrace.c
+++ b/epan/dissectors/packet-nstrace.c
@@ -146,7 +146,7 @@ dissect_nstrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 offset;
guint i, bpos;
emem_strbuf_t *flags_strbuf = ep_strbuf_new_label("None");
- const gchar *flags[] = {"FP", "FR", "DFD", "SRSS", "RSSH"};
+ static const gchar *flags[] = {"FP", "FR", "DFD", "SRSS", "RSSH"};
gboolean first_flag = TRUE;
guint8 flagoffset, flagval;
guint8 src_vmname_len = 0, dst_vmname_len = 0;
diff --git a/epan/dissectors/packet-osi-options.c b/epan/dissectors/packet-osi-options.c
index 5c3294b4db..9792897f3d 100644
--- a/epan/dissectors/packet-osi-options.c
+++ b/epan/dissectors/packet-osi-options.c
@@ -372,10 +372,10 @@ static void
dissect_option_rfd( const guchar error, const guchar field, int offset,
guchar len, tvbuff_t *tvb, proto_tree *tree ) {
guchar error_class = 0;
- const char *format_string[] =
+ static const char *format_string[] =
{ "Reason for discard {General} : %s, in field %u",
"Reason for discard {Address} : %s, in field %u",
- "Reason for discard {Source Routing}: %s, in field %u",
+ "Reason for discard {Source Routing} : %s, in field %u",
"Reason for discard {Lifetime} : %s, in field %u",
"Reason for discard {PDU discarded} : %s, in field %u",
"Reason for discard {Reassembly} : %s, in field %u"
diff --git a/epan/dissectors/packet-sasp.c b/epan/dissectors/packet-sasp.c
index 85f4735d07..f240d6ecdc 100644
--- a/epan/dissectors/packet-sasp.c
+++ b/epan/dissectors/packet-sasp.c
@@ -583,7 +583,7 @@ static void dissect_dereg_req(tvbuff_t *tvb, proto_tree *pay_load, guint32 offse
emem_strbuf_t *reasonflags_strbuf = ep_strbuf_new_label("");
- const gchar *fstr[] = {"No Reason", "Learned & Purposeful" };
+ static const gchar *fstr[] = {"No Reason", "Learned & Purposeful" };
dereg_tree = proto_tree_add_text(pay_load, tvb, offset, -1 , "DeReg Request");
diff --git a/epan/dissectors/packet-sita.c b/epan/dissectors/packet-sita.c
index 46ee19e198..c911bb752c 100644
--- a/epan/dissectors/packet-sita.c
+++ b/epan/dissectors/packet-sita.c
@@ -109,12 +109,14 @@ dissect_sita(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *sita_errors1_tree = NULL;
proto_tree *sita_errors2_tree = NULL;
proto_tree *sita_signals_tree = NULL;
- const gchar *rx_errors1_str[] = {"Framing", "Parity", "Collision", "Long-frame", "Short-frame", "", "", "" };
- const gchar *rx_errors2_str[] = {"Non-Aligned", "Abort", "CD-lost", "DPLL", "Overrun", "Length", "CRC", "Break" };
- /*const gchar *tx_errors1_str[] = {"", "", "", "", "", "", "", "" }; */
- const gchar *tx_errors2_str[] = {"Underrun", "CTS-lost", "UART", "ReTx-limit", "", "", "", "" };
- const gchar *signals_str[] = {"DSR", "DTR", "CTS", "RTS", "DCD", "", "", "" };
- const gchar *flags_str[] = {"", "", "", "", "", "", "", "No-buffers" };
+ static const gchar *rx_errors1_str[] = {"Framing", "Parity", "Collision", "Long-frame", "Short-frame", "", "", "" };
+ static const gchar *rx_errors2_str[] = {"Non-Aligned", "Abort", "CD-lost", "DPLL", "Overrun", "Length", "CRC", "Break" };
+#if 0
+ static const gchar *tx_errors1_str[] = {"", "", "", "", "", "", "", "" };
+#endif
+ static const gchar *tx_errors2_str[] = {"Underrun", "CTS-lost", "UART", "ReTx-limit", "", "", "", "" };
+ static const gchar *signals_str[] = {"DSR", "DTR", "CTS", "RTS", "DCD", "", "", "" };
+ static const gchar *flags_str[] = {"", "", "", "", "", "", "", "No-buffers" };
col_clear(pinfo->cinfo, COL_PROTOCOL); /* erase the protocol */
col_clear(pinfo->cinfo, COL_INFO); /* and info columns so that the next decoder can fill them in */
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 718233afd6..4626b0fcf7 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -4142,7 +4142,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti = NULL, *tf, *hidden_item;
int offset = 0;
emem_strbuf_t *flags_strbuf = ep_strbuf_new_label("<None>");
- const gchar *flags[] = {"FIN", "SYN", "RST", "PSH", "ACK", "URG", "ECN", "CWR", "NS"};
+ static const gchar *flags[] = {"FIN", "SYN", "RST", "PSH", "ACK", "URG", "ECN", "CWR", "NS"};
gint i;
guint bpos;
guint optlen;
diff --git a/epan/dissectors/packet-tr.c b/epan/dissectors/packet-tr.c
index 0eb241805c..0f5533ca7b 100644
--- a/epan/dissectors/packet-tr.c
+++ b/epan/dissectors/packet-tr.c
@@ -344,7 +344,7 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int x;
/* Token-Ring Strings */
- const char *fc[] = { "MAC", "LLC", "Reserved", "Unknown" };
+ static const char *fc[] = { "MAC", "LLC", "Reserved", "Unknown" };
trh_current++;
diff --git a/epan/dissectors/packet-trmac.c b/epan/dissectors/packet-trmac.c
index 155f4007d3..b0cdae8dca 100644
--- a/epan/dissectors/packet-trmac.c
+++ b/epan/dissectors/packet-trmac.c
@@ -134,7 +134,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree)
guint sv_length, sv_id;
guint16 beacon_type, ring;
- const char *beacon[] = {
+ static const char *beacon[] = {
"Recovery mode set", "Signal loss error",
"Streaming signal not Claim Token MAC frame",
"Streaming signal, Claim Token MAC frame"
diff --git a/epan/dissectors/packet-xmpp-conference.c b/epan/dissectors/packet-xmpp-conference.c
index edda0746b9..a1d88b6635 100644
--- a/epan/dissectors/packet-xmpp-conference.c
+++ b/epan/dissectors/packet-xmpp-conference.c
@@ -71,7 +71,7 @@ xmpp_conference_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_e
proto_item *cinfo_item;
proto_tree *cinfo_tree;
- const gchar *state_enums[] = {"full", "partial", "deleted"};
+ static const gchar *state_enums[] = {"full", "partial", "deleted"};
xmpp_array_t *state_array = xmpp_ep_init_array_t(state_enums, array_length(state_enums));
xmpp_attr_info attrs_info [] = {
diff --git a/epan/dissectors/packet-xmpp-core.c b/epan/dissectors/packet-xmpp-core.c
index c7d5a6fa97..9dc83b7664 100644
--- a/epan/dissectors/packet-xmpp-core.c
+++ b/epan/dissectors/packet-xmpp-core.c
@@ -276,11 +276,11 @@ xmpp_presence(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_
proto_item *presence_item;
proto_tree *presence_tree;
- const gchar *type_enums[] = {"error", "probe", "subscribe", "subscribed",
+ static const gchar *type_enums[] = {"error", "probe", "subscribe", "subscribed",
"unavailable", "unsubscribe", "unsubscribed"};
xmpp_array_t *type_array = xmpp_ep_init_array_t(type_enums, array_length(type_enums));
- const gchar *show_enums[] = {"away", "chat", "dnd", "xa"};
+ static const gchar *show_enums[] = {"away", "chat", "dnd", "xa"};
xmpp_array_t *show_array = xmpp_ep_init_array_t(show_enums, array_length(show_enums));
xmpp_attr_info attrs_info[] = {
@@ -366,7 +366,7 @@ xmpp_message(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t
proto_item *message_item;
proto_tree *message_tree;
- const gchar *type_enums[] = {"chat", "error", "groupchat", "headline", "normal"};
+ static const gchar *type_enums[] = {"chat", "error", "groupchat", "headline", "normal"};
xmpp_array_t *type_array = xmpp_ep_init_array_t(type_enums, array_length(type_enums));
xmpp_attr_info attrs_info[] = {
@@ -565,7 +565,7 @@ xmpp_failure(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t
{"condition", -1, FALSE, TRUE, NULL, NULL}
};
- const gchar *fail_names[] = {"aborted","account-disabled", "credentials-expired",
+ static const gchar *fail_names[] = {"aborted","account-disabled", "credentials-expired",
"encryption-required", "incorrect-encoding", "invalid-authzid", "invalid-mechanism",
"malformed-request", "mechanism-too-weak", "not-authorized", "temporary-auth-failure",
"transition-needed"
diff --git a/epan/dissectors/packet-xmpp-gtalk.c b/epan/dissectors/packet-xmpp-gtalk.c
index 676e090490..a894c62a1c 100644
--- a/epan/dissectors/packet-xmpp-gtalk.c
+++ b/epan/dissectors/packet-xmpp-gtalk.c
@@ -178,7 +178,7 @@ xmpp_gtalk_session_reason(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, x
xmpp_element_t *condition;
xmpp_element_t *text;
- const gchar *reason_names[] = { "success", "busy", "cancel"};
+ static const gchar *reason_names[] = { "success", "busy", "cancel"};
reason_item = proto_tree_add_text(tree, tvb, element->offset, element->length, "REASON");
reason_tree = proto_item_add_subtree(reason_item, ett_xmpp_gtalk_session_reason);
diff --git a/epan/dissectors/packet-xmpp-jingle.c b/epan/dissectors/packet-xmpp-jingle.c
index 78a7e5f700..71e0df20f9 100644
--- a/epan/dissectors/packet-xmpp-jingle.c
+++ b/epan/dissectors/packet-xmpp-jingle.c
@@ -94,9 +94,9 @@ xmpp_jingle(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t
proto_item *jingle_item;
proto_tree *jingle_tree;
- const gchar *rtp_info_msgs[] = {"active", "hold", "mute", "ringing", "unhold", "unmute"};
+ static const gchar *rtp_info_msgs[] = {"active", "hold", "mute", "ringing", "unhold", "unmute"};
- const gchar *action_enums[] = {"content-accept","content-add", "content-modify",
+ static const gchar *action_enums[] = {"content-accept","content-add", "content-modify",
"content-modify", "content-remove", "description-info", "security-info",
"session-accept", "session-info", "session-initiate", "session-terminate",
"transport-accept", "transport-info", "transport-reject", "transport-replace"
@@ -138,7 +138,7 @@ xmpp_jingle_content(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_el
proto_item *content_item;
proto_tree *content_tree;
- const gchar *creator_enums[] = {"initiator","responder"};
+ static const gchar *creator_enums[] = {"initiator","responder"};
xmpp_array_t *creator_enums_array = xmpp_ep_init_array_t(creator_enums,array_length(creator_enums));
xmpp_attr_info attrs_info[] = {
@@ -187,11 +187,11 @@ xmpp_jingle_reason(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_ele
xmpp_element_t *text; /*0-1*/
xmpp_element_t *rtp_error;
- const gchar *reason_names[] = { "success", "busy", "failed-application", "cancel", "connectivity-error",
+ static const gchar *reason_names[] = { "success", "busy", "failed-application", "cancel", "connectivity-error",
"decline", "expired", "failed-transport", "general-error", "gone", "incompatible-parameters",
"media-error", "security-error", "timeout", "unsupported-applications", "unsupported-transports"};
- const gchar *rtp_error_names[] = {"crypto-required", "invalid-crypto"};
+ static const gchar *rtp_error_names[] = {"crypto-required", "invalid-crypto"};
reason_item = proto_tree_add_item(tree, hf_xmpp_jingle_reason, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
reason_tree = proto_item_add_subtree(reason_item, ett_xmpp_jingle_reason);
@@ -436,7 +436,7 @@ xmpp_jingle_cont_desc_rtp_hdrext(proto_tree* tree, tvbuff_t* tvb, packet_info *p
proto_item *rtp_hdr_item;
proto_tree *rtp_hdr_tree;
- const gchar *senders[] = {"both", "initiator", "responder"};
+ static const gchar *senders[] = {"both", "initiator", "responder"};
xmpp_array_t *senders_enums = xmpp_ep_init_array_t(senders, 3);
xmpp_attr_info attrs_info[] = {
@@ -471,7 +471,7 @@ xmpp_jingle_rtp_info(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_e
proto_item *rtp_info_item;
proto_tree *rtp_info_tree;
- const gchar *creator[] = {"initiator","responder"};
+ static const gchar *creator[] = {"initiator","responder"};
xmpp_array_t *creator_enums = xmpp_ep_init_array_t(creator, array_length(creator));
xmpp_attr_info mute_attrs_info[] = {
@@ -520,7 +520,7 @@ xmpp_jingle_cont_trans_ice_candidate(proto_tree* tree, tvbuff_t* tvb, packet_inf
proto_item *cand_item;
proto_tree *cand_tree;
- const gchar *type_enums[] = {"host", "prflx", "relay", "srflx"};
+ static const gchar *type_enums[] = {"host", "prflx", "relay", "srflx"};
xmpp_array_t *type_enums_array = xmpp_ep_init_array_t(type_enums,array_length(type_enums));
xmpp_attr_info attrs_info[] = {
@@ -595,7 +595,7 @@ xmpp_jingle_cont_trans_raw_candidate(proto_tree* tree, tvbuff_t* tvb, packet_inf
proto_item *cand_item;
proto_tree *cand_tree;
- const gchar *type_enums[] = {"host", "prflx", "relay", "srflx"};
+ static const gchar *type_enums[] = {"host", "prflx", "relay", "srflx"};
xmpp_array_t *type_enums_array = xmpp_ep_init_array_t(type_enums,array_length(type_enums));
xmpp_attr_info attrs_info[] = {
@@ -649,7 +649,7 @@ xmpp_jingle_cont_trans_s5b_candidate(proto_tree *tree, tvbuff_t *tvb, packet_inf
proto_item *cand_item;
proto_tree *cand_tree;
- const gchar * type_enums[] = {"assisted", "direct", "proxy", "tunnel"};
+ static const gchar * type_enums[] = {"assisted", "direct", "proxy", "tunnel"};
xmpp_array_t *type_enums_array = xmpp_ep_init_array_t(type_enums, array_length(type_enums));
xmpp_attr_info attrs_info[] = {
diff --git a/epan/dissectors/packet-xmpp-other.c b/epan/dissectors/packet-xmpp-other.c
index 3874e581b8..b2c24ce59e 100644
--- a/epan/dissectors/packet-xmpp-other.c
+++ b/epan/dissectors/packet-xmpp-other.c
@@ -249,8 +249,8 @@ xmpp_roster_item(proto_tree *tree, tvbuff_t *tvb, packet_info* pinfo, xmpp_eleme
proto_item *item_item;
proto_tree *item_tree;
- const gchar *ask_enums[] = {"subscribe"};
- const gchar *subscription_enums[] = {"both","from","none","remove","to"};
+ static const gchar *ask_enums[] = {"subscribe"};
+ static const gchar *subscription_enums[] = {"both", "from", "none", "remove", "to"};
xmpp_array_t *ask_enums_array = xmpp_ep_init_array_t(ask_enums,array_length(ask_enums));
xmpp_array_t *subscription_array = xmpp_ep_init_array_t(subscription_enums,array_length(subscription_enums));
@@ -356,7 +356,7 @@ xmpp_bytestreams_query(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmp
proto_item *query_item;
proto_tree *query_tree;
- const gchar *mode_enums[] = {"tcp", "udp"};
+ static const gchar *mode_enums[] = {"tcp", "udp"};
xmpp_array_t *mode_array = xmpp_ep_init_array_t(mode_enums, array_length(mode_enums));
xmpp_attr_info attrs_info[] = {
@@ -592,7 +592,7 @@ xmpp_x_data(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t*
proto_item *x_item;
proto_tree *x_tree;
- const gchar *type_enums[] = {"cancel", "form", "result", "submit"};
+ static const gchar *type_enums[] = {"cancel", "form", "result", "submit"};
xmpp_array_t *type_array = xmpp_ep_init_array_t(type_enums, array_length(type_enums));
xmpp_attr_info attrs_info[] = {
@@ -622,7 +622,7 @@ xmpp_x_data_field(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_elem
proto_item *field_item;
proto_tree *field_tree;
- const gchar *type_enums[] = {"boolean", "fixed", "hidden", "jid-multi",
+ static const gchar *type_enums[] = {"boolean", "fixed", "hidden", "jid-multi",
"jid-single", "list-multi", "list-single", "text-multi", "text-single",
"text-private"
};
@@ -722,7 +722,7 @@ xmpp_ibb_open(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_
proto_item *open_item;
proto_tree *open_tree;
- const gchar *stanza_enums[] = {"iq","message"};
+ static const gchar *stanza_enums[] = {"iq", "message"};
xmpp_array_t *stanza_array = xmpp_ep_init_array_t(stanza_enums, array_length(stanza_enums));
xmpp_attr_info attrs_info[] = {
@@ -854,7 +854,7 @@ xmpp_x_event(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t
{"id", -1, FALSE, TRUE, NULL, NULL}
};
- const gchar *cond_names[] = {"offline", "delivered", "displayed", "composing"};
+ static const gchar *cond_names[] = {"offline", "delivered", "displayed", "composing"};
xmpp_attr_t *fake_cond;
@@ -992,10 +992,10 @@ xmpp_muc_user_item(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_ele
proto_item *item_item;
proto_tree *item_tree;
- const gchar *affiliation_enums[] = {"admin", "member", "none", "outcast", "owner"};
+ static const gchar *affiliation_enums[] = {"admin", "member", "none", "outcast", "owner"};
xmpp_array_t *affil_array = xmpp_ep_init_array_t(affiliation_enums, array_length(affiliation_enums));
- const gchar *role_enums[] = {"none", "moderator", "participant", "visitor"};
+ static const gchar *role_enums[] = {"none", "moderator", "participant", "visitor"};
xmpp_array_t *role_array = xmpp_ep_init_array_t(role_enums, array_length(role_enums));
xmpp_attr_info attrs_info [] ={
@@ -1297,7 +1297,7 @@ xmpp_jitsi_inputevt_rmt_ctrl(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
};
xmpp_element_t *action;
- const gchar *action_names[] = {"mouse-move","mouse-press", "mouse-release", "key-press", "key-release"};
+ static const gchar *action_names[] = {"mouse-move", "mouse-press", "mouse-release", "key-press", "key-release"};
if((action = xmpp_steal_element_by_names(element, action_names, array_length(action_names)))!=NULL)
{
diff --git a/epan/dissectors/packet-xtp.c b/epan/dissectors/packet-xtp.c
index 51844c87b0..c86770110b 100644
--- a/epan/dissectors/packet-xtp.c
+++ b/epan/dissectors/packet-xtp.c
@@ -906,9 +906,9 @@ dissect_xtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
struct xtphdr xtph[1];
int error = 0;
gchar *options;
- const char *fstr[] = { "<None>", "NOCHECK", "EDGE", "NOERR", "MULTI", "RES",
- "SORT", "NOFLOW", "FASTNAK", "SREQ", "DREQ",
- "RCLOSE", "WCLOSE", "EOM", "END", "BTAG" };
+ static const char *fstr[] = { "<None>", "NOCHECK", "EDGE", "NOERR", "MULTI", "RES",
+ "SORT", "NOFLOW", "FASTNAK", "SREQ", "DREQ",
+ "RCLOSE", "WCLOSE", "EOM", "END", "BTAG" };
gint fpos = 0, returned_length;
guint i, bpos;
guint cmd_options;
diff --git a/epan/dissectors/packet-zbee-zdp.c b/epan/dissectors/packet-zbee-zdp.c
index 79705f3416..bca278d4c6 100644
--- a/epan/dissectors/packet-zbee-zdp.c
+++ b/epan/dissectors/packet-zbee-zdp.c
@@ -998,7 +998,7 @@ zdp_parse_complex_desc(proto_tree *tree, gint ettindex, tvbuff_t *tvb, guint *of
tag_icon_url = 7
};
- const gchar *tag_name[] = {
+ static const gchar *tag_name[] = {
"Reserved Tag",
"languageChar",
"manufacturerName",