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

reviewed by: Darin Adler <darin@eazel.com>

2000-11-13  Pavel Cisler  <pavel@eazel.com>

	reviewed by: Darin Adler <darin@eazel.com>

	* configure.in:
	Enable the sign-compare and cast-align warnings.

	* components/help/converters/gnome-db2html2/gdb3html.c:
	(find_first_element):
	* components/help/hyperbola-filefmt.c: (fmt_free_tree_info):
	* components/help/hyperbola-nav-index.c:
	(hyperbola_navigation_index_update_clist), (despace),
	(end_element):
	* components/history/nautilus-history-view.c:
	(history_load_location):
	* components/mozilla/nautilus-mozilla-content-view.c:
	(string_list_get_index_of_string):
	* components/services/install/lib/eazel-install-corba-types.c:
	(corba_string_sequence_to_glist),
	(corba_packagedatastructlist_from_packagedata_list),
	(packagedata_list_from_corba_packagedatastructlist),
	(categorydata_list_from_corba_categorystructlist):
	* components/services/install/lib/eazel-install-query.c:
	(eazel_install_simple_rpm_query):
	* components/services/install/lib/eazel-install-rpm-glue.c:
	(eazel_install_monitor_rpm_process_pipe):
	* components/services/install/lib/eazel-install-rpm-signature.c:
	(read_rpm_lead), (read_rpm_signature):
	* components/services/trilobite/libtrilobite/trilobite-root-helper.
	c: (trilobite_root_helper_run_program),
	(trilobite_root_helper_set_time):
	* cut-n-paste-code/widgets/nautilusclist/nautilusclist.c:
	(nautilus_clist_get_arg), (nautilus_clist_construct):
	* helper-utilities/authenticate/nautilus-authenticate.c: (main):
	* libnautilus-extensions/nautilus-background.c:
	(set_image_and_color_image_loading_done_callback):
	* libnautilus-extensions/nautilus-buffered-widget.c:
	(nautilus_gdk_pixbuf_tile_alpha):
	* libnautilus-extensions/nautilus-caption-table.c:
	(entry_activate):
	* libnautilus-extensions/nautilus-caption-table.h:
	* libnautilus-extensions/nautilus-ctree.c:
	(nautilus_ctree_node_nth), (nautilus_ctree_drag_motion):
	* libnautilus-extensions/nautilus-ctree.h:
	* libnautilus-extensions/nautilus-directory-async.c:
	(metafile_write):
	* libnautilus-extensions/nautilus-file-changes-queue.c:
	(nautilus_file_changes_consume_changes):
	* libnautilus-extensions/nautilus-file-operations-progress.c:
	(truncate_string_from_start):
	* libnautilus-extensions/nautilus-file-operations.c:
	(extract_string_until):
	* libnautilus-extensions/nautilus-file-utilities.c:
	(nautilus_read_entire_file):
	* libnautilus-extensions/nautilus-gdk-extensions.c:
	(nautilus_get_largest_fitting_font):
	* libnautilus-extensions/nautilus-global-preferences.c:
	(global_preferences_get_sidebar_panel_view_identifiers):
	* libnautilus-extensions/nautilus-gtk-extensions.c:
	(nautilus_gtk_window_set_initial_geometry_from_string),
	(nautilus_gtk_menu_set_item_visibility):
	* libnautilus-extensions/nautilus-icon-canvas-item.c:
	(draw_or_measure_label_text), (draw_or_measure_label_text_aa):
	* libnautilus-extensions/nautilus-icon-container.c:
	(rubberband_timeout_callback), (destroy), (compute_stretch):
	* libnautilus-extensions/nautilus-icon-container.h:
	(nautilus_icon_container_find_drop_target):
	* libnautilus-extensions/nautilus-icon-factory.c:
	(check_recently_used_list), (get_themed_icon_file_path),
	(revise_scale_factors_if_too_big):
	* libnautilus-extensions/nautilus-icon-text-item.c:
	(recompute_bounding_box), (iti_draw), (iti_selection_motion):
	* libnautilus-extensions/nautilus-label.c:
	(nautilus_label_size_allocate), (label_recompute_line_geometries):
	* libnautilus-extensions/nautilus-list.c: (draw_cell),
	(nautilus_list_drag_data_received):
	* libnautilus-extensions/nautilus-mime-actions.c:
	(server_matches_content_requirements),
	(nautilus_do_component_query):
	* libnautilus-extensions/nautilus-password-dialog.c:
	(caption_table_activate_callback):
	* libnautilus-extensions/nautilus-preferences-item.c:
	(has_image_file):
	* libnautilus-extensions/nautilus-scalable-font.c:
	(file_as_string), (parse_font_description_file),
	(nautilus_text_layout_new):
	* libnautilus-extensions/nautilus-scalable-font.h:
	* libnautilus-extensions/nautilus-volume-monitor.c:
	(check_permissions):
	* libnautilus/nautilus-view.c:
	(nautilus_shallow_g_list_from_uri_list):
	* libnautilus/nautilus-zoomable.c:
	(nautilus_g_list_from_ZoomLevelList):
	* librsvg/rsvg-ft.c: (rsvg_ft_measure_or_render_string):
	* librsvg/rsvg.c: (rsvg_parse_transform):
	* src/file-manager/fm-icon-view.c:
	(fm_icon_view_create_background_context_menu_items),
	(get_sort_criterion_by_metadata_text), (get_sort_criterion_by_id):
	* src/file-manager/fm-list-view.c: (select_row_common),
	(select_matching_name_callback), (select_previous_next_common),
	(fm_list_view_bump_zoom_level):
	* src/nautilus-search-bar-criterion.c:
	(nautilus_search_bar_criterion_update_valid_criteria_choices):
	* src/nautilus-shell.c: (corba_open_windows),
	(corba_open_default_window):
	* src/nautilus-sidebar.c: (nautilus_sidebar_add_panel_items):
	* src/nautilus-window-menus.c:
	(nautilus_window_disable_keyboard_navigation_for_menus):
	* src/nautilus-window.c: (nautilus_window_size_request):
	Fix all sign-compare violations.
parent af7bef76
2000-11-13 Pavel Cisler <pavel@eazel.com>
reviewed by: Darin Adler <darin@eazel.com>
* configure.in:
Enable the sign-compare and cast-align warnings.
* components/help/converters/gnome-db2html2/gdb3html.c:
(find_first_element):
* components/help/hyperbola-filefmt.c: (fmt_free_tree_info):
* components/help/hyperbola-nav-index.c:
(hyperbola_navigation_index_update_clist), (despace),
(end_element):
* components/history/nautilus-history-view.c:
(history_load_location):
* components/mozilla/nautilus-mozilla-content-view.c:
(string_list_get_index_of_string):
* components/services/install/lib/eazel-install-corba-types.c:
(corba_string_sequence_to_glist),
(corba_packagedatastructlist_from_packagedata_list),
(packagedata_list_from_corba_packagedatastructlist),
(categorydata_list_from_corba_categorystructlist):
* components/services/install/lib/eazel-install-query.c:
(eazel_install_simple_rpm_query):
* components/services/install/lib/eazel-install-rpm-glue.c:
(eazel_install_monitor_rpm_process_pipe):
* components/services/install/lib/eazel-install-rpm-signature.c:
(read_rpm_lead), (read_rpm_signature):
* components/services/trilobite/libtrilobite/trilobite-root-helper.
c: (trilobite_root_helper_run_program),
(trilobite_root_helper_set_time):
* cut-n-paste-code/widgets/nautilusclist/nautilusclist.c:
(nautilus_clist_get_arg), (nautilus_clist_construct):
* helper-utilities/authenticate/nautilus-authenticate.c: (main):
* libnautilus-extensions/nautilus-background.c:
(set_image_and_color_image_loading_done_callback):
* libnautilus-extensions/nautilus-buffered-widget.c:
(nautilus_gdk_pixbuf_tile_alpha):
* libnautilus-extensions/nautilus-caption-table.c:
(entry_activate):
* libnautilus-extensions/nautilus-caption-table.h:
* libnautilus-extensions/nautilus-ctree.c:
(nautilus_ctree_node_nth), (nautilus_ctree_drag_motion):
* libnautilus-extensions/nautilus-ctree.h:
* libnautilus-extensions/nautilus-directory-async.c:
(metafile_write):
* libnautilus-extensions/nautilus-file-changes-queue.c:
(nautilus_file_changes_consume_changes):
* libnautilus-extensions/nautilus-file-operations-progress.c:
(truncate_string_from_start):
* libnautilus-extensions/nautilus-file-operations.c:
(extract_string_until):
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_read_entire_file):
* libnautilus-extensions/nautilus-gdk-extensions.c:
(nautilus_get_largest_fitting_font):
* libnautilus-extensions/nautilus-global-preferences.c:
(global_preferences_get_sidebar_panel_view_identifiers):
* libnautilus-extensions/nautilus-gtk-extensions.c:
(nautilus_gtk_window_set_initial_geometry_from_string),
(nautilus_gtk_menu_set_item_visibility):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(draw_or_measure_label_text), (draw_or_measure_label_text_aa):
* libnautilus-extensions/nautilus-icon-container.c:
(rubberband_timeout_callback), (destroy), (compute_stretch):
* libnautilus-extensions/nautilus-icon-container.h:
(nautilus_icon_container_find_drop_target):
* libnautilus-extensions/nautilus-icon-factory.c:
(check_recently_used_list), (get_themed_icon_file_path),
(revise_scale_factors_if_too_big):
* libnautilus-extensions/nautilus-icon-text-item.c:
(recompute_bounding_box), (iti_draw), (iti_selection_motion):
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_size_allocate), (label_recompute_line_geometries):
* libnautilus-extensions/nautilus-list.c: (draw_cell),
(nautilus_list_drag_data_received):
* libnautilus-extensions/nautilus-mime-actions.c:
(server_matches_content_requirements),
(nautilus_do_component_query):
* libnautilus-extensions/nautilus-password-dialog.c:
(caption_table_activate_callback):
* libnautilus-extensions/nautilus-preferences-item.c:
(has_image_file):
* libnautilus-extensions/nautilus-scalable-font.c:
(file_as_string), (parse_font_description_file),
(nautilus_text_layout_new):
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-volume-monitor.c:
(check_permissions):
* libnautilus/nautilus-view.c:
(nautilus_shallow_g_list_from_uri_list):
* libnautilus/nautilus-zoomable.c:
(nautilus_g_list_from_ZoomLevelList):
* librsvg/rsvg-ft.c: (rsvg_ft_measure_or_render_string):
* librsvg/rsvg.c: (rsvg_parse_transform):
* src/file-manager/fm-icon-view.c:
(fm_icon_view_create_background_context_menu_items),
(get_sort_criterion_by_metadata_text), (get_sort_criterion_by_id):
* src/file-manager/fm-list-view.c: (select_row_common),
(select_matching_name_callback), (select_previous_next_common),
(fm_list_view_bump_zoom_level):
* src/nautilus-search-bar-criterion.c:
(nautilus_search_bar_criterion_update_valid_criteria_choices):
* src/nautilus-shell.c: (corba_open_windows),
(corba_open_default_window):
* src/nautilus-sidebar.c: (nautilus_sidebar_add_panel_items):
* src/nautilus-window-menus.c:
(nautilus_window_disable_keyboard_navigation_for_menus):
* src/nautilus-window.c: (nautilus_window_size_request):
Fix all sign-compare violations.
2000-11-13 Mathieu Lacage <mathieu@eazel.com>
Buddy: pavel.
......
......@@ -160,8 +160,8 @@ find_first_element (Context *context, GSList *args)
for (ptr = context->stack; ptr; ptr = ptr->next) {
for (element_ptr = args; element_ptr; element_ptr = element_ptr->next) {
if (((StackElement*) ptr->data)->info &&
((StackElement*) ptr->data)->info->index == GPOINTER_TO_INT (element_ptr->data))
if (((StackElement *) ptr->data)->info &&
((StackElement *) ptr->data)->info->index == GPOINTER_TO_UINT (element_ptr->data))
return (StackElement *) ptr->data;
}
}
......
......@@ -229,7 +229,7 @@ static void
fmt_free_tree_info(HyperbolaDocTree *tree)
{
TreeInfo *tinfo;
int i;
guint i;
tinfo = tree->user_data;
if(!tinfo)
......
......@@ -194,7 +194,7 @@ hyperbola_navigation_index_update_clist(HyperbolaNavigationIndex *hni)
g_print("Word %d is %s\n", cci.nwords, ctmp);
cci.nwords++;
}
while((ctmp = strtok(NULL, ", \t")) && cci.nwords < sizeof(cci.words)/sizeof(cci.words[0]));
while((ctmp = strtok(NULL, ", \t")) && (size_t)cci.nwords < sizeof(cci.words)/sizeof(cci.words[0]));
}
cci.did_select = FALSE;
......@@ -347,7 +347,7 @@ despace(GString *s)
char *ctmp, *ctmp_s = NULL;
int i;
g_assert(s->len == strlen(s->str));
g_assert(s->len == (int) strlen(s->str));
for(ctmp = s->str, i = s->len; *ctmp; ctmp++, i--)
{
if(isspace(*ctmp))
......@@ -364,7 +364,7 @@ despace(GString *s)
memmove(ctmp_s + 1, ctmp, i + 1);
ctmp = ctmp_s + 2;
i--;
if(i != strlen(ctmp))
if(i != (int) strlen(ctmp))
g_error("i (%d) != strlen(ctmp) (%ld)", i, (long)strlen(ctmp));
}
ctmp_s = NULL;
......@@ -535,7 +535,7 @@ end_element (SAXParseInfo *spi,
else
this_type = NONE;
g_return_if_fail(this_type != NONE && !spi->stinfo[this_type] && this_type == spi->sub_type);
g_return_if_fail(this_type != NONE && !spi->stinfo[this_type] && this_type == (int) spi->sub_type);
if(spi->sub_text->len)
{
......
......@@ -142,7 +142,7 @@ history_load_location (NautilusView *view,
NautilusBookmark *bookmark;
Nautilus_HistoryList *history_list;
Nautilus_HistoryItem *item;
int i;
guint i;
static int lock = 0;
if (lock != 0) {
......
......@@ -1079,7 +1079,7 @@ mozilla_dom_mouse_click_callback (GtkMozEmbed *mozilla,
static gint
string_list_get_index_of_string (const char *string_list[], guint num_strings, const char *string)
{
gint i;
guint i;
g_return_val_if_fail (string != NULL, STRING_LIST_NOT_FOUND);
g_return_val_if_fail (string_list != NULL, STRING_LIST_NOT_FOUND);
......
......@@ -27,7 +27,7 @@
static GList*
corba_string_sequence_to_glist (CORBA_sequence_CORBA_string provides) {
GList *result = NULL;
int iterator;
guint iterator;
for (iterator = 0; iterator < provides._length; iterator++) {
result = g_list_prepend (result, g_strdup (provides._buffer[iterator]));
......@@ -55,7 +55,7 @@ Trilobite_Eazel_PackageDataStructList
corba_packagedatastructlist_from_packagedata_list (GList *packages)
{
Trilobite_Eazel_PackageDataStructList packagelist;
int i;
guint i;
packagelist._length = g_list_length (packages);
packagelist._buffer = CORBA_sequence_Trilobite_Eazel_PackageDataStruct_allocbuf (packagelist._length);
......@@ -168,7 +168,7 @@ GList*
packagedata_list_from_corba_packagedatastructlist (const Trilobite_Eazel_PackageDataStructList corbapack)
{
GList *result;
int i;
guint i;
result = NULL;
......@@ -287,7 +287,7 @@ GList*
categorydata_list_from_corba_categorystructlist (const Trilobite_Eazel_CategoryStructList corbacategories)
{
GList *categories;
int i,j;
guint i,j;
categories = NULL;
......
......@@ -81,7 +81,7 @@ eazel_install_simple_rpm_query (EazelInstall *service,
dbiIndexSet matches;
rpmdb db;
int rc;
int i;
guint i;
gboolean free_db_system = FALSE;
/* g_message (_("Querying for %s in package database in %s"), input, root); */
......
......@@ -130,7 +130,7 @@ eazel_install_monitor_rpm_process_pipe (GIOChannel *source,
EazelInstall *service)
{
char tmp;
static int package_name_length = 256;
static guint package_name_length = 256;
static char package_name [256];
ssize_t bytes_read;
static PackageData *pack = NULL;
......
......@@ -70,7 +70,7 @@ static int
read_rpm_lead (int fd)
{
unsigned char buffer[96];
int bytes = 0;
guint bytes = 0;
int n;
while (bytes < sizeof (buffer)) {
......@@ -114,7 +114,7 @@ read_rpm_signature (int fd, char **signature, int *signature_len)
*signature = NULL;
for (bytes = 0; bytes < sizeof (header); ) {
for (bytes = 0; bytes < (int) sizeof (header); ) {
n = read (fd, &header + bytes, sizeof (header) - bytes);
if (n <= 0) {
return -1;
......@@ -126,7 +126,7 @@ read_rpm_signature (int fd, char **signature, int *signature_len)
header.data_size = ntohl (header.data_size);
entry = g_new0 (RPMEntry, header.entries);
for (bytes = 0; bytes < (header.entries * sizeof (RPMEntry)); ) {
for (bytes = 0; bytes < (int) (header.entries * sizeof (RPMEntry)); ) {
n = read (fd, entry + bytes, (header.entries * sizeof (RPMEntry)) - bytes);
if (n <= 0) {
goto bail;
......@@ -153,7 +153,7 @@ read_rpm_signature (int fd, char **signature, int *signature_len)
}
for (bytes = 0; bytes < offset; ) {
n = read (fd, buffer, MIN (offset - bytes, sizeof (buffer)));
n = read (fd, buffer, MIN (offset - bytes, (int) sizeof (buffer)));
if (n <= 0) {
goto bail;
}
......@@ -176,7 +176,7 @@ read_rpm_signature (int fd, char **signature, int *signature_len)
}
offset = header.data_size - (*signature_len + offset);
for (bytes = 0; bytes < offset; ) {
n = read (fd, buffer, MIN (offset - bytes, sizeof (buffer)));
n = read (fd, buffer, MIN (offset - bytes, (int) sizeof (buffer)));
if (n <= 0) {
goto bail;
}
......
......@@ -488,7 +488,8 @@ trilobite_root_helper_run_program (TrilobiteRootHelper *root_helper, const char
}
out = g_strdup_printf ("%s %u\n", program, g_list_length (argv));
if (write (root_helper->pipe_stdin, out, strlen (out)) < strlen (out)) {
len = strlen (out);
if (write (root_helper->pipe_stdin, out, len) < len) {
g_free (out);
goto bail;
}
......@@ -528,7 +529,8 @@ trilobite_root_helper_set_time (TrilobiteRootHelper *root_helper, GList *argv, i
GList *item;
char *out;
char ch;
int len;
if (fd) {
*fd = -1;
}
......@@ -540,7 +542,8 @@ trilobite_root_helper_set_time (TrilobiteRootHelper *root_helper, GList *argv, i
}
out = g_strdup_printf ("set-time %s\n", (char *)item->data);
if (write (root_helper->pipe_stdin, out, strlen (out)) < strlen (out)) {
len = strlen (out);
if (write (root_helper->pipe_stdin, out, len) < len) {
g_free (out);
goto bail;
}
......
......@@ -687,6 +687,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
-Wall \
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith \
-Wcast-align -Wsign-compare \
-Werror \
$CFLAGS"
......
......@@ -881,7 +881,7 @@ nautilus_clist_get_arg (GtkObject *object,
switch (arg_id)
{
guint i;
int i;
case ARG_N_COLUMNS:
GTK_VALUE_UINT (*arg) = clist->columns;
......@@ -1038,7 +1038,7 @@ nautilus_clist_construct (NautilusCList *clist,
if (titles)
{
guint i;
int i;
NAUTILUS_CLIST_SET_FLAG (clist, CLIST_SHOW_TITLES);
for (i = 0; i < columns; i++)
......@@ -5513,7 +5513,7 @@ nautilus_clist_forall (GtkContainer *container,
gpointer callback_data)
{
NautilusCList *clist;
guint i;
int i;
g_return_if_fail (container != NULL);
g_return_if_fail (NAUTILUS_IS_CLIST (container));
......@@ -7599,7 +7599,7 @@ nautilus_clist_drag_leave (GtkWidget *widget,
list = context->targets;
while (list)
{
if (atom == GPOINTER_TO_INT (list->data))
if (atom == GPOINTER_TO_UINT (list->data))
{
NAUTILUS_CLIST_CLASS_FW (clist)->draw_drag_highlight
(clist,
......@@ -7654,7 +7654,7 @@ nautilus_clist_drag_motion (GtkWidget *widget,
list = context->targets;
while (list)
{
if (atom == GPOINTER_TO_INT (list->data))
if (atom == GPOINTER_TO_UINT (list->data))
break;
list = list->next;
}
......@@ -7728,7 +7728,7 @@ nautilus_clist_drag_drop (GtkWidget *widget,
list = context->targets;
while (list)
{
if (atom == GPOINTER_TO_INT (list->data))
if (atom == GPOINTER_TO_UINT (list->data))
return TRUE;
list = list->next;
}
......
......@@ -51,13 +51,11 @@ int main (int argc, char *argv[])
gnome_init ("PrivilegedAuthentication", "1.0", argc, argv);
if (argc > 1)
{
if (argc > 1) {
GString *str = g_string_new ("");
guint i;
int i;
for(i = 1; i < argc; i++)
{
for(i = 1; i < argc; i++) {
if (i > 1)
g_string_append(str, " ");
......@@ -87,8 +85,7 @@ int main (int argc, char *argv[])
username = nautilus_password_dialog_get_username (NAUTILUS_PASSWORD_DIALOG (password_dialog));
password = nautilus_password_dialog_get_password (NAUTILUS_PASSWORD_DIALOG (password_dialog));
if (nautilus_authenticate_authenticate (username, password))
{
if (nautilus_authenticate_authenticate (username, password)) {
/* Free the password right away to blow it away from memory. */
if (password) {
g_free(password);
......@@ -112,15 +109,8 @@ int main (int argc, char *argv[])
username);
}
if (username) {
g_free(username);
username = NULL;
}
if (password) {
g_free(password);
password = NULL;
}
g_free(username);
g_free(password);
}
return rv;
......
......@@ -1061,8 +1061,8 @@ nautilus_background_set_image_uri (NautilusBackground *background, const char *i
static void
set_image_and_color_image_loading_done_callback (NautilusBackground *background, gboolean successful_load, const char *color)
{
gtk_signal_disconnect_by_func (GTK_OBJECT (background), GTK_SIGNAL_FUNC (set_image_and_color_image_loading_done_callback), (gpointer) color);
nautilus_background_set_color (background, color);
gtk_signal_disconnect_by_func (GTK_OBJECT (background), GTK_SIGNAL_FUNC (set_image_and_color_image_loading_done_callback), (gpointer) color);
nautilus_background_set_color (background, color);
}
/* Use this fn to set both the image and color and avoid flash. The color isn't
......
......@@ -322,8 +322,8 @@ nautilus_gdk_pixbuf_tile_alpha (GdkPixbuf *pixbuf,
GdkInterpType interpolation_mode,
guchar overall_alpha)
{
gint x;
gint y;
guint x;
guint y;
guchar *pixels;
guchar *tile_pixels;
guint num_ver_iterations;
......@@ -335,8 +335,8 @@ nautilus_gdk_pixbuf_tile_alpha (GdkPixbuf *pixbuf,
g_return_if_fail (pixbuf != NULL);
g_return_if_fail (tile_pixbuf != NULL);
g_return_if_fail (tile_width <= gdk_pixbuf_get_width (tile_pixbuf));
g_return_if_fail (tile_height <= gdk_pixbuf_get_height (tile_pixbuf));
g_return_if_fail ((int) tile_width <= gdk_pixbuf_get_width (tile_pixbuf));
g_return_if_fail ((int) tile_height <= gdk_pixbuf_get_height (tile_pixbuf));
g_return_if_fail (gdk_pixbuf_get_pixels (pixbuf) != NULL);
g_return_if_fail (gdk_pixbuf_get_pixels (tile_pixbuf) != NULL);
......@@ -350,18 +350,16 @@ nautilus_gdk_pixbuf_tile_alpha (GdkPixbuf *pixbuf,
y = 0;
for (j = 0; j < num_ver_iterations; j++)
{
for (j = 0; j < num_ver_iterations; j++) {
x = 0;
for (i = 0; i < num_hor_iterations; i++)
{
guint copy_width;
guint copy_height;
gint dst_x;
gint dst_y;
gint dst_x2;
gint dst_y2;
for (i = 0; i < num_hor_iterations; i++) {
gint copy_width;
gint copy_height;
guint dst_x;
guint dst_y;
guint dst_x2;
guint dst_y2;
dst_x = x;
dst_y = y;
......@@ -372,18 +370,15 @@ nautilus_gdk_pixbuf_tile_alpha (GdkPixbuf *pixbuf,
dst_x2 = dst_x + copy_width;
dst_y2 = dst_y + copy_height;
if (dst_x2 > width)
{
if (dst_x2 > width) {
copy_width -= (dst_x2 - width);
}
if (dst_y2 > height)
{
if (dst_y2 > height) {
copy_height -= (dst_y2 - height);
}
if (copy_width > 0 && copy_height > 0)
{
if (copy_width > 0 && copy_height > 0) {
GdkRectangle destination_area;
destination_area.x = dst_x;
......
......@@ -281,19 +281,20 @@ entry_activate (GtkWidget *widget, gpointer data)
index = caption_table_index_of_entry (caption_table, widget);
/* Check for an invalid index */
if (index == -1)
if (index == -1) {
return;
}
/* Check for the last index */
if (index < caption_table->detail->num_rows)
{
if (index < (int) caption_table->detail->num_rows) {
/* Look for the next sensitive entry */
GtkWidget* sensitive_entry =
GtkWidget *sensitive_entry =
caption_table_find_next_sensitive_entry (caption_table, index + 1);
/* Make the next sensitive entry take focus */
if (sensitive_entry)
if (sensitive_entry) {
gtk_widget_grab_focus (sensitive_entry);
}
}
/* Emit the activate signal */
......
......@@ -57,7 +57,7 @@ struct _NautilusCaptionTableClass
{
GtkTableClass parent_class;
void (*activate) (GtkWidget *caption_table, int active_entry);
void (*activate) (GtkWidget *caption_table, guint active_entry);
};
GtkType nautilus_caption_table_get_type (void);
......
......@@ -4135,7 +4135,7 @@ nautilus_ctree_find_node_ptr (NautilusCTree *ctree,
NautilusCTreeNode *
nautilus_ctree_node_nth (NautilusCTree *ctree,
guint row)
int row)
{
g_return_val_if_fail (ctree != NULL, NULL);
g_return_val_if_fail (NAUTILUS_IS_CTREE (ctree), NULL);
......@@ -5988,7 +5988,7 @@ nautilus_ctree_drag_motion (GtkWidget *widget,
list = context->targets;
while (list)
{
if (atom == GPOINTER_TO_INT (list->data))
if (atom == GPOINTER_TO_UINT (list->data))
break;
list = list->next;
}
......
......@@ -236,7 +236,7 @@ NautilusCTreeNode * nautilus_ctree_last (NautilusCTree *c
NautilusCTreeNode * nautilus_ctree_find_node_ptr (NautilusCTree *ctree,
NautilusCTreeRow *ctree_row);
NautilusCTreeNode * nautilus_ctree_node_nth (NautilusCTree *ctree,
guint row);
int row);
gboolean nautilus_ctree_find (NautilusCTree *ctree,
NautilusCTreeNode *node,
NautilusCTreeNode *child);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment