Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 44348: /trunk/ /trunk/epan/: libwire

Date: Wed, 8 Aug 2012 14:17:06 -0400 (EDT)
I can fix all but the void** cast issues fairly quickly.  Do you want me to "undo" the "custom" preferences until there is a better solution?  I don't think it's something we can just throw an #if 0 around.
 
-----Original Message-----
From: Guy Harris <guy@xxxxxxxxxxxx>
To: wireshark-dev <wireshark-dev@xxxxxxxxxxxxx>
Sent: Wed, Aug 8, 2012 1:55 pm
Subject: Re: [Wireshark-dev] [Wireshark-commits] rev 44348: /trunk/ /trunk/epan/: libwireshark.def prefs.c prefs.h /trunk/ui/gtk/: capture_dlg.c main.c prefs_capture.c prefs_dlg.c /trunk/: airpcap_loader.c capture_ui_utils.c tshark.c


On Aug 8, 2012, at 9:54 AM, mmann@xxxxxxxxxxxxx wrote:

> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=44348
> 
> User: mmann
> Date: 2012/08/08 09:54 AM
> 
> Log:
> Have (almost) all preferences use the generic preferences API (per 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7402).  This cleaned up a 
lot of hardcoded code and allows breaking up the prefs structure (or at least 
prevent it from growing too large) if desired.
> 
> Bugfixed problems mentioned in
> http://www.wireshark.org/lists/wireshark-dev/201208/msg00001.html
> 
> Column preferences now support default '#' character
> 
> Directory: /trunk/epan/
>  Changes    Path                Action
>  +0 -2      libwireshark.def    Modified
>  +1181 -1172 prefs.c             Modified
>  +0 -6      prefs.h             Modified
> 
> Directory: /trunk/ui/gtk/
>  Changes    Path               Action
>  +5 -12     capture_dlg.c      Modified
>  +2 -2      main.c             Modified
>  +15 -42    prefs_capture.c    Modified
>  +0 -16     prefs_dlg.c        Modified
> 
> Directory: /trunk/
>  Changes    Path                  Action
>  +1 -1      airpcap_loader.c      Modified
>  +4 -2      capture_ui_utils.c    Modified
>  +1 -1      tshark.c              Modified

Compile errors:

prefs.c: In function 'column_hidden_init_cb':
prefs.c:1226: warning: assignment from incompatible pointer type
prefs.c: In function 'column_num_set_cb':
prefs.c:1331: warning: unused parameter 'pref'
prefs.c:1331: warning: unused parameter 'value'
prefs.c:1331: warning: unused parameter 'changed'
prefs.c: In function 'column_num_write_cb':
prefs.c:1337: warning: unused parameter 'pref'
prefs.c:1337: warning: unused parameter 'arg'
prefs.c: In function 'column_format_set_cb':
prefs.c:1411: warning: unused parameter 'changed'
prefs.c: In function 'capture_column_set_cb':
prefs.c:1603: warning: unused parameter 'changed'
prefs.c: In function 'prefs_register_modules':
prefs.c:1766: warning: passing argument 6 of 'prefs_register_custom_preference' 
from incompatible pointer type
prefs.c:1774: warning: passing argument 6 of 'prefs_register_custom_preference' 
from incompatible pointer type
prefs.c:1786: warning: passing argument 6 of 'prefs_register_custom_preference' 
from incompatible pointer type
prefs.c:1985: warning: passing argument 6 of 'prefs_register_custom_preference' 
from incompatible pointer type
prefs.c:2037: warning: passing argument 6 of 'prefs_register_custom_preference' 
from incompatible pointer type
prefs.c: In function 'write_module_prefs':
prefs.c:4060: warning: passing argument 2 of 'prefs_modules_foreach_submodules' 
from incompatible pointer type
prefs.c: In function 'write_prefs':
prefs.c:4134: warning: passing argument 2 of 'prefs_modules_foreach_submodules' 
from incompatible pointer type
prefs.c:4076: warning: unused variable 'cols_hidden'

Part of the problem is that, while a "foo *" can be converted to or from a "void 
*" without warnings, a "foo **" cannot be converted to or from a "void **" 
without warnings.  Fixing that without just throwing casts at the problem might 
require some rethinking of the way "custom" preferences are handled.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe