aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorpascal <pascal@localhost>2012-04-30 19:14:14 +0000
committerpascal <pascal@localhost>2012-04-30 19:14:14 +0000
commit95eb2e7288d941c7c18d711da282e6a88ee0eda1 (patch)
treec87733d3ae806f75c08bdd671d6b1c483baf5a3d /epan/dissectors
parent0f3c6a288e7d2577168a230a9c77ea2d81cb2701 (diff)
From Martin Kaiser:
Fix some 'intermediate pointers must be const qualified' warnings https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7215 svn path=/trunk/; revision=42355
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-6lowpan.c6
-rw-r--r--epan/dissectors/packet-dtls.c8
-rw-r--r--epan/dissectors/packet-dvbci.c12
-rw-r--r--epan/dissectors/packet-ssl-utils.c2
-rw-r--r--epan/dissectors/packet-ssl-utils.h2
-rw-r--r--epan/dissectors/packet-ssl.c16
6 files changed, 23 insertions, 23 deletions
diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c
index 22339bf2ae..c71a2070dd 100644
--- a/epan/dissectors/packet-6lowpan.c
+++ b/epan/dissectors/packet-6lowpan.c
@@ -418,7 +418,7 @@ static const guint8 lowpan_llprefix[8] = {
#define LOWPAN_CONTEXT_DEFAULT 0
#define LOWPAN_CONTEXT_LINK_LOCAL LOWPAN_CONTEXT_COUNT /* An internal context used for the link-local prefix. */
static struct e_in6_addr lowpan_context_table[LOWPAN_CONTEXT_COUNT+1]; /* The 17-th context stores the link-local prefix. */
-static gchar * lowpan_context_prefs[LOWPAN_CONTEXT_COUNT]; /* Array of strings set by the preferences. */
+static const gchar * lowpan_context_prefs[LOWPAN_CONTEXT_COUNT]; /* Array of strings set by the preferences. */
/* Helper macro to convert a bit offset/length into a byte count. */
#define BITS_TO_BYTE_LEN(bitoff, bitlen) ((bitlen)?(((bitlen) + ((bitoff)&0x07) + 7) >> 3):(0))
@@ -2530,7 +2530,7 @@ proto_register_6lowpan(void)
/* Initialize the context table. */
memset(lowpan_context_table, 0, sizeof(lowpan_context_table));
- memset(lowpan_context_prefs, 0, sizeof(lowpan_context_prefs));
+ memset((gchar*)lowpan_context_prefs, 0, sizeof(lowpan_context_prefs));
/* Initialize the link-local prefix. */
lowpan_context_table[LOWPAN_CONTEXT_LINK_LOCAL].bytes[0] = 0xfe;
@@ -2564,7 +2564,7 @@ proto_register_6lowpan(void)
g_string_printf(pref_title, "Context %d", i);
g_string_printf(pref_desc, "IPv6 prefix to use for stateful address decompression.");
prefs_register_string_preference(prefs_module, pref_name->str, pref_title->str,
- pref_desc->str, (const char **) &lowpan_context_prefs[i]);
+ pref_desc->str, &lowpan_context_prefs[i]);
/* Don't free the ->str */
g_string_free(pref_name, FALSE);
g_string_free(pref_title, FALSE);
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c
index 1d3f15a5de..890990accb 100644
--- a/epan/dissectors/packet-dtls.c
+++ b/epan/dissectors/packet-dtls.c
@@ -177,9 +177,9 @@ static StringInfo dtls_decrypted_data = {NULL, 0};
static gint dtls_decrypted_data_avail = 0;
static uat_t *dtlsdecrypt_uat = NULL;
-static gchar *dtls_keys_list = NULL;
+static const gchar *dtls_keys_list = NULL;
#ifdef HAVE_LIBGNUTLS
-static gchar *dtls_debug_file_name = NULL;
+static const gchar *dtls_debug_file_name = NULL;
#endif
static heur_dissector_list_t heur_subdissector_list;
@@ -2656,12 +2656,12 @@ proto_register_dtls(void)
prefs_register_string_preference(dtls_module, "debug_file", "DTLS debug file",
"redirect dtls debug to file name; leave empty to disable debug, "
"use \"" SSL_DEBUG_USE_STDERR "\" to redirect output to stderr\n",
- (const gchar **)&dtls_debug_file_name);
+ &dtls_debug_file_name);
prefs_register_string_preference(dtls_module, "keys_list", "RSA keys list (deprecated)",
"Semicolon-separated list of private RSA keys used for DTLS decryption. "
"Used by versions of Wireshark prior to 1.6",
- (const gchar **)&dtls_keys_list);
+ &dtls_keys_list);
}
#endif
diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c
index 25c915f7f1..ae95820995 100644
--- a/epan/dissectors/packet-dvbci.c
+++ b/epan/dissectors/packet-dvbci.c
@@ -756,8 +756,8 @@ static const value_string dvbci_apdu_tag[] = {
static int proto_dvbci = -1;
-static gchar* dvbci_sek = NULL;
-static gchar* dvbci_siv = NULL;
+static const gchar *dvbci_sek = NULL;
+static const gchar *dvbci_siv = NULL;
static gint ett_dvbci = -1;
static gint ett_dvbci_hdr = -1;
@@ -5248,11 +5248,11 @@ proto_register_dvbci(void)
dvbci_module = prefs_register_protocol(
proto_dvbci, proto_reg_handoff_dvbci);
prefs_register_string_preference(dvbci_module,
- "sek", "SAC Encryption Key", "SAC Encryption Key (16 hex bytes)",
- (const gchar **)&dvbci_sek);
+ "sek", "SAC Encryption Key", "SAC Encryption Key (16 hex bytes)",
+ &dvbci_sek);
prefs_register_string_preference(dvbci_module,
- "siv", "SAC Init Vector", "SAC Init Vector (16 hex bytes)",
- (const gchar **)&dvbci_siv);
+ "siv", "SAC Init Vector", "SAC Init Vector (16 hex bytes)",
+ &dvbci_siv);
sas_msg_dissector_table = register_dissector_table("dvb-ci.sas.app_id_str",
"SAS application id", FT_STRING, BASE_NONE);
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index dc16ef711f..552a537e57 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -3789,7 +3789,7 @@ ssl_keylog_lookup(SslDecryptSession* ssl_session,
static FILE* ssl_debug_file=NULL;
void
-ssl_set_debug(char* name)
+ssl_set_debug(const gchar* name)
{
static gint debug_file_must_be_closed;
gint use_stderr;
diff --git a/epan/dissectors/packet-ssl-utils.h b/epan/dissectors/packet-ssl-utils.h
index 5213cef703..c7229ec1e5 100644
--- a/epan/dissectors/packet-ssl-utils.h
+++ b/epan/dissectors/packet-ssl-utils.h
@@ -550,7 +550,7 @@ ssl_print_string(const gchar* name, const StringInfo* data);
extern void
ssl_print_text_data(const gchar* name, const guchar* data, size_t len);
extern void
-ssl_set_debug(gchar* name);
+ssl_set_debug(const gchar* name);
extern void
ssl_debug_flush(void);
#else
diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c
index 0715e28934..fdd954a009 100644
--- a/epan/dissectors/packet-ssl.c
+++ b/epan/dissectors/packet-ssl.c
@@ -330,15 +330,15 @@ static StringInfo ssl_decrypted_data = {NULL, 0};
static gint ssl_decrypted_data_avail = 0;
static uat_t *ssldecrypt_uat = NULL;
-static gchar* ssl_keys_list = NULL;
-static gchar* ssl_psk = NULL;
-static gchar* ssl_keylog_filename = NULL;
+static const gchar* ssl_keys_list = NULL;
+static const gchar* ssl_psk = NULL;
+static const gchar* ssl_keylog_filename = NULL;
/* List of dissectors to call for SSL data */
static heur_dissector_list_t ssl_heur_subdissector_list;
#if defined(SSL_DECRYPT_DEBUG) || defined(HAVE_LIBGNUTLS)
-static gchar* ssl_debug_file_name = NULL;
+static const gchar* ssl_debug_file_name = NULL;
#endif
@@ -5641,12 +5641,12 @@ proto_register_ssl(void)
prefs_register_string_preference(ssl_module, "debug_file", "SSL debug file",
"Redirect SSL debug to file name; leave empty to disable debugging, "
"or use \"" SSL_DEBUG_USE_STDERR "\" to redirect output to stderr\n",
- (const gchar **)&ssl_debug_file_name);
+ &ssl_debug_file_name);
prefs_register_string_preference(ssl_module, "keys_list", "RSA keys list (deprecated)",
"Semicolon-separated list of private RSA keys used for SSL decryption. "
"Used by versions of Wireshark prior to 1.6",
- (const gchar **)&ssl_keys_list);
+ &ssl_keys_list);
#endif
prefs_register_bool_preference(ssl_module,
@@ -5668,7 +5668,7 @@ proto_register_ssl(void)
#ifdef HAVE_LIBGNUTLS
prefs_register_string_preference(ssl_module, "psk", "Pre-Shared-Key",
"Pre-Shared-Key as HEX string, should be 0 to 16 bytes",
- (const gchar **)&ssl_psk);
+ &ssl_psk);
prefs_register_string_preference(ssl_module, "keylog_file", "(Pre)-Master-Secret log filename",
"The filename of a file which contains a list of \n"
@@ -5684,7 +5684,7 @@ proto_register_ssl(void)
"<MS> = The Master-Secret (MS)\n"
"\n"
"(All fields are in hex notation)",
- (const gchar **)&ssl_keylog_filename);
+ &ssl_keylog_filename);
#endif
}