Fix some warnings (and one of my previous 'fixes')
svn path=/trunk/; revision=14997
This commit is contained in:
parent
5731769818
commit
e1c6d9ac3d
16
epan/prefs.c
16
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') {
|
||||
/*
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue