Commit add78396 authored by Pavel Cisler's avatar Pavel Cisler Committed by Pavel Cisler
Browse files

Fix all the warnings -Wuninitialized found. Quite a number of them were

2000-09-05  Pavel Cisler  <pavel@eazel.com>

	* components/help/converters/gnome-db2html2/gdb3html.c:
	(xml_parse_document):
	* components/help/hyperbola-nav-index.c: (end_element):
	* components/services/summary/nautilus-view/nautilus-summary-view.c
	: (logout_button_cb):
	* components/services/time/service/trilobite-eazel-time-service.c:
	(trilobite_eazel_time_service_do_http_request):
	* components/tree/nautilus-tree-view.c:
	* configure.in:
	* libnautilus-extensions/bonobo-stream-vfs.c:
	(bonobo_stream_vfs_open):
	* libnautilus-extensions/nautilus-background.c:
	(nautilus_background_draw), (nautilus_background_draw_aa):
	* libnautilus-extensions/nautilus-customization-data.c:
	(nautilus_customization_data_new):
	* libnautilus-extensions/nautilus-directory-background.c:
	(nautilus_directory_background_write_desktop_settings):
	* libnautilus-extensions/nautilus-file-operations.c:
	(nautilus_file_operations_move_to_trash), (do_empty_trash):
	* libnautilus-extensions/nautilus-file.c: (nautilus_file_dump):
	* libnautilus-extensions/nautilus-icon-canvas-item.c:
	(draw_or_measure_label_text), (emblem_layout_next):
	* libnautilus-extensions/nautilus-icon-factory.c:
	(get_image_from_cache):
	* libnautilus-extensions/nautilus-icon-text-item.c:
	(iti_paint_text):
	* libnautilus-extensions/nautilus-list.c: (draw_cell), (draw_row):
	* libnautilus-extensions/nautilus-mime-actions.c:
	(nautilus_mime_add_application_to_short_list_for_uri):
	* libnautilus-extensions/nautilus-program-chooser.c:
	(program_file_pair_get_short_status_text),
	(program_file_pair_get_long_status_text):
	* libnautilus-extensions/nautilus-program-choosing.c:
	(nautilus_choose_component_for_file),
	(nautilus_choose_application_for_file):
	* libnautilus-extensions/nautilus-scalable-font.c:
	(nautilus_scalable_font_draw_text_lines_with_dimensions):
	* libnautilus-extensions/nautilus-theme.c:
	(nautilus_theme_make_selector):
	* librsvg/rsvg-ft.c: (rsvg_ft_get_glyph):
	* librsvg/test-ft-gtk.c: (set_text):
	* librsvg/test-ft.c: (save_pixbuf_to_file_internal),
	(save_pixbuf_to_file):
	* librsvg/test-rsvg.c: (save_pixbuf_to_file_internal),
	(save_pixbuf_to_file):
	* src/file-manager/fm-directory-view.c: (display_pending_files),
	(compute_menu_item_info):
	* src/file-manager/fm-icon-view.c: (compute_menu_item_info):
	* src/file-manager/fm-list-view.c: (get_column_from_attribute):
	* src/nautilus-application.c: (nautilus_application_startup):
	* src/nautilus-search-bar-criterion.c:
	(nautilus_search_bar_criterion_next_new),
	(nautilus_search_bar_criterion_get_location),
	(get_date_modified_location_for):
	* src/nautilus-sidebar-tabs.c: (draw_one_tab_themed),
	(draw_or_layout_all_tabs):
	* src/nautilus-toolbar.c: (nautilus_toolbar_size_allocate):
	* src/nautilus-window-manage-views.c:
	(nautilus_window_get_current_location_title):
	* test/test-nautilus-label.c: (justification_changed_callback):

	Fix all the warnings -Wuninitialized found.
	Quite a number of them were actual bugs.
	Turn on -Wuninitialized in configure.in now that ORBit generates
	warning-free code.
parent 1b18a656
2000-09-05 Pavel Cisler <pavel@eazel.com>
* components/help/converters/gnome-db2html2/gdb3html.c:
(xml_parse_document):
* components/help/hyperbola-nav-index.c: (end_element):
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (logout_button_cb):
* components/services/time/service/trilobite-eazel-time-service.c:
(trilobite_eazel_time_service_do_http_request):
* components/tree/nautilus-tree-view.c:
* configure.in:
* libnautilus-extensions/bonobo-stream-vfs.c:
(bonobo_stream_vfs_open):
* libnautilus-extensions/nautilus-background.c:
(nautilus_background_draw), (nautilus_background_draw_aa):
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_new):
* libnautilus-extensions/nautilus-directory-background.c:
(nautilus_directory_background_write_desktop_settings):
* libnautilus-extensions/nautilus-file-operations.c:
(nautilus_file_operations_move_to_trash), (do_empty_trash):
* libnautilus-extensions/nautilus-file.c: (nautilus_file_dump):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(draw_or_measure_label_text), (emblem_layout_next):
* libnautilus-extensions/nautilus-icon-factory.c:
(get_image_from_cache):
* libnautilus-extensions/nautilus-icon-text-item.c:
(iti_paint_text):
* libnautilus-extensions/nautilus-list.c: (draw_cell), (draw_row):
* libnautilus-extensions/nautilus-mime-actions.c:
(nautilus_mime_add_application_to_short_list_for_uri):
* libnautilus-extensions/nautilus-program-chooser.c:
(program_file_pair_get_short_status_text),
(program_file_pair_get_long_status_text):
* libnautilus-extensions/nautilus-program-choosing.c:
(nautilus_choose_component_for_file),
(nautilus_choose_application_for_file):
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_draw_text_lines_with_dimensions):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_make_selector):
* librsvg/rsvg-ft.c: (rsvg_ft_get_glyph):
* librsvg/test-ft-gtk.c: (set_text):
* librsvg/test-ft.c: (save_pixbuf_to_file_internal),
(save_pixbuf_to_file):
* librsvg/test-rsvg.c: (save_pixbuf_to_file_internal),
(save_pixbuf_to_file):
* src/file-manager/fm-directory-view.c: (display_pending_files),
(compute_menu_item_info):
* src/file-manager/fm-icon-view.c: (compute_menu_item_info):
* src/file-manager/fm-list-view.c: (get_column_from_attribute):
* src/nautilus-application.c: (nautilus_application_startup):
* src/nautilus-search-bar-criterion.c:
(nautilus_search_bar_criterion_next_new),
(nautilus_search_bar_criterion_get_location),
(get_date_modified_location_for):
* src/nautilus-sidebar-tabs.c: (draw_one_tab_themed),
(draw_or_layout_all_tabs):
* src/nautilus-toolbar.c: (nautilus_toolbar_size_allocate):
* src/nautilus-window-manage-views.c:
(nautilus_window_get_current_location_title):
* test/test-nautilus-label.c: (justification_changed_callback):
Fix all the warnings -Wuninitialized found.
Quite a number of them were actual bugs.
Turn on -Wuninitialized in configure.in now that ORBit generates
warning-free code.
2000-09-05 John Sullivan <sullivan@eazel.com> 2000-09-05 John Sullivan <sullivan@eazel.com>
Fixed bug 1247 ("Edit Novice Settings" menu item Fixed bug 1247 ("Edit Novice Settings" menu item
......
...@@ -360,19 +360,24 @@ BonoboStream * ...@@ -360,19 +360,24 @@ BonoboStream *
bonobo_stream_vfs_open (const char *uri, Bonobo_Storage_OpenMode mode) bonobo_stream_vfs_open (const char *uri, Bonobo_Storage_OpenMode mode)
{ {
GnomeVFSHandle *fd = NULL; GnomeVFSHandle *fd = NULL;
GnomeVFSResult res; GnomeVFSResult result;
g_return_val_if_fail (uri != NULL, NULL); g_return_val_if_fail (uri != NULL, NULL);
if (mode == Bonobo_Storage_READ) /* unhandled open modes */
res = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_READ); result = GNOME_VFS_ERROR_NOT_SUPPORTED;
else if (mode == Bonobo_Storage_WRITE)
res = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_WRITE);
if(fd && res == GNOME_VFS_OK) if (mode == Bonobo_Storage_READ) {
result = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_READ);
} else if (mode == Bonobo_Storage_WRITE) {
result = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_WRITE);
}
if (fd != NULL && result == GNOME_VFS_OK) {
return bonobo_stream_create (fd); return bonobo_stream_create (fd);
else }
return NULL;
return NULL;
} }
/** /**
......
...@@ -551,6 +551,8 @@ xml_parse_document (gchar *filename) ...@@ -551,6 +551,8 @@ xml_parse_document (gchar *filename)
xmlParserCtxtPtr ctxt; xmlParserCtxtPtr ctxt;
char *directory; char *directory;
directory = NULL;
ctxt = xmlCreateFileParserCtxt(filename); ctxt = xmlCreateFileParserCtxt(filename);
if (ctxt == NULL) { if (ctxt == NULL) {
return (NULL); return (NULL);
......
...@@ -395,6 +395,7 @@ end_element (SAXParseInfo *spi, ...@@ -395,6 +395,7 @@ end_element (SAXParseInfo *spi,
g_return_if_fail(spi->stinfo[PRIMARY]); g_return_if_fail(spi->stinfo[PRIMARY]);
it = PRIMARY;
if(spi->stinfo[SECONDARY] || spi->stinfo[SEE] || spi->stinfo[SEEALSO]) if(spi->stinfo[SECONDARY] || spi->stinfo[SEE] || spi->stinfo[SEEALSO])
{ {
parent_ii = g_tree_lookup(spi->idx->all_items, spi->stinfo[PRIMARY]); parent_ii = g_tree_lookup(spi->idx->all_items, spi->stinfo[PRIMARY]);
...@@ -442,7 +443,6 @@ end_element (SAXParseInfo *spi, ...@@ -442,7 +443,6 @@ end_element (SAXParseInfo *spi,
} }
else else
{ {
it = PRIMARY;
parent_tree = spi->idx->all_items; parent_tree = spi->idx->all_items;
} }
......
...@@ -558,7 +558,7 @@ logout_button_cb (GtkWidget *button, NautilusSummaryView *view) ...@@ -558,7 +558,7 @@ logout_button_cb (GtkWidget *button, NautilusSummaryView *view)
if (CORBA_OBJECT_NIL != view->details->user_control) { if (CORBA_OBJECT_NIL != view->details->user_control) {
/* Get list of currently active users */ /* Get list of currently active users */
EazelProxy_UserControl_get_active_users ( users = EazelProxy_UserControl_get_active_users (
view->details->user_control, &ev view->details->user_control, &ev
); );
......
...@@ -558,7 +558,7 @@ logout_button_cb (GtkWidget *button, NautilusSummaryView *view) ...@@ -558,7 +558,7 @@ logout_button_cb (GtkWidget *button, NautilusSummaryView *view)
if (CORBA_OBJECT_NIL != view->details->user_control) { if (CORBA_OBJECT_NIL != view->details->user_control) {
/* Get list of currently active users */ /* Get list of currently active users */
EazelProxy_UserControl_get_active_users ( users = EazelProxy_UserControl_get_active_users (
view->details->user_control, &ev view->details->user_control, &ev
); );
......
...@@ -435,18 +435,18 @@ trilobite_eazel_time_service_do_http_request (TrilobiteEazelTimeService *service ...@@ -435,18 +435,18 @@ trilobite_eazel_time_service_do_http_request (TrilobiteEazelTimeService *service
switch (request_status) { switch (request_status) {
case ghttp_error: { case ghttp_error: {
Trilobite_Eazel_Time_CannotGetTime *exn; Trilobite_Eazel_Time_CannotGetTime *exn;
const char *reason; const char *reason;
exn = Trilobite_Eazel_Time_CannotGetTime__alloc (); exn = Trilobite_Eazel_Time_CannotGetTime__alloc ();
reason = ghttp_get_error (request); reason = ghttp_get_error (request);
exn->url = CORBA_string_dup (service->private->time_url); exn->url = CORBA_string_dup (service->private->time_url);
exn->reason = reason==NULL ? CORBA_string_dup ("Bad url"): CORBA_string_dup ( reason ); exn->reason = reason==NULL ? CORBA_string_dup ("Bad url"): CORBA_string_dup ( reason );
CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Trilobite_Eazel_Time_CannotGetTime, exn); CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Trilobite_Eazel_Time_CannotGetTime, exn);
result = 0; result = 0;
} }
break; break;
case ghttp_not_done: case ghttp_not_done:
g_message ("hest"); g_message ("hest");
result = 0; result = 0;
...@@ -454,6 +454,10 @@ trilobite_eazel_time_service_do_http_request (TrilobiteEazelTimeService *service ...@@ -454,6 +454,10 @@ trilobite_eazel_time_service_do_http_request (TrilobiteEazelTimeService *service
case ghttp_done: case ghttp_done:
result = trilobite_eazel_time_service_parse_body (ghttp_get_body (request)); result = trilobite_eazel_time_service_parse_body (ghttp_get_body (request));
break; break;
default:
result = 0;
g_assert_not_reached ();
break;
} }
ghttp_clean (request); ghttp_clean (request);
......
...@@ -1106,6 +1106,7 @@ expand_uri_sequence_and_select_end (NautilusTreeView *view) ...@@ -1106,6 +1106,7 @@ expand_uri_sequence_and_select_end (NautilusTreeView *view)
gboolean at_least_one_found; gboolean at_least_one_found;
at_least_one_found = FALSE; at_least_one_found = FALSE;
uri = NULL;
if (!view->details->root_seen) { if (!view->details->root_seen) {
call_when_root_seen (view, expand_uri_sequence_and_select_end); call_when_root_seen (view, expand_uri_sequence_and_select_end);
...@@ -1578,6 +1579,8 @@ static void nautilus_tree_view_drag_data_received (GtkWidget *widget, ...@@ -1578,6 +1579,8 @@ static void nautilus_tree_view_drag_data_received (GtkWidget *widget,
action_string = "link"; action_string = "link";
break; break;
default: default:
g_assert_not_reached ();
action_string = "error";
break; break;
} }
......
...@@ -466,7 +466,7 @@ AC_MSG_CHECKING(for more warnings, including -Werror) ...@@ -466,7 +466,7 @@ AC_MSG_CHECKING(for more warnings, including -Werror)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS \ CFLAGS="$CFLAGS \
-Wall -Wno-uninitialized \ -Wall -Wuninitialized \
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \ -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith \ -Wnested-externs -Wpointer-arith \
-Wno-sign-compare -Wsign-promo \ -Wno-sign-compare -Wsign-promo \
......
...@@ -360,19 +360,24 @@ BonoboStream * ...@@ -360,19 +360,24 @@ BonoboStream *
bonobo_stream_vfs_open (const char *uri, Bonobo_Storage_OpenMode mode) bonobo_stream_vfs_open (const char *uri, Bonobo_Storage_OpenMode mode)
{ {
GnomeVFSHandle *fd = NULL; GnomeVFSHandle *fd = NULL;
GnomeVFSResult res; GnomeVFSResult result;
g_return_val_if_fail (uri != NULL, NULL); g_return_val_if_fail (uri != NULL, NULL);
if (mode == Bonobo_Storage_READ) /* unhandled open modes */
res = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_READ); result = GNOME_VFS_ERROR_NOT_SUPPORTED;
else if (mode == Bonobo_Storage_WRITE)
res = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_WRITE);
if(fd && res == GNOME_VFS_OK) if (mode == Bonobo_Storage_READ) {
result = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_READ);
} else if (mode == Bonobo_Storage_WRITE) {
result = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_WRITE);
}
if (fd != NULL && result == GNOME_VFS_OK) {
return bonobo_stream_create (fd); return bonobo_stream_create (fd);
else }
return NULL;
return NULL;
} }
/** /**
......
...@@ -348,6 +348,8 @@ nautilus_background_draw (NautilusBackground *background, ...@@ -348,6 +348,8 @@ nautilus_background_draw (NautilusBackground *background,
g_assert_not_reached (); g_assert_not_reached ();
/* fall through */ /* fall through */
case NAUTILUS_BACKGROUND_CENTERED: case NAUTILUS_BACKGROUND_CENTERED:
image_width = gdk_pixbuf_get_width (background->details->image);
image_height = gdk_pixbuf_get_height (background->details->image);
gdk_pixbuf_render_to_drawable (background->details->image, drawable, gc, gdk_pixbuf_render_to_drawable (background->details->image, drawable, gc,
0, 0, 0, 0,
rectangle->x + (rectangle->width - image_width)/2, rectangle->x + (rectangle->width - image_width)/2,
...@@ -531,6 +533,9 @@ nautilus_background_draw_aa (NautilusBackground *background, ...@@ -531,6 +533,9 @@ nautilus_background_draw_aa (NautilusBackground *background,
int accumulator, temp_value; int accumulator, temp_value;
g_return_if_fail (NAUTILUS_IS_BACKGROUND (background)); g_return_if_fail (NAUTILUS_IS_BACKGROUND (background));
remaining_width = 0;
remaining_height = 0;
if (!buffer->is_buf) { if (!buffer->is_buf) {
if (!nautilus_background_image_fully_obscures (background, entire_width, entire_height, TRUE)) { if (!nautilus_background_image_fully_obscures (background, entire_width, entire_height, TRUE)) {
......
...@@ -83,6 +83,7 @@ nautilus_customization_data_new (const char *customization_name, ...@@ -83,6 +83,7 @@ nautilus_customization_data_new (const char *customization_name,
data = g_new0 (NautilusCustomizationData, 1); data = g_new0 (NautilusCustomizationData, 1);
public_result = GNOME_VFS_OK;
if (show_public_customizations) { if (show_public_customizations) {
public_directory_uri = get_global_customization_uri (customization_name); public_directory_uri = get_global_customization_uri (customization_name);
......
...@@ -271,6 +271,10 @@ nautilus_directory_background_write_desktop_settings (char *color, char *image, ...@@ -271,6 +271,10 @@ nautilus_directory_background_write_desktop_settings (char *color, char *image,
break; break;
case NAUTILUS_BACKGROUND_SCALED_ASPECT: case NAUTILUS_BACKGROUND_SCALED_ASPECT:
wallpaper_align = WALLPAPER_SCALED_KEEP; wallpaper_align = WALLPAPER_SCALED_KEEP;
break;
default:
g_assert_not_reached ();
wallpaper_align = WALLPAPER_TILED;
break; break;
} }
gnome_config_set_int ("/Background/Default/wallpaperAlign", wallpaper_align); gnome_config_set_int ("/Background/Default/wallpaperAlign", wallpaper_align);
......
...@@ -916,6 +916,8 @@ nautilus_file_operations_move_to_trash (const GList *item_uris, ...@@ -916,6 +916,8 @@ nautilus_file_operations_move_to_trash (const GList *item_uris,
source_uri_list = NULL; source_uri_list = NULL;
target_uri_list = NULL; target_uri_list = NULL;
result = GNOME_VFS_OK;
/* build the source and uri list, checking if any of the delete itmes are Trash */ /* build the source and uri list, checking if any of the delete itmes are Trash */
for (p = item_uris; p != NULL; p = p->next) { for (p = item_uris; p != NULL; p = p->next) {
bail = FALSE; bail = FALSE;
...@@ -1057,6 +1059,8 @@ do_empty_trash (GtkWidget *parent_view) ...@@ -1057,6 +1059,8 @@ do_empty_trash (GtkWidget *parent_view)
*/ */
trash_dir_uri = NULL; trash_dir_uri = NULL;
trash_dir_list = NULL;
result = gnome_vfs_find_directory (NULL, GNOME_VFS_DIRECTORY_KIND_TRASH, result = gnome_vfs_find_directory (NULL, GNOME_VFS_DIRECTORY_KIND_TRASH,
&trash_dir_uri, FALSE, FALSE, 0777); &trash_dir_uri, FALSE, FALSE, 0777);
......
...@@ -3717,9 +3717,6 @@ nautilus_file_dump (NautilusFile *file) ...@@ -3717,9 +3717,6 @@ nautilus_file_dump (NautilusFile *file)
} else { } else {
g_print("size: %ld \n", size); g_print("size: %ld \n", size);
switch (file->details->info->type) { switch (file->details->info->type) {
case GNOME_VFS_FILE_TYPE_UNKNOWN:
file_kind = "unknown";
break;
case GNOME_VFS_FILE_TYPE_REGULAR: case GNOME_VFS_FILE_TYPE_REGULAR:
file_kind = "regular file"; file_kind = "regular file";
break; break;
...@@ -3741,6 +3738,10 @@ nautilus_file_dump (NautilusFile *file) ...@@ -3741,6 +3738,10 @@ nautilus_file_dump (NautilusFile *file)
case GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK: case GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK:
file_kind = "symbolic link"; file_kind = "symbolic link";
break; break;
case GNOME_VFS_FILE_TYPE_UNKNOWN:
default:
file_kind = "unknown";
break;
} }
g_print("kind: %s \n", file_kind); g_print("kind: %s \n", file_kind);
if (file->details->info->type == GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK) { if (file->details->info->type == GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK) {
......
...@@ -627,6 +627,9 @@ draw_or_measure_label_text (NautilusIconCanvasItem *item, ...@@ -627,6 +627,9 @@ draw_or_measure_label_text (NautilusIconCanvasItem *item,
char *combined_text; char *combined_text;
gboolean have_editable, have_additional, needs_highlight; gboolean have_editable, have_additional, needs_highlight;
gc = NULL;
icon_width = 0;
details = item->details; details = item->details;
needs_highlight = details->is_highlighted_for_selection || details->is_highlighted_for_drop; needs_highlight = details->is_highlighted_for_selection || details->is_highlighted_for_drop;
...@@ -956,6 +959,11 @@ emblem_layout_next (EmblemLayout *layout, ...@@ -956,6 +959,11 @@ emblem_layout_next (EmblemLayout *layout,
x = layout->icon_rect.x0; x = layout->icon_rect.x0;
y = layout->icon_rect.y0; y = layout->icon_rect.y0;
break; break;
default:
g_assert_not_reached ();
x = 0;
y = 0;
break;
} }
if (layout->position != 0) { if (layout->position != 0) {
switch (layout->side) { switch (layout->side) {
......
...@@ -1934,6 +1934,9 @@ get_image_from_cache (NautilusScalableIcon *scalable_icon, ...@@ -1934,6 +1934,9 @@ get_image_from_cache (NautilusScalableIcon *scalable_icon,
g_return_val_if_fail (scalable_icon != NULL, NULL); g_return_val_if_fail (scalable_icon != NULL, NULL);
key = NULL;
image = NULL;
factory = nautilus_get_current_icon_factory (); factory = nautilus_get_current_icon_factory ();
hash_table = factory->icon_cache; hash_table = factory->icon_cache;
...@@ -1959,8 +1962,7 @@ get_image_from_cache (NautilusScalableIcon *scalable_icon, ...@@ -1959,8 +1962,7 @@ get_image_from_cache (NautilusScalableIcon *scalable_icon,
g_assert (image != NULL); g_assert (image != NULL);
} }
if (!found_image) if (!found_image) {
{
gboolean got_scaled_image; gboolean got_scaled_image;
gboolean got_custom_image; gboolean got_custom_image;
IconInfo key_icon_info; IconInfo key_icon_info;
...@@ -2046,6 +2048,7 @@ get_image_from_cache (NautilusScalableIcon *scalable_icon, ...@@ -2046,6 +2048,7 @@ get_image_from_cache (NautilusScalableIcon *scalable_icon,
nautilus_icon_factory_schedule_sweep (); nautilus_icon_factory_schedule_sweep ();
/* Grab a ref for the caller. */ /* Grab a ref for the caller. */
g_assert (image != NULL);
gdk_pixbuf_ref (image); gdk_pixbuf_ref (image);
return image; return image;
} }
......
...@@ -399,6 +399,8 @@ iti_paint_text (Iti *iti, GdkDrawable *drawable, int x, int y) ...@@ -399,6 +399,8 @@ iti_paint_text (Iti *iti, GdkDrawable *drawable, int x, int y)
int cursor, offset, i; int cursor, offset, i;
GnomeCanvasItem *canvas_item; GnomeCanvasItem *canvas_item;
xpos = 0;
offset = 0;
priv = iti->priv; priv = iti->priv;
style = GTK_WIDGET (GNOME_CANVAS_ITEM (iti)->canvas)->style; style = GTK_WIDGET (GNOME_CANVAS_ITEM (iti)->canvas)->style;
...@@ -525,7 +527,7 @@ iti_paint_text (Iti *iti, GdkDrawable *drawable, int x, int y) ...@@ -525,7 +527,7 @@ iti_paint_text (Iti *iti, GdkDrawable *drawable, int x, int y)
/* The i-beam should only be drawn at the end of a line of text if that line is the /* The i-beam should only be drawn at the end of a line of text if that line is the
* only or last line of text in a label. We subtract one from the x position * only or last line of text in a label. We subtract one from the x position
* so the i-beam is not visually jammed against the edge of the bounding rect. */ * so the i-beam is not visually jammed against the edge of the bounding rect. */
if (cursor == i){ if (cursor == i) {
int px = x + xpos + offset; int px = x + xpos + offset;
y -= ti->baseline_skip; y -= ti->baseline_skip;
......
...@@ -1943,7 +1943,7 @@ get_cell_greater_rectangle (GdkRectangle *cell_rect, GdkRectangle *result, ...@@ -1943,7 +1943,7 @@ get_cell_greater_rectangle (GdkRectangle *cell_rect, GdkRectangle *result,
static void static void
draw_cell (GtkCList *clist, GdkRectangle *area, int row_index, int column_index, draw_cell (GtkCList *clist, GdkRectangle *area, int row_index, int column_index,
GtkCListRow *row, GdkRectangle *erase_rect) GtkCListRow *row)
{ {
GtkStyle *style; GtkStyle *style;
GdkGC *fg_gc; GdkGC *fg_gc;
...@@ -2128,7 +2128,6 @@ static void ...@@ -2128,7 +2128,6 @@ static void
draw_row (GtkCList *clist, GdkRectangle *area, int row_index, GtkCListRow *row) draw_row (GtkCList *clist, GdkRectangle *area, int row_index, GtkCListRow *row)
{ {
GtkWidget *widget; GtkWidget *widget;
GdkRectangle *rect;
GdkRectangle row_rectangle; GdkRectangle row_rectangle;
GdkRectangle extended_row_rectangle; GdkRectangle extended_row_rectangle;
GdkRectangle intersect_rectangle; GdkRectangle intersect_rectangle;
...@@ -2180,7 +2179,7 @@ draw_row (GtkCList *clist, GdkRectangle *area, int row_index, GtkCListRow *row) ...@@ -2180,7 +2179,7 @@ draw_row (GtkCList *clist, GdkRectangle *area, int row_index, GtkCListRow *row)
/* iterate and draw all the columns (row cells) and draw their contents */ /* iterate and draw all the columns (row cells) and draw their contents */
for (colum_index = 0; colum_index < clist->columns; colum_index++) { for (colum_index = 0; colum_index < clist->columns; colum_index++) {
draw_cell (clist, area, row_index, colum_index, row, rect); draw_cell (clist, area, row_index, colum_index, row);
} }
/* draw the row spacer */ /* draw the row spacer */
......
...@@ -857,6 +857,8 @@ nautilus_mime_add_application_to_short_list_for_uri (const char *uri, ...@@ -857,6 +857,8 @@ nautilus_mime_add_application_to_short_list_for_uri (const char *uri,
GList *old_list, *new_list; GList *old_list, *new_list;
GnomeVFSResult result; GnomeVFSResult result;