Prevent type-punned pointer warnings with gcc 4.1.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3473 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2009-01-16 20:34:34 +00:00
parent ebd3776cde
commit b98069855b
3 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2009-01-16 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/project.c, src/keyfile.c:
Prevent type-punned pointer warnings with gcc 4.1.
2009-01-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/main.c, doc/geany.txt, doc/geany.html, doc/geany.1.in:

View File

@ -138,9 +138,9 @@ static void init_pref_groups(void)
"pref_editor_tab_width", 4, "spin_indent_width");
stash_group_add_spin_button_integer(group, &editor_prefs.indentation->hard_tab_width,
"indent_hard_tab_width", 8, "spin_tab_width");
stash_group_add_combo_box(group, (gint*)&editor_prefs.indentation->auto_indent_mode,
stash_group_add_combo_box(group, (gint*)(void*)&editor_prefs.indentation->auto_indent_mode,
"indent_mode", GEANY_AUTOINDENT_CURRENTCHARS, "combo_auto_indent_mode");
stash_group_add_radio_buttons(group, (gint*)&editor_prefs.indentation->type,
stash_group_add_radio_buttons(group, (gint*)(void*)&editor_prefs.indentation->type,
"indent_type", GEANY_INDENT_TYPE_TABS,
"radio_indent_spaces", GEANY_INDENT_TYPE_SPACES,
"radio_indent_tabs", GEANY_INDENT_TYPE_TABS,

View File

@ -1110,7 +1110,7 @@ void project_init(void)
stash_group_add_spin_button_integer(group, &indentation.width,
"indent_width", 4, "spin_indent_width");
stash_group_add_radio_buttons(group, (gint*)&indentation.type,
stash_group_add_radio_buttons(group, (gint*)(gpointer)&indentation.type,
"indent_type", GEANY_INDENT_TYPE_TABS,
"radio_indent_spaces", GEANY_INDENT_TYPE_SPACES,
"radio_indent_tabs", GEANY_INDENT_TYPE_TABS,
@ -1120,7 +1120,7 @@ void project_init(void)
"indent_hard_tab_width", 8, "spin_tab_width");
stash_group_add_toggle_button(group, &indentation.detect_type,
"detect_indent", FALSE, "check_detect_indent");
stash_group_add_combo_box(group, (gint*)&indentation.auto_indent_mode,
stash_group_add_combo_box(group, (gint*)(gpointer)&indentation.auto_indent_mode,
"indent_mode", GEANY_AUTOINDENT_CURRENTCHARS, "combo_auto_indent_mode");
}