aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/prefs.c16
-rw-r--r--tools/lemon/lemon.c4
-rw-r--r--wiretap/ascend-grammar.y6
-rw-r--r--wiretap/ascend-int.h2
-rw-r--r--wiretap/wtap.h4
5 files changed, 16 insertions, 16 deletions
diff --git a/epan/prefs.c b/epan/prefs.c
index 1585d7e567..a30acf261e 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -311,7 +311,7 @@ find_module(const char *name)
{
GList *list_entry;
- list_entry = g_list_find_custom(modules, (gpointer)name, module_match);
+ list_entry = g_list_find_custom(modules, name, module_match);
if (list_entry == NULL)
return NULL; /* no such module */
return (module_t *) list_entry->data;
@@ -404,7 +404,7 @@ register_preference(module_t *module, const char *name, const char *title,
const char *description, pref_type_t type)
{
pref_t *preference;
- const guchar *p;
+ const gchar *p;
preference = g_malloc(sizeof (pref_t));
preference->name = name;
@@ -427,8 +427,8 @@ register_preference(module_t *module, const char *name, const char *title,
* and shouldn't require quoting, shifting, etc.
*/
for (p = name; *p != '\0'; p++)
- g_assert(isascii(*p) &&
- (islower(*p) || isdigit(*p) || *p == '_' || *p == '.'));
+ g_assert(isascii((guchar)*p) &&
+ (islower((guchar)*p) || isdigit((guchar)*p) || *p == '_' || *p == '.'));
/*
* Make sure there's not already a preference with that
@@ -476,7 +476,7 @@ find_preference(module_t *module, const char *name)
{
GList *list_entry;
- list_entry = g_list_find_custom(module->prefs, (gpointer)name,
+ list_entry = g_list_find_custom(module->prefs, name,
preference_match);
if (list_entry == NULL)
return NULL; /* no such preference */
@@ -867,7 +867,7 @@ find_val_for_string(const char *needle, const enum_val_t *haystack,
* default value that was passed as the third argument is returned.
*/
static int
-find_index_from_string_array(char *needle, char **haystack, int default_value)
+find_index_from_string_array(char *needle, const char **haystack, int default_value)
{
int i = 0;
@@ -1293,7 +1293,7 @@ read_prefs_file(const char *pf_path, FILE *pf, pref_set_pair_cb pref_set_pair_fc
int
prefs_set_pref(char *prefarg)
{
- guchar *p, *colonp;
+ gchar *p, *colonp;
int ret;
/*
@@ -1318,7 +1318,7 @@ prefs_set_pref(char *prefarg)
* as we allow it in the preferences file, we might as well
* allow it here).
*/
- while (isspace(*p))
+ while (isspace((guchar)*p))
p++;
if (*p == '\0') {
/*
diff --git a/tools/lemon/lemon.c b/tools/lemon/lemon.c
index 6d88e084de..6fe23e429d 100644
--- a/tools/lemon/lemon.c
+++ b/tools/lemon/lemon.c
@@ -193,11 +193,11 @@ struct lemon {
struct symbol **symbols; /* Sorted array of pointers to symbols */
int errorcnt; /* Number of errors */
struct symbol *errsym; /* The error symbol */
- const char *name; /* Name of the generated parser */
+ char *name; /* Name of the generated parser */
char *arg; /* Declaration of the 3th argument to parser */
char *tokentype; /* Type of terminal symbols in the parser stack */
char *start; /* Name of the start symbol for the grammar */
- const char *stacksize; /* Size of the parser stack */
+ char *stacksize; /* Size of the parser stack */
char *include; /* Code to put at the start of the C file */
int includeln; /* Line number for start of include code */
char *error; /* Code to execute when an error is seen */
diff --git a/wiretap/ascend-grammar.y b/wiretap/ascend-grammar.y
index 74456e31d8..398d8c5852 100644
--- a/wiretap/ascend-grammar.y
+++ b/wiretap/ascend-grammar.y
@@ -145,9 +145,9 @@ XMIT-Max7:20: (task "_brouterControlTask" at 0xb094ac20, time: 1481.51) 20 octet
#define NO_USER "<none>"
int yyparse(void);
-void yyerror(char *);
+void yyerror(const char *);
-gchar *ascend_parse_error;
+const gchar *ascend_parse_error;
static unsigned int bcur;
static guint32 start_time, secs, usecs, caplen, wirelen;
@@ -509,7 +509,7 @@ parse_ascend(FILE_T fh, guint8 *pd, struct ascend_phdr *phdr,
}
void
-yyerror (char *s)
+yyerror (const char *s)
{
ascend_parse_error = s;
}
diff --git a/wiretap/ascend-int.h b/wiretap/ascend-int.h
index f46825db7d..62c260ab54 100644
--- a/wiretap/ascend-int.h
+++ b/wiretap/ascend-int.h
@@ -36,7 +36,7 @@ typedef struct {
extern int at_eof;
-extern gchar *ascend_parse_error;
+extern const gchar *ascend_parse_error;
/*
* Pointer to the pseudo-header for the current packet.
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index 3c0c28b6e7..b18b2f74d7 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -465,8 +465,8 @@ typedef union {
struct k12_phdr {
guint32 input;
- gchar* input_name;
- gchar* stack_file;
+ const gchar* input_name;
+ const gchar* stack_file;
guint32 input_type;
k12_input_info_t input_info;
void* stuff;