aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2006-12-08 04:09:44 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2006-12-08 04:09:44 +0000
commit1f6543718861800de33d10fb020cf2e44b91b872 (patch)
treed89a0d69a27f218ae47fb310d10d1e69cd217786 /epan/prefs.c
parent9fd761eeaf3d8eecdd5d2bf61e663dfe71e4a028 (diff)
Handle the "no error" return from pref_set_pair_fct(), to squelch
compiler warnings. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20070 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/prefs.c')
-rw-r--r--epan/prefs.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/epan/prefs.c b/epan/prefs.c
index aec9a76ad2..f9ae7dcadd 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -1232,20 +1232,23 @@ read_prefs_file(const char *pf_path, FILE *pf, pref_set_pair_cb pref_set_pair_fc
if (got_val) {
switch (pref_set_pair_fct(cur_var->str, cur_val->str, private_data)) {
- case PREFS_SET_SYNTAX_ERR:
+ case PREFS_SET_OK:
+ break;
+
+ case PREFS_SET_SYNTAX_ERR:
g_warning ("%s line %d: Syntax error %s", pf_path, pline, hint);
break;
- case PREFS_SET_NO_SUCH_PREF:
+ case PREFS_SET_NO_SUCH_PREF:
g_warning ("%s line %d: No such preference \"%s\" %s", pf_path,
- pline, cur_var->str, hint);
+ pline, cur_var->str, hint);
break;
- case PREFS_SET_OBSOLETE:
- /* We silently ignore attempts to set these; it's
- probably not the user's fault that it's in there -
- they may have saved preferences with a release that
- supported them. */
+ case PREFS_SET_OBSOLETE:
+ /* We silently ignore attempts to set these; it's
+ probably not the user's fault that it's in there -
+ they may have saved preferences with a release that
+ supported them. */
break;
}
} else {
@@ -1295,19 +1298,22 @@ read_prefs_file(const char *pf_path, FILE *pf, pref_set_pair_cb pref_set_pair_fc
if (got_val) {
switch (pref_set_pair_fct(cur_var->str, cur_val->str, private_data)) {
+ case PREFS_SET_OK:
+ break;
+
case PREFS_SET_SYNTAX_ERR:
g_warning ("%s line %d: Syntax error %s", pf_path, pline, hint);
break;
case PREFS_SET_NO_SUCH_PREF:
g_warning ("%s line %d: No such preference \"%s\" %s", pf_path,
- pline, cur_var->str, hint);
+ pline, cur_var->str, hint);
break;
case PREFS_SET_OBSOLETE:
- /* We silently ignore attempts to set these; it's probably not
- the user's fault that it's in there - they may have saved
- preferences with a release that supported it. */
+ /* We silently ignore attempts to set these; it's probably not
+ the user's fault that it's in there - they may have saved
+ preferences with a release that supported it. */
break;
}
} else {