Update of /cvsroot/evms/evms2/engine/ui/ncurses In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31510 Modified Files: activation.c add.c backup.c callbacks.c clist.c convert.c create.c delete.c dialog.c enum.c fsutils.c menu.c modify.c mount.c object.c options.c plugin.c remove.c replace.c resize.c save.c selwin.c settings.c task.c value.c views.c volume.c Log Message: Cleanup compiler warning messages. Added bonus: My editor cleans up trailing whitespace. Index: dialog.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/dialog.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- dialog.c 1 Dec 2003 18:10:33 -0000 1.1 +++ dialog.c 21 Jan 2009 01:00:46 -0000 1.2 @@ -4,19 +4,19 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - */ + */ #include <string.h> #include <ncurses.h> @@ -50,7 +50,7 @@ * This routine is invoked when the OK button in the message or help * dialog window is activated. */ -int ok_button_activated(struct menu_item *item) +int ok_button_activated(struct menu_item * UNUSED(item)) { return 0; } @@ -90,7 +90,8 @@ WINDOW *win, *border_win; PANEL *panel, *border_panel; struct horizontal_menu *menu; - int key = 0, width, height, min_menu_size; + int key = 0; + uint width, height, min_menu_size; va_list args; va_start(args, fmt); @@ -101,16 +102,16 @@ titulo = g_strdup(""); else titulo = g_strdup_printf(" %s ", title); - + min_menu_size = strlen(_("[OK]")) + 2; - width = MIN(getmaxx(stdscr) - 6, strlen(msg) + 4); + width = MIN((size_t) getmaxx(stdscr) - 6, strlen(msg) + 4); width = MAX(width, strlen(titulo) + 4); width = MAX(width, min_menu_size); height = MIN(getmaxy(stdscr) - 4, get_newline_count(msg) + 6); height = MAX(height, 10); - + panel = create_centered_popup_window(height, width, WHITE_BKGD); border_panel = (PANEL *)panel_userptr(panel); win = panel_window(panel); @@ -121,7 +122,7 @@ menu = create_horizontal_menu(win, width - 4, getmaxy(win) - 2, 1, 1); pack_menu_item_at_end(menu, _("[OK]"), get_accelerator_char(_("[_OK]")), - (menuitem_activate_cb)ok_button_activated, + (menuitem_activate_cb)ok_button_activated, NULL); draw_horizontal_menu(menu); @@ -200,7 +201,7 @@ * This routine is invoked when the Help button in the dialog window * is activated. */ -static int help_button_activated(struct menu_item *item) +static int help_button_activated(struct menu_item * UNUSED(item)) { return 0; } @@ -314,7 +315,7 @@ getmaxx(stdscr) - 6, WHITE_BKGD); dialog->win = panel_window(dialog->panel); - dialog->menu = create_horizontal_menu(dialog->win, getmaxx(dialog->win) - 4, + dialog->menu = create_horizontal_menu(dialog->win, getmaxx(dialog->win) - 4, getmaxy(dialog->win) - 2, 1, 1); dialog->handler = handler; dialog->show_func = show_func; @@ -323,18 +324,18 @@ dialog->user_data = user_data; dialog->status = DLG_STATUS_ACTIVE; - get_next_and_prev_button_labels(next_button_text, prev_button_text, + get_next_and_prev_button_labels(next_button_text, prev_button_text, &next_button_label, &next_button_accel, &prev_button_label, &prev_button_accel); dialog->help_button = pack_menu_item_at_start(dialog->menu, _("[Help]"), get_accelerator_char(_("[_Help]")), - (menuitem_activate_cb)help_button_activated, + (menuitem_activate_cb)help_button_activated, g_strdup(help_text)); - + dialog->cancel_button = pack_menu_item_at_end(dialog->menu, _("[Cancel]"), get_accelerator_char(_("[_Cancel]")), - (menuitem_activate_cb)cancel_button_activated, + (menuitem_activate_cb)cancel_button_activated, dialog); if (prev_button_callback == NULL) @@ -342,7 +343,7 @@ dialog->prev_button = pack_menu_item_at_end(dialog->menu, prev_button_label, prev_button_accel, - prev_button_callback, + prev_button_callback, dialog); dialog->next_button = pack_menu_item_at_end(dialog->menu, next_button_label, @@ -437,7 +438,7 @@ * that it coincides with the start address of the dialog * subclass. */ -void delete_dialog_window(struct dialog_window *dialog, void *not_used) +void delete_dialog_window(struct dialog_window *dialog, void * UNUSED(user_data)) { show_popup_window(dialog->panel); @@ -554,9 +555,9 @@ while (link != NULL) { if (link->data != NULL) delete_dialog_window(link->data, NULL); - + next_link = link->next; - g_list_remove(link, link->data); + link = g_list_remove(link, link->data); link = next_link; } } Index: create.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/create.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- create.c 22 Feb 2006 16:05:18 -0000 1.2 +++ create.c 21 Jan 2009 01:00:46 -0000 1.3 @@ -78,7 +78,7 @@ handle_array_t *plugins; if (enum_feature_plugins(NULL, &plugins) == 0) { - gint i; + uint i; for (i = 0; i < plugins->count && result == FALSE; i++) { result = is_task_acceptable_object(plugins->handle[i], Index: resize.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/resize.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- resize.c 13 Aug 2004 21:03:11 -0000 1.5 +++ resize.c 21 Jan 2009 01:00:46 -0000 1.6 @@ -46,7 +46,7 @@ * This routine is a standard clist_filter_func function type that checks to see * if the given thing can be expanded. */ -int filter_expand(engine_handle_t handle, void *user_data) +int filter_expand(engine_handle_t handle, void * UNUSED(user_data)) { return evms_can_expand(handle); } @@ -59,7 +59,7 @@ * This routine is a standard clist_filter_func function type that checks to see * if the given thing can be shrunk. */ -int filter_shrink(engine_handle_t handle, void *user_data) +int filter_shrink(engine_handle_t handle, void * UNUSED(user_data)) { return evms_can_shrink(handle); } @@ -136,7 +136,7 @@ rc = evms_get_shrink_points(handle, &shrink_points); if (rc == 0) { - int i; + uint i; for (i = 0; i < shrink_points->count; i++) { append_resize_point_to_clist(clist, shrink_points->shrink_point[i].object, @@ -163,7 +163,7 @@ rc = evms_get_expand_points(handle, &expand_points); if (rc == 0) { - int i; + uint i; for (i = 0; i < expand_points->count; i++) { append_resize_point_to_clist(clist, expand_points->expand_point[i].object, @@ -331,10 +331,10 @@ { int rc; gboolean result=FALSE; - + if (action == EVMS_Task_Expand){ expand_handle_array_t *expand_points; - + rc = evms_get_expand_points(object, &expand_points); if (rc == 0) { result = (expand_points->count == 1 && object == expand_points->expand_point[0].object); @@ -344,7 +344,7 @@ } } else { shrink_handle_array_t *shrink_points; - + rc = evms_get_shrink_points(object, &shrink_points); if (rc == 0) { result = (shrink_points->count == 1 && object == shrink_points->shrink_point[0].object); @@ -521,7 +521,7 @@ * This routine is invoked by the File System->Expand->Volume Actions pulldown * menu item. */ -int actions_expand_volume_menuitem_activated(struct menu_item *item) +int actions_expand_volume_menuitem_activated(struct menu_item * UNUSED(item)) { show_resize_volumes_dialog(0, EVMS_Task_Expand); return 0; @@ -547,7 +547,7 @@ * This routine is invoked by the File System->Shrink->Volume Actions pulldown * menu item. */ -int actions_shrink_volume_menuitem_activated(struct menu_item *item) +int actions_shrink_volume_menuitem_activated(struct menu_item * UNUSED(item)) { show_resize_volumes_dialog(0, EVMS_Task_Shrink); return 0; @@ -590,7 +590,7 @@ * This routine is invoked by the File System->Expand->Object Actions pulldown * menu item. */ -int actions_expand_object_menuitem_activated(struct menu_item *item) +int actions_expand_object_menuitem_activated(struct menu_item * UNUSED(item)) { show_resize_objects_dialog(0, EVMS_Task_Expand); return 0; @@ -616,7 +616,7 @@ * This routine is invoked by the File System->Shrink->Object Actions pulldown * menu item. */ -int actions_shrink_object_menuitem_activated(struct menu_item *item) +int actions_shrink_object_menuitem_activated(struct menu_item * UNUSED(item)) { show_resize_objects_dialog(0, EVMS_Task_Shrink); return 0; @@ -660,7 +660,7 @@ * This routine is invoked by the File System->Expand->Container Actions pulldown * menu item. */ -int actions_expand_container_menuitem_activated(struct menu_item *item) +int actions_expand_container_menuitem_activated(struct menu_item * UNUSED(item)) { show_resize_containers_dialog(0, EVMS_Task_Expand); return 0; @@ -687,7 +687,7 @@ * This routine is invoked by the File System->Shrink->Container Actions pulldown * menu item. */ -int actions_shrink_container_menuitem_activated(struct menu_item *item) +int actions_shrink_container_menuitem_activated(struct menu_item * UNUSED(item)) { show_resize_containers_dialog(0, EVMS_Task_Shrink); return 0; Index: callbacks.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/callbacks.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- callbacks.c 30 Nov 2004 20:07:13 -0000 1.4 +++ callbacks.c 21 Jan 2009 01:00:46 -0000 1.5 @@ -56,12 +56,12 @@ { if (message != NULL) { struct queued_message *queued_message; - + queued_message = g_new0(struct queued_message, 1); queued_message->timestamp = time(NULL); queued_message->number = message_number++; queued_message->message = g_strdup(message); - + message_queue = g_list_append(message_queue, queued_message); new_messages = TRUE; } @@ -75,7 +75,7 @@ * This routine removes a message in the alert message queue and * frees the memory for the message and the message queue element. */ -void delete_queued_message(struct queued_message *queued_message, gpointer not_used) +void delete_queued_message(struct queued_message *queued_message, gpointer UNUSED(user_data)) { if (queued_message != NULL) { g_free(queued_message->message); @@ -153,7 +153,7 @@ } else { text = g_strdup(progress->title); } - + print_statusbar_text(text); g_free(text); @@ -221,7 +221,7 @@ char *choice_button; struct menu_item *item; struct alert_choice_info *info; - + info = g_new(struct alert_choice_info, 1); info->our_index = our_index; info->return_selection = return_selection; @@ -239,7 +239,7 @@ * it the focus item. */ if (*return_selection == our_index) { - set_horizontal_menu_focus(menu, item); + set_horizontal_menu_focus(menu, item); } g_free(choice_button); @@ -268,7 +268,7 @@ mvwprintw(win, 0, 0, message); menu = create_horizontal_menu(win, getmaxx(win) - 4, getmaxy(win) - 2, 1, 1); - + for (i = 0; choices[i] != NULL; i++) { append_alert_choice(menu, choices[i], choice_selection, i); } @@ -281,7 +281,7 @@ process_horizontal_menu_events(menu, &key); } - delete_horizontal_menu(menu); + delete_horizontal_menu(menu); delete_popup_window(panel); } @@ -297,7 +297,7 @@ void show_informational_message(int number, time_t timestamp, char *message) { gchar *title; - + title = g_strdup_printf(_("Message %d received on %s"), number, g_strchomp(ctime(×tamp))); show_message_dialog(title, "%s", message); @@ -341,7 +341,7 @@ { GList *element; struct clist_item *focus_item; - + element = get_clist_focus_item(selwin->clist); focus_item = element->data; return focus_item->user_data; @@ -358,10 +358,10 @@ void disable_message_dialog_buttons(struct dialog_window *dialog) { struct menu_item *view_button = dialog->user_data; - + set_menu_item_sensitivity(view_button, FALSE); set_menu_item_sensitivity(dialog->prev_button, FALSE); - set_menu_item_sensitivity(dialog->next_button, FALSE); + set_menu_item_sensitivity(dialog->next_button, FALSE); } /** @@ -375,12 +375,12 @@ { struct queued_message *queued_message; struct selwin *selwin = item->user_data; - + queued_message = get_focus_item_data(selwin); show_informational_message(queued_message->number, queued_message->timestamp, queued_message->message); - + return 0; } @@ -395,12 +395,12 @@ { struct queued_message *queued_message; struct selwin *selwin = item->user_data; - + queued_message = get_focus_item_data(selwin); delete_queued_message(queued_message, NULL); message_queue = g_list_remove(message_queue, queued_message); delete_clist_item(selwin->clist, (struct clist_item *)selwin->clist->focus_item->data); - + if (message_queue == NULL) disable_message_dialog_buttons((struct dialog_window *)selwin); return 0; @@ -416,12 +416,12 @@ int delete_all_messages_button_activated(struct menu_item *item) { struct selwin *selwin = item->user_data; - + delete_all_elements(message_queue, (GFunc)delete_queued_message, NULL); message_queue = NULL; clear_clist(selwin->clist); disable_message_dialog_buttons((struct dialog_window *)selwin); - + return 0; } @@ -450,7 +450,7 @@ void populate_message_clist(struct clist *clist) { GList *element = message_queue; - + while (element != NULL) { GPtrArray *text; struct queued_message *queued_message; @@ -477,7 +477,7 @@ struct selwin *selwin; struct menu_item *view_item; struct dialog_window *dialog; - + selwin = create_selection_window( _("Alert/Informational Messages from Plug-ins"), NULL, @@ -522,7 +522,7 @@ populate_message_clist(selwin->clist); else disable_message_dialog_buttons(dialog); - process_modal_dialog(dialog); + process_modal_dialog(dialog); } /** @@ -546,7 +546,7 @@ * This routine is invoked when the "Actions->View->Messages" menu item * is invoked. */ -int on_view_messages_menuitem_activated(struct menu_item *item) +int on_view_messages_menuitem_activated(struct menu_item * UNUSED(item)) { if (message_queue != NULL) show_queued_messages_dialog(); Index: menu.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/menu.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- menu.c 4 Jan 2008 18:17:50 -0000 1.11 +++ menu.c 21 Jan 2009 01:00:46 -0000 1.12 @@ -114,7 +114,7 @@ * @starty: the row to print the menu item at * @startx: the column to print the menu item at * @item: the address of the menu_item struct - * + * * This routine uses the information in the given menu_item struct * in order to display a menu item. The accelerator character * (if any) is displayed brighter than the rest. @@ -398,7 +398,7 @@ * * This routine creates a popup window with some application information. */ -int show_about_box(struct menu_item *item) +int show_about_box(struct menu_item * UNUSED(item)) { int key = 0; WINDOW *win; @@ -422,7 +422,7 @@ menu = create_horizontal_menu(win, getmaxx(win) - 4, getmaxy(win) - 2, 1, 1); pack_menu_item_at_end(menu, _("[OK]"), get_accelerator_char(_("[_OK]")), (menuitem_activate_cb)ok_button_activated, - NULL); + NULL); draw_horizontal_menu(menu); show_popup_window(panel); @@ -431,7 +431,7 @@ process_horizontal_menu_events(menu, &key); } - delete_horizontal_menu(menu); + delete_horizontal_menu(menu); delete_popup_window(panel); g_free(version); @@ -710,7 +710,7 @@ * This routine draws a bar across the current menu item so the user * can see which menu item has focus. */ -void highlight_current_menuitem(struct popup_menu *menu, int width) +void highlight_current_menuitem(struct popup_menu *menu, int UNUSED(width)) { int focus_index; struct menu_item *item; @@ -1253,7 +1253,7 @@ * in the "Actions" menu is selected. It draws the "Create" pulldown submenu * and processes menu events. */ -int create_menuitem_activated(struct menu_item *item) +int create_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -1312,7 +1312,7 @@ * in the "Actions" menu is selected. It draws the "Delete" pulldown submenu * and processes menu events. */ -int delete_menuitem_activated(struct menu_item *item) +int delete_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -1366,7 +1366,7 @@ * in the "Actions" menu is selected. It draws the "Activation" pulldown submenu * and processes menu events. */ -int activation_menuitem_activated(struct menu_item *item) +int activation_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -1422,7 +1422,7 @@ * in the "Actions" menu is selected. It draws the "Expand" pulldown submenu * and processes menu events. */ -int expand_menuitem_activated(struct menu_item *item) +int expand_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -1481,7 +1481,7 @@ * in the "Actions" menu is selected. It draws the "Shrink" pulldown submenu * and processes menu events. */ -int shrink_menuitem_activated(struct menu_item *item) +int shrink_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -1536,7 +1536,7 @@ * in the "Actions" menu is selected. It draws the "Add" pulldown submenu * and processes menu events. */ -int add_menuitem_activated(struct menu_item *item) +int add_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -1594,7 +1594,7 @@ * in the "Actions" menu is selected. It draws the "Remove" pulldown submenu * and processes menu events. */ -int remove_menuitem_activated(struct menu_item *item) +int remove_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -1653,7 +1653,7 @@ * in the "Actions" menu is selected. It draws the "Modify" pulldown submenu * and processes menu events. */ -int modify_menuitem_activated(struct menu_item *item) +int modify_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -1702,7 +1702,7 @@ * in the "Actions" menu is selected. It draws the "View" pulldown submenu * and processes menu events. */ -int view_menuitem_activated(struct menu_item *item) +int view_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -1760,7 +1760,7 @@ * in the "Actions" menu is selected. It draws the "Convert" pulldown submenu * and processes menu events. */ -int convert_menuitem_activated(struct menu_item *item) +int convert_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -1828,7 +1828,7 @@ * in the "Actions" menu is selected. It draws the "Other" pulldown submenu * and processes menu events. */ -int other_menuitem_activated(struct menu_item *item) +int other_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -1856,7 +1856,7 @@ append_menu_item(fsys_menu, _("Remove..."), _("Remove a File System"), get_accelerator_char(_("_Remove...")), FALSE, (menuitem_activate_cb)actions_unmkfs_menuitem_activated, NULL); - + append_menu_item(fsys_menu, _("Mount..."), _("Mount a File System"), get_accelerator_char(_("M_ount...")), FALSE, (menuitem_activate_cb)actions_mount_filesystem_menuitem_activated, NULL); @@ -1892,7 +1892,7 @@ * in the "Actions" menu is selected. It draws the "File System" pulldown submenu * and processes menu events. */ -int fsys_menuitem_activated(struct menu_item *item) +int fsys_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -1985,7 +1985,7 @@ * in the main menubar is selected. It draws the actions pulldown menu and * processes menu events. */ -int actions_menuitem_activated(struct menu_item *item) +int actions_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -2046,7 +2046,7 @@ * in the main menubar is selected. It draws the Settings pulldown menu and * processes menu events. */ -int settings_menuitem_activated(struct menu_item *item) +int settings_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; @@ -2154,7 +2154,7 @@ if (evms_can_set_info(handle) == 0) { append_menu_item(menu, _("Modify Properties..."), NULL, 0, FALSE, (menuitem_activate_cb)context_modify_object_menuitem_activated, - handle_data); + handle_data); } if (evms_can_delete(handle) == 0) { @@ -2189,7 +2189,7 @@ if (evms_can_unassign(handle) == 0) { gchar *text; - + text = g_strdup_printf(_("Remove %s from Object..."), get_parent_plugin_type_string(handle, TRUE)); append_menu_item(menu, text, NULL, 0, FALSE, @@ -2295,7 +2295,7 @@ (menuitem_activate_cb)context_mount_filesystem_menuitem_activated, handle_data); } - + if (evms_can_unmount(handle) == 0) { append_menu_item(menu, _("Unmount..."), NULL, 0, FALSE, (menuitem_activate_cb)context_unmount_filesystem_menuitem_activated, @@ -2341,7 +2341,7 @@ if (evms_can_set_info(handle) == 0) { append_menu_item(menu, _("Modify Properties..."), NULL, 0, FALSE, (menuitem_activate_cb)context_modify_container_menuitem_activated, - handle_data); + handle_data); } if (evms_can_delete(handle) == 0) { Index: delete.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/delete.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- delete.c 1 Dec 2003 18:10:33 -0000 1.1 +++ delete.c 21 Jan 2009 01:00:46 -0000 1.2 @@ -4,19 +4,19 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - */ + */ #include <string.h> #include <glib.h> @@ -43,7 +43,7 @@ * This routine is a standard clist_filter_func function type that checks to see * if the given thing can be deleted. */ -int filter_thing_to_delete(object_handle_t handle, void *user_data) +int filter_thing_to_delete(object_handle_t handle, void * UNUSED(user_data)) { return evms_can_delete(handle); } @@ -121,7 +121,7 @@ * @item: the menu item/button that was activated * * This routine is invoked when the Recursive Delete button in the multiple - * deletion dialog window is activated. It calls evms_destroy() on each + * deletion dialog window is activated. It calls evms_destroy() on each * selected item in the clist. */ int recursive_delete_selected_items(struct menu_item *item) Index: activation.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/activation.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- activation.c 8 Jun 2004 18:06:36 -0000 1.2 +++ activation.c 21 Jan 2009 01:00:46 -0000 1.3 @@ -43,7 +43,7 @@ * This routine is a standard clist_filter_func function type that checks to see * if the given thing can be activated. */ -int filter_thing_to_activate(object_handle_t handle, void *user_data) +int filter_thing_to_activate(object_handle_t handle, void * UNUSED(user_data)) { return evms_can_activate(handle); } @@ -113,7 +113,7 @@ column_title = _("Logical Volume and/or Storage Object"); title = _("Activate Logical Volume and/or Storage Object"); - + selwin = create_selection_window(title, NULL, NULL, _("_Activate"), (menuitem_activate_cb)activate_items, @@ -171,7 +171,7 @@ * This routine is invoked by one of the Activate Actions pulldown * menu items. The object type is passed as the item->user_data; */ -int actions_activate_menuitem_activated(struct menu_item *item) +int actions_activate_menuitem_activated(struct menu_item * UNUSED(item)) { show_activate_dialog(0); return 0; @@ -186,7 +186,7 @@ * This routine is a standard clist_filter_func function type that checks to see * if the given thing can be deactivated. */ -int filter_thing_to_deactivate(object_handle_t handle, void *user_data) +int filter_thing_to_deactivate(object_handle_t handle, void * UNUSED(user_data)) { return evms_can_deactivate(handle); } @@ -256,7 +256,7 @@ column_title = _("Logical Volume and/or Storage Object"); title = _("Deactivate Logical Volume and/or Storage Object"); - + selwin = create_selection_window(title, NULL, NULL, _("_Deactivate"), (menuitem_activate_cb)deactivate_items, @@ -314,7 +314,7 @@ * This routine is invoked by one of the Deactivate Actions pulldown * menu items. The object type is passed as the item->user_data; */ -int actions_deactivate_menuitem_activated(struct menu_item *item) +int actions_deactivate_menuitem_activated(struct menu_item * UNUSED(item)) { show_deactivate_dialog(0); return 0; Index: value.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/value.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- value.c 4 Jan 2008 18:17:50 -0000 1.7 +++ value.c 21 Jan 2009 01:00:46 -0000 1.8 @@ -114,16 +114,16 @@ result = value.i32 < number; break; case EVMS_Type_Unsigned_Int: - result = value.ui < number; + result = (int32_t) value.ui < number; break; case EVMS_Type_Unsigned_Int32: - result = value.ui32 < number; + result = (int32_t) value.ui32 < number; break; case EVMS_Type_Int64: - result = value.i64 < number; + result = (int64_t) value.i64 < number; break; case EVMS_Type_Unsigned_Int64: - result = value.ui64 < number; + result = (int64_t) value.ui64 < number; break; default: log_warning("%s: Value type of %d was not handled.\n", __FUNCTION__, type); @@ -1375,7 +1375,7 @@ { value_t snap; gfloat inc, tmp, val, org_val, lower; - + val = convert_value_to_float(value, type); org_val = val; @@ -1392,6 +1392,6 @@ convert_float_to_value(val, type, &snap); else snap = value; - + return snap; } Index: options.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/options.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- options.c 4 Jan 2008 18:17:50 -0000 1.3 +++ options.c 21 Jan 2009 01:00:46 -0000 1.4 @@ -46,7 +46,7 @@ * it. If the option is for an inactive descriptor or an error occurs retrieving * it, we return NULL instead. **/ -option_descriptor_t *get_active_option(task_handle_t task, struct dialog_window *dialog, int index) +option_descriptor_t *get_active_option(task_handle_t task, int index) { int rc; option_descriptor_t *option; @@ -73,7 +73,7 @@ * then proceeds to retrieve the active options for the task, placing * the option descriptors in a singly linked list. */ -GSList *create_options_list(task_handle_t task, struct dialog_window *dialog) +GSList *create_options_list(task_handle_t task, struct dialog_window * UNUSED(dialog)) { int rc, count; GSList *options = NULL; @@ -85,7 +85,7 @@ for (i = 0; i < count; i++) { option_descriptor_t *option; - option = get_active_option(task, dialog, i); + option = get_active_option(task, i); if (option != NULL) options = g_slist_append(options, option); } @@ -146,10 +146,10 @@ */ int get_title_column_width(GSList *options) { - int width = 0; + size_t width = 0; while (options != NULL) { - int len; + size_t len; option_descriptor_t *option; option = options->data; @@ -172,11 +172,12 @@ */ int get_info_title_column_width(extended_info_array_t *info) { - int i, width = 0; + uint i; + size_t width = 0; for (i = 0; i < info->count; i++) { if (info->info[i].title != NULL) { - int len; + size_t len; len = strlen(info->info[i].title); if (len > width) @@ -247,7 +248,7 @@ str = g_strdup_printf(_("%s to %s"), min, max); g_free(min); g_free(max); - } + } break; case EVMS_Collection_List: if (collection.list->count > 0) @@ -378,7 +379,7 @@ * This routine is invoked when an item in the options clist receives focus. We display the * options tip in the status bar for the user to see. */ -void on_option_item_focus(struct clist *clist, struct clist_item *item) +void on_option_item_focus(struct clist * UNUSED(clist), struct clist_item *item) { option_descriptor_t *option = item->user_data; @@ -453,7 +454,7 @@ options = g_hash_table_lookup(hash_table, "options"); g_slist_free(options); - + task = get_task_from_dialog_data(dialog); populate_options_clist(task, dialog, clist); @@ -469,10 +470,11 @@ * This routine gets an array of extended info descriptors and populates the clist in the * dialog window with them. */ -void populate_extended_info_clist(extended_info_array_t *info, struct dialog_window *dialog, +void populate_extended_info_clist(extended_info_array_t *info, struct dialog_window * UNUSED(dialog), struct clist *clist) { - int i, width; + uint i; + int width; width = get_info_title_column_width(info); @@ -506,7 +508,7 @@ */ void display_info_list_field(extended_info_t *info) { - int i; + uint i; struct selwin *list_dialog; struct dialog_window *dialog; @@ -552,12 +554,12 @@ inline extended_info_array_t *expand_info_array(extended_info_array_t *info_in, int extra_entries) { extended_info_array_t *info_out; - + info_out = g_malloc0(sizeof(extended_info_array_t) + (sizeof(extended_info_t) * (info_in->count + extra_entries))); - + info_out->count = info_in->count + extra_entries; - + memcpy(&(info_out->info[extra_entries]), &(info_in->info[0]), sizeof(extended_info_t) * info_in->count); @@ -589,7 +591,7 @@ info_out->info[VOL_INFO_MAJOR].format = EVMS_Format_Normal; info_out->info[VOL_INFO_MAJOR].collection_type = EVMS_Collection_None; info_out->info[VOL_INFO_MAJOR].value.ui32 = vinfo->dev_major; - + info_out->info[VOL_INFO_MINOR].name = "minor_no"; info_out->info[VOL_INFO_MINOR].title = _("Minor Number"); info_out->info[VOL_INFO_MINOR].desc = _("This field describes the volume's device minor number."); @@ -625,7 +627,7 @@ info_out->info[VOL_INFO_FS_MIN_SIZE].format = EVMS_Format_Normal; info_out->info[VOL_INFO_FS_MIN_SIZE].collection_type = EVMS_Collection_None; info_out->info[VOL_INFO_FS_MIN_SIZE].value.ui64 = vinfo->min_fs_size; - + info_out->info[VOL_INFO_FS_MAX_SIZE].name = "max_fs_size"; info_out->info[VOL_INFO_FS_MAX_SIZE].title = _("Maximum File System Size"); info_out->info[VOL_INFO_FS_MAX_SIZE].desc = _("This field describes the maximum size of the file system."); @@ -643,7 +645,7 @@ info_out->info[VOL_INFO_VOL_SIZE].format = EVMS_Format_Normal; info_out->info[VOL_INFO_VOL_SIZE].collection_type = EVMS_Collection_None; info_out->info[VOL_INFO_VOL_SIZE].value.ui64 = vinfo->vol_size; - + info_out->info[VOL_INFO_VOL_MAX_SIZE].name = "max_vol_size"; info_out->info[VOL_INFO_VOL_MAX_SIZE].title = _("Maximum Volume Size"); info_out->info[VOL_INFO_VOL_MAX_SIZE].desc = _("This field describes the maximum size of the volume object."); @@ -674,7 +676,7 @@ * existing extended_info after the additional fields. */ info_out = expand_info_array(einfo, OBJ_INFO_MAX); - + info_out->info[OBJ_INFO_MAJOR].name = "major_no"; info_out->info[OBJ_INFO_MAJOR].title = _("Major Number"); info_out->info[OBJ_INFO_MAJOR].desc = _("This field describes the object's device major number."); @@ -683,7 +685,7 @@ info_out->info[OBJ_INFO_MAJOR].format = EVMS_Format_Normal; info_out->info[OBJ_INFO_MAJOR].collection_type = EVMS_Collection_None; info_out->info[OBJ_INFO_MAJOR].value.ui32 = oinfo->dev_major; - + info_out->info[OBJ_INFO_MINOR].name = "minor_no"; info_out->info[OBJ_INFO_MINOR].title = _("Minor Number"); info_out->info[OBJ_INFO_MINOR].desc = _("This field describes the object's device minor number."); @@ -723,8 +725,8 @@ extended_info_array_t *add_extra_info(handle_object_info_t *object, extended_info_array_t *info_in) { extended_info_array_t *info_out; - - if (object != NULL && object->type != CONTAINER && object->type != PLUGIN) { + + if (object != NULL && object->type != CONTAINER && object->type != PLUGIN) { if (object->type == VOLUME) { info_out = add_extra_volume_info(&(object->info.volume), info_in); } else { @@ -740,7 +742,7 @@ * view_more_info - display a dialog to view more details about an extended info field * @clist: the selection list * @item: the item/row selected - * + * * This routine is invoked when a row in the extended info clist is selected. * If the field indicates there are more details to view, we display another * dialog containing the additional information. @@ -765,14 +767,14 @@ * This routine is invoked when an item in the extended info clist receives focus. * We display the extended info field description in the status bar for the user to see. */ -void on_info_item_focus(struct clist *clist, struct clist_item *item) +void on_info_item_focus(struct clist * UNUSED(clist), struct clist_item *item) { extended_info_t *info = item->user_data; if (info->desc != NULL) print_statusbar_text(info->desc); else - print_statusbar_text(""); + print_statusbar_text(""); } /** @@ -782,7 +784,7 @@ * This routine is invoked when an extended info dialog is deleted. We simply * make sure that the statusbar text is cleared. */ -void on_delete_extended_info_dialog(struct dialog_window *dialog) +void on_delete_extended_info_dialog(struct dialog_window * UNUSED(dialog)) { /* * BUGBUG: If there are stacked extended info dialogs, this will @@ -814,16 +816,16 @@ char *title, *thing_name, *plugin_name; extended_info_array_t *supplemented_info; - evms_get_info(handle, &object); + evms_get_info(handle, &object); supplemented_info = add_extra_info(object, info); - + get_object_and_plugin_names(handle, &thing_name, &plugin_name); if (field_name != NULL && field_title != NULL) field = g_strdup_printf(" - %s", field_title); title = g_strconcat(_("Detailed Information - "), thing_name, field, NULL); - + selwin = create_selection_window(title, NULL, _("Use spacebar on fields marked with \"+\" to view more information"), _("_OK"), @@ -896,7 +898,7 @@ GSList *element; element = g_slist_find(options, option); - + element->data = option_redux; item->user_data = option_redux; @@ -936,7 +938,7 @@ convert_size_string_to_sector_value(buffer, option->unit, option->type, &value); else convert_string_to_value(buffer, option->type, option->max_len, &value); - + if (option->constraint_type == EVMS_Collection_Range) { value = clamp_value(value, option->constraint.range, option->type); value = snap_value_to_constraint_increment(value, option->constraint.range, option->type); @@ -1055,7 +1057,7 @@ selwin = item->user_data; dialog = item->user_data; hash_table = dialog->user_data; - + task = get_task_from_dialog_data(dialog); option = g_hash_table_lookup(hash_table, "option"); options = g_hash_table_lookup(hash_table, "options"); @@ -1079,7 +1081,7 @@ rc = evms_set_option_value_by_name(task, option->name, &value, &effect); if (rc == 0) { if (effect & EVMS_Effect_Reload_Options) { - *reload_options = TRUE; + *reload_options = TRUE; } else { replace_option(task, clist_item, option, options); } @@ -1101,8 +1103,8 @@ */ void populate_list_option_value_clist(struct clist *clist, option_descriptor_t *option) { - int i; - + uint i; + for (i = 0; i < option->constraint.list->count; i++) { GPtrArray *text; struct clist_item *item; @@ -1110,14 +1112,14 @@ text = g_ptr_array_new(); format_constraint_list_item(option, option->constraint.list->value[i], text); item = append_item(clist, text, GUINT_TO_POINTER(i), NULL); - + /* * If the option has a value or values, select this new item if it is * the or one of the current value(s). */ if (EVMS_OPTION_HAS_VALUE(option->flags)) { gboolean select; - + if (EVMS_OPTION_VALUE_IS_LIST(option->flags)) { select = value_in_value_list(option->constraint.list->value[i], option->value.list, Index: backup.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/backup.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- backup.c 16 Dec 2004 20:52:18 -0000 1.1 +++ backup.c 21 Jan 2009 01:00:46 -0000 1.2 @@ -48,7 +48,7 @@ static inline void append_changed_item(struct clist *clist, change_record_t *item) { GPtrArray *text; - + text = g_ptr_array_new(); g_ptr_array_add(text, g_strdup(item->name)); g_ptr_array_add(text, changes_flag_to_string(item->changes)); @@ -69,12 +69,12 @@ int rc; boolean changes_pending; change_record_array_t *changes = NULL; - + rc = evms_changes_pending(&changes_pending, &changes); if (rc == 0) { if (changes_pending && changes != NULL) { - int i; - + uint i; + for (i = 0; i < changes->count; i++) { if (changes->changes_pending[i].changes & ~(CHANGE_ACTIVATE | CHANGE_DEACTIVATE | @@ -97,7 +97,7 @@ * some sort of change pending. It is presented when the user activates the "Details" * button from the cannot backup dialog. */ -static int details_button_activated(struct menu_item *item) +static int details_button_activated(struct menu_item * UNUSED(item)) { struct selwin *list_dialog; struct dialog_window *dialog; @@ -121,7 +121,7 @@ populate_clist_with_changed_objects(list_dialog->clist); process_modal_dialog(dialog); - + return 0; } @@ -222,10 +222,10 @@ * This routine is invoked by the Actions->Backup menu item to attempt to backup * metadata. */ -int on_backup_menuitem_activated(struct menu_item *item) +int on_backup_menuitem_activated(struct menu_item * UNUSED(item)) { int rc; - int i; + uint i; boolean changes_pending; change_record_array_t * changes; Index: enum.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/enum.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- enum.c 14 Dec 2004 21:47:35 -0000 1.3 +++ enum.c 21 Jan 2009 01:00:46 -0000 1.4 @@ -33,7 +33,7 @@ * * This routine returns a handle array of all the current logical volumes. **/ -int enum_volumes(void *user_data, handle_array_t **handles) +int enum_volumes(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_volume_list(0, 0, 0, handles); } @@ -45,7 +45,7 @@ * * This routine returns a handle array of all the topmost storage objects. **/ -int enum_topmost_objects(void *user_data, handle_array_t **handles) +int enum_topmost_objects(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_object_list(0, DATA_TYPE, 0, 0, TOPMOST, handles); } @@ -57,7 +57,7 @@ * * This routine returns a handle array of all data type storage objects. */ -int enum_data_objects(void *user_data, handle_array_t **handles) +int enum_data_objects(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_object_list(0, DATA_TYPE, 0, 0, 0, handles); } @@ -69,7 +69,7 @@ * * This routine returns a handle array of all feature objects. **/ -int enum_feature_objects(void *user_data, handle_array_t **handles) +int enum_feature_objects(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_object_list(EVMS_OBJECT, DATA_TYPE, 0, 0, 0, handles); } @@ -81,7 +81,7 @@ * * This routine returns a handle array of all the storage regions. **/ -int enum_regions(void *user_data, handle_array_t **handles) +int enum_regions(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_object_list(REGION, 0, 0, 0, 0, handles); } @@ -93,7 +93,7 @@ * * This routine returns a handle array of all storage containers. **/ -int enum_containers(void *user_data, handle_array_t **handles) +int enum_containers(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_container_list(0, 0, 0, handles); } @@ -105,7 +105,7 @@ * * This routine returns a handle array of all disk segments. **/ -int enum_segments(void *user_data, handle_array_t **handles) +int enum_segments(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_object_list(SEGMENT, 0, 0, 0, 0, handles); } @@ -117,7 +117,7 @@ * * This routine returns a handle array of all logical disks. **/ -int enum_disks(void *user_data, handle_array_t **handles) +int enum_disks(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_object_list(DISK, 0, 0, 0, 0, handles); } @@ -130,7 +130,7 @@ * This routine returns a handle array of all the loaded * user-space plugins. **/ -int enum_all_plugins(void *user_data, handle_array_t **handles) +int enum_all_plugins(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_plugin_list(0, 0, handles); } @@ -147,7 +147,7 @@ handle_array_t *new; new = g_memdup(old, sizeof(handle_array_t) + (sizeof(object_handle_t) * old->count)); - + return new; } @@ -188,7 +188,7 @@ * This routine returns a single, merged handle array of all * the different feature type plugins. **/ -int enum_feature_plugins(void *user_data, handle_array_t **handles) +int enum_feature_plugins(void * UNUSED(user_data), handle_array_t **handles) { int rc; handle_array_t *features; @@ -219,7 +219,7 @@ * This routine returns a handle array of all the user-space plugins that * support containers. **/ -int enum_container_plugins(void *user_data, handle_array_t **handles) +int enum_container_plugins(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_plugin_list(0, SUPPORTS_CONTAINERS, handles); } @@ -232,7 +232,7 @@ * This routine returns a handle array of all the region manager * user-space plugins. **/ -int enum_region_manager_plugins(void *user_data, handle_array_t **handles) +int enum_region_manager_plugins(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_plugin_list(EVMS_REGION_MANAGER, 0, handles); } @@ -245,7 +245,7 @@ * This routine returns a handle array of all the device manager * user-space plugins. **/ -int enum_device_manager_plugins(void *user_data, handle_array_t **handles) +int enum_device_manager_plugins(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_plugin_list(EVMS_DEVICE_MANAGER, 0, handles); } @@ -258,7 +258,7 @@ * This routine returns a handle array of all the segment manager * user-space plugins. **/ -int enum_segment_manager_plugins(void *user_data, handle_array_t **handles) +int enum_segment_manager_plugins(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_plugin_list(EVMS_SEGMENT_MANAGER, 0, handles); } @@ -270,7 +270,7 @@ * * This routine returns a handle array of all the FSIM plugins. **/ -int enum_fsim_plugins(void *user_data, handle_array_t **handles) +int enum_fsim_plugins(void * UNUSED(user_data), handle_array_t **handles) { return evms_get_plugin_list(EVMS_FILESYSTEM_INTERFACE_MODULE, 0, handles); } Index: object.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/object.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- object.c 1 Dec 2003 18:10:34 -0000 1.1 +++ object.c 21 Jan 2009 01:00:46 -0000 1.2 @@ -4,19 +4,19 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - */ + */ #include <ncurses.h> #include <panel.h> @@ -43,7 +43,7 @@ * * This routine returns the handles for an object's parent, producing * and consuming containers. If the object is topmost (no parent) and - * has a volume then the volume handle is returned as the parent handle. + * has a volume then the volume handle is returned as the parent handle. **/ int get_object_handles(object_handle_t handle, object_handle_t *parent, object_handle_t *producing_container, @@ -55,7 +55,7 @@ *parent = 0; *producing_container = 0; *consuming_container = 0; - + rc = evms_get_info(handle, &object); if (rc == 0) { switch (object->type) { @@ -67,7 +67,7 @@ *consuming_container = object->info.object.consuming_container; if (object->info.object.parent_objects) { - if (object->info.object.parent_objects->count == 1) { + if (object->info.object.parent_objects->count == 1) { *parent = object->info.object.parent_objects->handle[0]; } else if (object->info.object.parent_objects->count == 0 && object->info.object.volume != 0) { @@ -98,7 +98,7 @@ handle_object_info_t *info; if ((evms_get_info(handle, &info)) == 0) { - plugin = info->info.object.plugin; + plugin = info->info.object.plugin; evms_free(info); } return plugin; @@ -147,7 +147,7 @@ if (rc == 0) { append_child_object(clist, object, level); if (object->info.object.child_objects != NULL) { - int i; + uint i; for (i = 0; i < object->info.object.child_objects->count; i++) { populate_object_tree(clist, @@ -165,7 +165,7 @@ * jump_to_object_button_activated - invoked when "Jump to" button in Object Tree dialog activated * @item: the menu item that was activated * - * This routine is invoked when the "Jump to" button is activated in the "Object Tree" + * This routine is invoked when the "Jump to" button is activated in the "Object Tree" * dialog. It switches to the view and focus to the currently focused object in the * object tree clist. */ @@ -175,12 +175,12 @@ struct clist_item *focus_item; struct selwin *selwin = item->user_data; struct dialog_window *dialog = item->user_data; - + element = get_clist_focus_item(selwin->clist); focus_item = element->data; jump_to_object(GPOINTER_TO_UINT(focus_item->user_data)); dialog->status = DLG_STATUS_CLOSING; - + return 0; } @@ -221,7 +221,7 @@ print_clist_column_title(selwin->clist, 0, _("Storage Object")); populate_object_tree(selwin->clist, handle, 0); - process_modal_dialog(dialog); + process_modal_dialog(dialog); g_free(name); g_free(title); Index: task.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/task.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- task.c 21 Jan 2009 00:59:16 -0000 1.8 +++ task.c 21 Jan 2009 01:00:46 -0000 1.9 @@ -447,7 +447,7 @@ */ void populate_resulting_objects_clist(struct clist *clist, handle_array_t *resulting_objects) { - int i; + uint i; for (i = 0; i < resulting_objects->count; i++) { GPtrArray *text; @@ -563,7 +563,7 @@ * This routine creates a dialog window for a task that has no selectable objects or options. * In other words, invoking the task is all that is necessary. **/ -struct dialog_window *create_task_confirmation_dialog(struct dialog_list *list, task_handle_t task, +struct dialog_window *create_task_confirmation_dialog(struct dialog_list * UNUSED(list), task_handle_t UNUSED(task), gchar *title, gchar *verb, gchar *help) { char *prompt; @@ -759,7 +759,7 @@ log_warning("%s: Type %u was not processed.\n", __FUNCTION__, object->type); break; } - g_ptr_array_add(text, g_strdup(evms_strerror(ABS(declined->reason)))); + g_ptr_array_add(text, g_strdup(evms_strerror(declined->reason))); evms_free(object); } return rc; @@ -775,7 +775,7 @@ */ void populate_declination_clist(struct clist *clist, declined_handle_array_t *declined_objects) { - int i; + uint i; for (i = 0; i < declined_objects->count; i++) { GPtrArray *text; @@ -831,7 +831,7 @@ */ void mark_selected_rows(struct clist *clist, handle_array_t *selected_objects) { - gint i; + uint i; /* * Find the row corresponding to each object handle in the @@ -902,7 +902,7 @@ rc = evms_get_selected_objects(task, &selected_list); if (rc == 0) { - int count; + guint count; GList *focus_item; mark_selected_rows(clist, selected_list); @@ -949,7 +949,7 @@ * It handles any side-effects from the operation such as dealing with declined * objects or having to schedule a reload of the acceptable objects in the clist. */ -int update_selected_objects(struct clist *clist, task_handle_t task, int *count) +int update_selected_objects(struct clist *clist, task_handle_t task, guint * count) { int rc; task_effect_t effect = 0; @@ -1007,10 +1007,10 @@ rc = evms_get_selected_object_limits(task, &min, &max); if (rc == 0) { - gint length = g_list_length(clist->selections); + guint length = g_list_length(clist->selections); log_debug("%s: len = %i, min = %i, max = %i\n", __FUNCTION__, length, min, max); - if (length <= max || max == -1) { + if (length <= max || max == UINT32_MAX) { rc = update_selected_objects(clist, task, &length); if (rc == 0) { mark_selection(item); @@ -1057,7 +1057,7 @@ rc = evms_get_selected_object_limits(task, &min, &max); if (rc == 0) { - gint length = g_list_length(clist->selections); + guint length = g_list_length(clist->selections); log_debug("%s: len = %i, min = %i, max = %i\n", __FUNCTION__, length, min, max); rc = update_selected_objects(clist, task, &length); Index: modify.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/modify.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- modify.c 1 Dec 2003 18:10:34 -0000 1.1 +++ modify.c 21 Jan 2009 01:00:46 -0000 1.2 @@ -4,19 +4,19 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - */ + */ #include <glib.h> #include <ncurses.h> @@ -42,7 +42,7 @@ * @item: the menu item that initiated this action * * This routine is invoked when a menu item is activated to allow modifying - * a container's properties. + * a container's properties. */ int context_modify_container_menuitem_activated(struct menu_item *item) { @@ -57,7 +57,7 @@ process_dialog_list_events(dialog->list); delete_dialog_list(dialog->list->list); } - return 0; + return 0; } /** @@ -68,7 +68,7 @@ * This routine is a standard clist_filter_func function type that checks to see * if the given thing can have it attributes/properties changed. */ -int filter_modify(engine_handle_t handle, void *user_data) +int filter_modify(engine_handle_t handle, void * UNUSED(user_data)) { return evms_can_set_info(handle); } @@ -140,9 +140,9 @@ * @item: the menu item that initiated this action * * This routine is invoked when the "Actions->Modify-Storage Object" menu item is - * activated to allow modifying a storage object's properties. + * activated to allow modifying a storage object's properties. */ -int actions_modify_container_menuitem_activated(struct menu_item *item) +int actions_modify_container_menuitem_activated(struct menu_item * UNUSED(item)) { struct selwin *selwin; struct dialog_list dialogs; @@ -184,7 +184,7 @@ * @item: the menu item that initiated this action * * This routine is invoked when a menu item is activated to allow modifying - * a storage object's properties. + * a storage object's properties. */ int context_modify_object_menuitem_activated(struct menu_item *item) { @@ -199,7 +199,7 @@ process_dialog_list_events(dialog->list); delete_dialog_list(dialog->list->list); } - return 0; + return 0; } /** @@ -219,9 +219,9 @@ * @item: the menu item that initiated this action * * This routine is invoked when the "Actions->Modify-Storage Object" menu item is - * activated to allow modifying a storage object's properties. + * activated to allow modifying a storage object's properties. */ -int actions_modify_object_menuitem_activated(struct menu_item *item) +int actions_modify_object_menuitem_activated(struct menu_item * UNUSED(item)) { struct selwin *selwin; struct dialog_list dialogs; @@ -288,7 +288,7 @@ * @clist: the clist for the row item selected * @item: the clist item that was selected * - * This routine is invoked when a volume in the clist is selected to allow + * This routine is invoked when a volume in the clist is selected to allow * changing it's EVMS volume. We prompt for a volume name and store the name in the * dialog->user_data replacing any previous name. */ @@ -315,7 +315,7 @@ * This routine is a standard clist_filter_func function type that checks to see * if the given volume can have its name changed. */ -int filter_set_volume_name(engine_handle_t handle, void *user_data) +int filter_set_volume_name(engine_handle_t handle, void * UNUSED(user_data)) { return evms_can_set_volume_name(handle); } @@ -325,7 +325,7 @@ * @dialog: the dialog window * * This routine handles cleanup for the dialog used to modify EVMS volume names. - * We free any string that may be associated with the dialog containing + * We free any string that may be associated with the dialog containing * a volume name. */ void on_modify_volume_dialog_delete(struct dialog_window *dialog) @@ -393,7 +393,7 @@ * * This routine is invoked by the "Modify->Volume" Actions pulldown menu item. */ -int actions_modify_vol_menuitem_activated(struct menu_item *item) +int actions_modify_vol_menuitem_activated(struct menu_item * UNUSED(item)) { return show_modify_volume_dialog(0); } Index: settings.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/settings.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- settings.c 9 Sep 2004 20:42:26 -0000 1.3 +++ settings.c 21 Jan 2009 01:00:46 -0000 1.4 @@ -70,7 +70,7 @@ int open_remote_engine(char *node) { int rc; - + enable_message_queuing(); rc = evms_set_current_node(node); disable_message_queuing(); @@ -121,7 +121,7 @@ _("Do you wish to save changes before switching to the new node?")); g_free(title); } - + rc = open_remote_engine(new_node); if (rc == 0) ((struct dialog_window *)selwin)->status = DLG_STATUS_CLOSING; @@ -164,7 +164,7 @@ rc = evms_get_node_list(ACTIVE_NODES_ONLY, &nodes); if (rc == 0) { - int i; + u_int32_t i; for (i = 0; i < nodes->count; i++) { char *node_name; @@ -191,7 +191,7 @@ * the remote node. We'll also refresh the views to coincide with the new node being * administered. */ -int show_nodes_dialog_menuitem_activated(struct menu_item *item) +int show_nodes_dialog_menuitem_activated(struct menu_item * UNUSED(item)) { struct selwin *selwin; struct dialog_window *dialog; @@ -314,7 +314,7 @@ * This routine is called to display a selection list of log levels for the engine * logging. We pre-select the current log level. */ -int show_log_level_dialog_menuitem_activated(struct menu_item *item) +int show_log_level_dialog_menuitem_activated(struct menu_item * UNUSED(item)) { struct selwin *selwin; struct dialog_window *dialog; Index: clist.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/clist.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- clist.c 1 Dec 2003 18:10:33 -0000 1.1 +++ clist.c 21 Jan 2009 01:00:46 -0000 1.2 @@ -4,19 +4,19 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - */ + */ #include <stdlib.h> #include <string.h> @@ -101,7 +101,7 @@ * @newmode: the new mode (CLIST_MODE_MULTI or CLIST_MODE_SINGLE) * * This routine checks the new mode to set. If one of the valid modes, - * it sets the clist mode to the new mode and returns the mode as + * it sets the clist mode to the new mode and returns the mode as * confirmation that it was set. */ inline int set_selection_mode(struct clist *clist, int newmode) @@ -280,7 +280,7 @@ * This routine returns the width of a column given the percentage of the column * the caller wants the column to take from the clist width. */ -inline int calc_clist_column_width(struct clist *clist, float width_in_percent) +inline int calc_clist_column_width(struct clist *clist, float width_in_percent) { return (getmaxx(clist->win) * width_in_percent); } @@ -296,9 +296,9 @@ */ void print_clist_column_title(struct clist *clist, int col, char *title) { - int x, len, offset = 0; + uint x, len, offset = 0; - len = MIN(clist->column[col].width, strlen(title)); + len = MIN((size_t) clist->column[col].width, strlen(title)); switch (clist->column[col].justification) { case CLIST_TEXT_JUSTIFY_LEFT: offset = 0; @@ -602,15 +602,16 @@ * @line: the line in the clist window to draw it at * * This ro... [truncated message content] |