当我在 and64 平台上编译时:我似乎无法弄清楚。这是它遇到问题的行之一:
static gboolean scan_freq(gpointer data)
{
static gint start, mom, max;
gint dir = (gint)(data); /// <- cast to pointer from integer of different size
if (!max) {
max = (FREQ_MAX - FREQ_MIN) * STEPS;
}
if (radio_check_station(gtk_adjustment_get_value(adj)/STEPS) || (start > max)) {
start = mom = 0;
radio_unmute();
timeout_id = 0;
return FALSE;
}
if (!mom) {
mom = gtk_adjustment_get_value(adj);
}
if (mom > FREQ_MAX*STEPS)
mom = FREQ_MIN*STEPS;
else if (mom < FREQ_MIN*STEPS)
mom = FREQ_MAX*STEPS;
else
mom = mom + dir;
start += 1;
gtk_adjustment_set_value(adj, mom);
return TRUE;
}
和:
extern int mom_ps;
void preset_menuitem_activate_cb(GtkMenuItem *menuitem, gpointer user_data)
{
preset* ps;
mom_ps = (int)user_data; /// <- cast to pointer from integer of different size
g_assert(mom_ps >= 0 && mom_ps < g_list_length(settings.presets));
ps = (preset*)g_list_nth_data(settings.presets, mom_ps);
gtk_adjustment_set_value(adj, ps->freq * STEPS);
}
得到:cast to pointer from integer of different size
警告