diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-04-23 10:59:26 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-04-23 10:59:26 +0000 |
commit | 1bc049906a35c3490532ab68fcbf90750c225f77 (patch) | |
tree | f690697725617a640820ade652da4cf766bdc863 /epan/uat.c | |
parent | 7dc9df5f26ed136405fd1e99d62ebc3a6bf92dd5 (diff) | |
download | wireshark-1bc049906a35c3490532ab68fcbf90750c225f77.tar.gz |
Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set.
If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.
Constify a bunch of stuff, and make some other changes, to get rid of
warnings.
Clean up some indentation.
svn path=/trunk/; revision=21526
Diffstat (limited to 'epan/uat.c')
-rw-r--r-- | epan/uat.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/epan/uat.c b/epan/uat.c index 85f8d4cb3f..cd180f329d 100644 --- a/epan/uat.c +++ b/epan/uat.c @@ -54,11 +54,11 @@ void uat_init(void) { uat_t* uat_new(const char* name, size_t size, - char* filename, + const char* filename, void** data_ptr, guint* numitems_ptr, - char* category, - char* help, + const char* category, + const char* help, uat_copy_cb_t copy_cb, uat_update_cb_t update_cb, uat_free_cb_t free_cb, @@ -172,7 +172,7 @@ gchar* uat_get_actual_filename(uat_t* uat, gboolean for_writing) { static void putfld(FILE* fp, void* rec, uat_field_t* f) { guint fld_len; - char* fld_ptr; + const char* fld_ptr; f->cb.tostr(rec,&fld_ptr,&fld_len,f->cbdata.tostr,f->fld_data); @@ -318,7 +318,7 @@ void uat_load_all(void) { } -gboolean uat_fld_chk_str(void* u1 _U_, const char* strptr, unsigned len _U_, void* u2 _U_, void* u3 _U_, char** err) { +gboolean uat_fld_chk_str(void* u1 _U_, const char* strptr, unsigned len _U_, void* u2 _U_, void* u3 _U_, const char** err) { if (strptr == NULL) { *err = "NULL pointer"; return FALSE; @@ -328,7 +328,7 @@ gboolean uat_fld_chk_str(void* u1 _U_, const char* strptr, unsigned len _U_, voi return TRUE; } -gboolean uat_fld_chk_proto(void* u1 _U_, const char* strptr, unsigned len, void* u2 _U_, void* u3 _U_, char** err) { +gboolean uat_fld_chk_proto(void* u1 _U_, const char* strptr, unsigned len, void* u2 _U_, void* u3 _U_, const char** err) { if (len) { char* name = ep_strndup(strptr,len); g_strdown(name); @@ -347,7 +347,7 @@ gboolean uat_fld_chk_proto(void* u1 _U_, const char* strptr, unsigned len, void* } } -gboolean uat_fld_chk_num_dec(void* u1 _U_, const char* strptr, unsigned len, void* u2 _U_, void* u3 _U_, char** err) { +gboolean uat_fld_chk_num_dec(void* u1 _U_, const char* strptr, unsigned len, void* u2 _U_, void* u3 _U_, const char** err) { char* str = ep_strndup(strptr,len); long i = strtol(str,&str,10); @@ -360,7 +360,7 @@ gboolean uat_fld_chk_num_dec(void* u1 _U_, const char* strptr, unsigned len, voi return TRUE; } -gboolean uat_fld_chk_num_hex(void* u1 _U_, const char* strptr, unsigned len, void* u2 _U_, void* u3 _U_, char** err) { +gboolean uat_fld_chk_num_hex(void* u1 _U_, const char* strptr, unsigned len, void* u2 _U_, void* u3 _U_, const char** err) { char* str = ep_strndup(strptr,len); long i = strtol(str,&str,16); @@ -373,7 +373,7 @@ gboolean uat_fld_chk_num_hex(void* u1 _U_, const char* strptr, unsigned len, voi return TRUE; } -gboolean uat_fld_chk_enum(void* u1 _U_, const char* strptr, unsigned len, void* v, void* u3 _U_, char** err) { +gboolean uat_fld_chk_enum(void* u1 _U_, const char* strptr, unsigned len, void* v, void* u3 _U_, const char** err) { char* str = ep_strndup(strptr,len); guint i; value_string* vs = v; @@ -389,7 +389,7 @@ gboolean uat_fld_chk_enum(void* u1 _U_, const char* strptr, unsigned len, void* return FALSE; } -gboolean uat_fld_chk_range(void* u1 _U_, const char* strptr, unsigned len, void* v _U_, void* u3, char** err) { +gboolean uat_fld_chk_range(void* u1 _U_, const char* strptr, unsigned len, void* v _U_, void* u3, const char** err) { char* str = ep_strndup(strptr,len); range_t* r = NULL; convert_ret_t ret = range_convert_str(&r, str,GPOINTER_TO_UINT(u3)); |