Assign to a dummy variable to squelch the warning.

svn path=/trunk/; revision=37616
This commit is contained in:
Anders Broman 2011-06-08 12:05:49 +00:00
parent 30a3988111
commit 1a81c428d9
1 changed files with 2 additions and 1 deletions

View File

@ -926,6 +926,7 @@ pref_check(pref_t *pref, gpointer user_data)
const char *str_val;
char *p;
pref_t **badpref = user_data;
unsigned long val;
/* Fetch the value of the preference, and check whether it's valid. */
switch (pref->type) {
@ -933,7 +934,7 @@ pref_check(pref_t *pref, gpointer user_data)
case PREF_UINT:
str_val = gtk_entry_get_text(GTK_ENTRY(pref->control));
errno = 0;
(void) strtoul(str_val, &p, pref->info.base);
val = strtoul(str_val, &p, pref->info.base);
if (p == str_val || *p != '\0' || errno != 0) {
*badpref = pref;
return PREFS_SET_SYNTAX_ERR; /* number was bad */