aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mathieson <martin.mathieson@keysight.com>2021-02-20 14:01:32 +0000
committerMartin Kaiser <wireshark@kaiser.cx>2021-02-20 16:34:24 +0000
commitf3bc71c44ffb11b727998e2e0314a7d36e7fb6fa (patch)
tree18385337009c4036a378f89f6a008ee54e1ff8a1
parent4d793fdd7a0df7f5617a38f521dffe47db4e5973 (diff)
Make some more vars and functions static.
-rw-r--r--epan/dissectors/packet-dcerpc-spoolss.c2
-rw-r--r--epan/dissectors/packet-dcerpc-svcctl.c2
-rw-r--r--epan/dissectors/packet-eap.c2
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c24
-rw-r--r--epan/dissectors/packet-j1939.c2
-rw-r--r--epan/dissectors/packet-media.c5
-rw-r--r--epan/dissectors/packet-ncsi.c4
-rw-r--r--epan/dissectors/packet-nvme-rdma.c6
8 files changed, 22 insertions, 25 deletions
diff --git a/epan/dissectors/packet-dcerpc-spoolss.c b/epan/dissectors/packet-dcerpc-spoolss.c
index 6c3b41deb3..b3ba0547f4 100644
--- a/epan/dissectors/packet-dcerpc-spoolss.c
+++ b/epan/dissectors/packet-dcerpc-spoolss.c
@@ -422,7 +422,7 @@ spoolss_job_specific_rights(tvbuff_t *tvb, gint offset,
tree, hf_job_access_admin, tvb, offset, 4, access);
}
-struct access_mask_info spoolss_job_access_mask_info = {
+static struct access_mask_info spoolss_job_access_mask_info = {
"SPOOLSS job",
spoolss_job_specific_rights,
NULL, /* Generic mapping table */
diff --git a/epan/dissectors/packet-dcerpc-svcctl.c b/epan/dissectors/packet-dcerpc-svcctl.c
index 33117612e5..9adbad3c8c 100644
--- a/epan/dissectors/packet-dcerpc-svcctl.c
+++ b/epan/dissectors/packet-dcerpc-svcctl.c
@@ -214,7 +214,7 @@ svcctl_scm_specific_rights(tvbuff_t *tvb, gint offset, proto_tree *tree,
proto_tree_add_boolean(tree, hf_svcctl_scm_rights_connect, tvb, offset, 4, access);
}
-struct access_mask_info svcctl_scm_access_mask_info = {
+static struct access_mask_info svcctl_scm_access_mask_info = {
"SVCCTL",
svcctl_scm_specific_rights,
NULL, /* Generic mapping table */
diff --git a/epan/dissectors/packet-eap.c b/epan/dissectors/packet-eap.c
index 12f1794184..869ea8cd45 100644
--- a/epan/dissectors/packet-eap.c
+++ b/epan/dissectors/packet-eap.c
@@ -354,7 +354,7 @@ static const value_string eap_sim_aka_attribute_vals[] = {
{ 151, "AT_DEVICE_IDENTITY" },
{ 0, NULL }
};
-value_string_ext eap_sim_aka_attribute_vals_ext = VALUE_STRING_EXT_INIT(eap_sim_aka_attribute_vals);
+static value_string_ext eap_sim_aka_attribute_vals_ext = VALUE_STRING_EXT_INIT(eap_sim_aka_attribute_vals);
static const value_string eap_sim_aka_notification_vals[] = {
{ 0, "General Failure after Authentication" },
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index d1c1c0aeee..8e497ce6fd 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -118,7 +118,7 @@ void proto_reg_handoff_gsm_a_dtap(void);
/* PROTOTYPES/FORWARDS */
-const value_string gsm_a_dtap_msg_gcc_strings[] = {
+static const value_string gsm_a_dtap_msg_gcc_strings[] = {
{ 0x31, "Immediate Setup" },
{ 0x32, "Setup" },
{ 0x33, "Connect" },
@@ -131,7 +131,7 @@ const value_string gsm_a_dtap_msg_gcc_strings[] = {
{ 0, NULL }
};
-const value_string gsm_a_dtap_msg_bcc_strings[] = {
+static const value_string gsm_a_dtap_msg_bcc_strings[] = {
{ 0x31, "Immediate Setup" },
{ 0x32, "Setup" },
{ 0x33, "Connect" },
@@ -890,8 +890,8 @@ static const value_string gsm_a_dtap_number_of_spare_bits_vals[] = {
{ 0, NULL }
};
-const true_false_string tfs_add_ci = { "The MS should add the letters for the Country's Initials and a separator (e.g. a space) to the text string",
- "The MS should not add the letters for the Country's Initials to the text string" };
+static const true_false_string tfs_add_ci = { "The MS should add the letters for the Country's Initials and a separator (e.g. a space) to the text string",
+ "The MS should not add the letters for the Country's Initials to the text string" };
static const value_string gsm_a_dtap_coding_scheme_vals[] = {
{ 0, "Cell Broadcast data coding scheme, GSM default alphabet, language unspecified, defined in 3GPP TS 23.038"},
@@ -2064,17 +2064,17 @@ de_bearer_cap_uplink(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3
/*
* [9] 10.5.4.5a Call Control Capabilities
*/
-const true_false_string gsm_a_dtap_mcat_value = {
+static const true_false_string gsm_a_dtap_mcat_value = {
"The mobile station supports Multimedia CAT during the alerting phase of a mobile originated multimedia call establishment",
"The mobile station does not support Multimedia CAT"
};
-const true_false_string gsm_a_dtap_enicm_value = {
+static const true_false_string gsm_a_dtap_enicm_value = {
"The mobile station supports the Enhanced Network-initiated In-Call Modification procedure",
"The mobile station does not support the Enhanced Network-initiated In-Call Modification procedure"
};
-const true_false_string gsm_a_dtap_dtmf_value = {
+static const true_false_string gsm_a_dtap_dtmf_value = {
"the mobile station supports DTMF as specified in subclause 5.5.7 of TS 24.008",
"reserved for earlier versions of the protocol"
};
@@ -2222,7 +2222,7 @@ const value_string gsm_a_dtap_numbering_plan_id_values[] = {
{ 0, NULL }
};
-const value_string gsm_a_dtap_present_ind_values[] = {
+static const value_string gsm_a_dtap_present_ind_values[] = {
{ 0x00, "Presentation allowed" },
{ 0x01, "Presentation restricted" },
{ 0x02, "Number not available due to interworking" },
@@ -2230,7 +2230,7 @@ const value_string gsm_a_dtap_present_ind_values[] = {
{ 0, NULL }
};
-const value_string gsm_a_dtap_screening_ind_values[] = {
+static const value_string gsm_a_dtap_screening_ind_values[] = {
{ 0x00, "User-provided, not screened" },
{ 0x01, "User-provided, verified and passed" },
{ 0x02, "User-provided, verified and failed" },
@@ -2280,13 +2280,13 @@ de_bcd_num(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset,
/*
* Helper function for sub address decoding
*/
-const value_string gsm_a_dtap_type_of_sub_addr_values[] = {
+static const value_string gsm_a_dtap_type_of_sub_addr_values[] = {
{ 0x00, "NSAP (ITU-T Rec. X.213/ISO 8348 AD2)" },
{ 0x02, "User specified" },
{ 0, NULL }
};
-const value_string gsm_a_dtap_odd_even_ind_values[] = {
+static const value_string gsm_a_dtap_odd_even_ind_values[] = {
{ 0x00, "even number of address signals" },
{ 0x01, "odd number of address signals" },
{ 0, NULL }
@@ -3088,7 +3088,7 @@ de_alert_pat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset
/*
* 10.5.4.27 Allowed actions $(CCBS)$
*/
-const true_false_string gsm_a_ccbs_activation_value = {
+static const true_false_string gsm_a_ccbs_activation_value = {
"Activation of CCBS possible",
"Activation of CCBS not possible"
};
diff --git a/epan/dissectors/packet-j1939.c b/epan/dissectors/packet-j1939.c
index 3307e06e82..d1894d355e 100644
--- a/epan/dissectors/packet-j1939.c
+++ b/epan/dissectors/packet-j1939.c
@@ -145,7 +145,7 @@ static const value_string j1939_address_vals[] = {
{ 0, NULL }
};
-value_string_ext j1939_address_vals_ext = VALUE_STRING_EXT_INIT(j1939_address_vals);
+static value_string_ext j1939_address_vals_ext = VALUE_STRING_EXT_INIT(j1939_address_vals);
static void
j1939_fmt_address(gchar *result, guint32 addr )
diff --git a/epan/dissectors/packet-media.c b/epan/dissectors/packet-media.c
index 4f6ebc4591..91d0e73e4c 100644
--- a/epan/dissectors/packet-media.c
+++ b/epan/dissectors/packet-media.c
@@ -24,10 +24,7 @@
void proto_register_media(void);
-/* proto_media cannot be static because it's referenced in the
- * print routines
- */
-int proto_media = -1;
+static int proto_media = -1;
static gint hf_media_type = -1;
static gint ett_media = -1;
static heur_dissector_list_t heur_subdissector_list;
diff --git a/epan/dissectors/packet-ncsi.c b/epan/dissectors/packet-ncsi.c
index ea11a2aacf..d6d64df948 100644
--- a/epan/dissectors/packet-ncsi.c
+++ b/epan/dissectors/packet-ncsi.c
@@ -509,7 +509,7 @@ dissect_ncsi_aen(tvbuff_t *tvb, proto_tree *tree)
#define HEXSTR(x) (((x) < 10)? '0' + (x): 'A' + ((x) - 10))
-const gchar *
+static const gchar *
ncsi_bcd_dig_to_str(tvbuff_t *tvb, const gint offset)
{
int length = 16; /* MM.mm.uu.aa.bb */
@@ -559,7 +559,7 @@ ncsi_bcd_dig_to_str(tvbuff_t *tvb, const gint offset)
}
-const gchar *
+static const gchar *
ncsi_fw_version(tvbuff_t *tvb, const gint offset)
{
int length = 16; /* hh.hh.hh.hh */
diff --git a/epan/dissectors/packet-nvme-rdma.c b/epan/dissectors/packet-nvme-rdma.c
index c3e1c6052c..87da32daf8 100644
--- a/epan/dissectors/packet-nvme-rdma.c
+++ b/epan/dissectors/packet-nvme-rdma.c
@@ -272,7 +272,7 @@ struct prop_ver_ctx {
int mjr;
};
-struct prop_ver_ctx hf_nvme_rdma_cmd_gprop_ver = {
+static struct prop_ver_ctx hf_nvme_rdma_cmd_gprop_ver = {
.ter = -1,
.mnr = -1,
.mjr = -1,
@@ -359,7 +359,7 @@ struct prop_nssrc_ctx {
int nssrc;
int rsvd;
};
-struct prop_nssrc_ctx hf_nvme_rdma_cmd_gprop_nssr = {
+static struct prop_nssrc_ctx hf_nvme_rdma_cmd_gprop_nssr = {
.nssrc = -1,
.rsvd = -1,
};
@@ -393,7 +393,7 @@ static struct prop_csts_ctx hf_nvme_rdma_cmd_sprop_csts = {
.rsvd1= -1,
};
/* NVM Subsystem Reset */
-struct prop_nssrc_ctx hf_nvme_rdma_cmd_sprop_nssr = {
+static struct prop_nssrc_ctx hf_nvme_rdma_cmd_sprop_nssr = {
.nssrc = -1,
.rsvd = -1,
};