You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(241) |
Jul
(79) |
Aug
(239) |
Sep
(193) |
Oct
(366) |
Nov
(108) |
Dec
(88) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(80) |
Feb
(95) |
Mar
(284) |
Apr
(130) |
May
(93) |
Jun
(151) |
Jul
(168) |
Aug
(321) |
Sep
(219) |
Oct
(44) |
Nov
(91) |
Dec
(138) |
2005 |
Jan
(67) |
Feb
(25) |
Mar
(1) |
Apr
(8) |
May
(16) |
Jun
(88) |
Jul
(6) |
Aug
(2) |
Sep
(7) |
Oct
(14) |
Nov
(13) |
Dec
(3) |
2006 |
Jan
|
Feb
(76) |
Mar
(4) |
Apr
(2) |
May
(6) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
(20) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(29) |
Sep
|
Oct
|
Nov
|
Dec
(7) |
2009 |
Jan
(43) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Tiziano Mül. <tiz...@us...> - 2010-08-19 11:48:51
|
Update of /cvsroot/evms/evms2/engine/engine In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv10982/engine/engine Modified Files: internalAPI.c Log Message: reset the locale to ensure tools detect the tools properly Index: internalAPI.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/engine/internalAPI.c,v retrieving revision 1.155 retrieving revision 1.156 diff -u -d -r1.155 -r1.156 --- internalAPI.c 24 Dec 2008 00:15:36 -0000 1.155 +++ internalAPI.c 19 Aug 2010 11:48:43 -0000 1.156 @@ -2549,6 +2549,10 @@ LOG_DEBUG("%s\n", buff); } + /* always reset the locale otherwise some plugins may be unable to + * detect the tools due to translations changing the version string */ + setenv("LC_ALL", "C", 1); + execvp(argv[0], argv); /* If the execvp() works it won't return here. */ |
From: Tiziano Mül. <tiz...@us...> - 2009-02-19 09:21:32
|
Update of /cvsroot/evms/evms2/engine/plugins/md In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15885/plugins/md Modified Files: md_super.c Log Message: Added a comment to the pointer-to-u_int32_t conversions for a warning on 64bit archs Do not take the address again in seg_gen_serial_number or passing a "guess" parameter is completely useless The size of volume_label is 11, so the last element is 10, not 11. sizeof() returns a long int which makes a difference on 64bit but not on 32bit. Index: md_super.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/md/md_super.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- md_super.c 16 Jan 2009 18:14:39 -0000 1.16 +++ md_super.c 19 Feb 2009 09:21:21 -0000 1.17 @@ -1567,7 +1567,7 @@ mdp_sb_1_t *sb = (mdp_sb_1_t *)super; u_int32_t i; LOG_ENTRY(); - LOG_DEBUG("Sizeof structure: %d bytes.\n", sizeof(*sb)); + LOG_DEBUG("Sizeof structure: %ld bytes.\n", sizeof(*sb)); LOG_DEBUG("magic: %x.\n", sb->magic); LOG_DEBUG("major_version: %d.\n", sb->major_version); LOG_DEBUG("feature_map: %d.\n", sb->feature_map); |
From: Tiziano Mül. <tiz...@us...> - 2009-02-19 09:21:27
|
Update of /cvsroot/evms/evms2/engine/plugins/dos In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15885/plugins/dos Modified Files: defsegmgr.c segs.c sn.c Log Message: Added a comment to the pointer-to-u_int32_t conversions for a warning on 64bit archs Do not take the address again in seg_gen_serial_number or passing a "guess" parameter is completely useless The size of volume_label is 11, so the last element is 10, not 11. sizeof() returns a long int which makes a difference on 64bit but not on 32bit. Index: defsegmgr.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/dos/defsegmgr.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- defsegmgr.c 15 Jan 2009 19:52:39 -0000 1.50 +++ defsegmgr.c 19 Feb 2009 09:21:21 -0000 1.51 @@ -1070,7 +1070,7 @@ dla.Partition_Size = seg->size; dla.Partition_Start = seg->start; dla.Drive_Letter = *drive_letter; - dla.Partition_Serial_Number = seg_gen_serial_number((u_int32_t)&dla.Partition_Serial_Number); + dla.Partition_Serial_Number = seg_gen_serial_number((u_int32_t)&dla.Partition_Serial_Number); /* warning on 64bit archs about truncated pointer-to-int conversion can be ignored (please confirm) */ if ( strlen(partition_name) > 0) { strncpy(&dla.Partition_Name[0], partition_name, PARTITION_NAME_SIZE); } Index: segs.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/dos/segs.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- segs.c 15 Jan 2009 19:52:39 -0000 1.30 +++ segs.c 19 Feb 2009 09:21:21 -0000 1.31 @@ -3510,7 +3510,7 @@ strcpy(disk_pdata->disk_name, DiskName ); // gen a serial number for the disk - dlat_buffer->Disk_Serial_Number = seg_gen_serial_number( (u_int32_t) &dlat_buffer->Disk_Serial_Number ); + dlat_buffer->Disk_Serial_Number = seg_gen_serial_number( (u_int32_t) &dlat_buffer->Disk_Serial_Number ); /* warning on 64bit archs about truncated pointer-to-int conversion can be ignored (please confirm) */ if (dlat_buffer->Disk_Serial_Number != BAD_SERIAL_NUMBER) { rc = seg_register_serial_number( dlat_buffer->Disk_Serial_Number); } Index: sn.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/dos/sn.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- sn.c 29 Jul 2004 21:24:38 -0000 1.6 +++ sn.c 19 Feb 2009 09:21:21 -0000 1.7 @@ -116,7 +116,7 @@ rc = -1; // keep looping } else { - sn.serial_number += (u_int32_t) &guess; + sn.serial_number += guess; } } |
From: Tiziano Mül. <tiz...@us...> - 2009-02-19 09:21:25
|
Update of /cvsroot/evms/evms2/engine/plugins/fat In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15885/plugins/fat Modified Files: utils.c Log Message: Added a comment to the pointer-to-u_int32_t conversions for a warning on 64bit archs Do not take the address again in seg_gen_serial_number or passing a "guess" parameter is completely useless The size of volume_label is 11, so the last element is 10, not 11. sizeof() returns a long int which makes a difference on 64bit but not on 32bit. Index: utils.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/fat/utils.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- utils.c 29 Aug 2006 16:38:34 -0000 1.3 +++ utils.c 19 Feb 2009 09:21:21 -0000 1.4 @@ -147,9 +147,9 @@ EngFncs->close_volume(ev, fd); /* FIXME: trim space chars */ if (isfat16) { - boot->fat.vi.volume_label[11] = '\0'; + boot->fat.vi.volume_label[10] = '\0'; } else { - boot->fat32.vi.volume_label[11] = '\0'; + boot->fat32.vi.volume_label[10] = '\0'; } LOG_EXIT_INT(rc); |
From: Tiziano Mül. <tiz...@us...> - 2009-02-19 09:13:51
|
Update of /cvsroot/evms/evms2/engine/tests In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15026 Modified Files: seq_dd.c Log Message: Added mode flags to the open(..., O_CREAT) command as required (see http://www.opengroup.org/onlinepubs/009695399/functions/open.html) since compilation fails with gcc-4.3.3 Index: seq_dd.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/tests/seq_dd.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- seq_dd.c 23 Jan 2009 00:13:22 -0000 1.4 +++ seq_dd.c 19 Feb 2009 09:13:33 -0000 1.5 @@ -110,7 +110,8 @@ return 1; } - fd = open(filename, O_CREAT | O_WRONLY); + /* set the permissions of the newly created file at max to rw-r----- */ + fd = open(filename, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP); if (fd < 0) { fprintf(stderr, "Error opening \"%s\": %s\n", filename, strerror(errno)); |
From: Tiziano Mül. <tiz...@us...> - 2009-02-19 06:40:52
|
Update of /cvsroot/evms/evms2/engine/tests In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1821/tests Modified Files: Makefile.in Log Message: Object files have to be before the libs or symbols get stripped before the linker knows whether they're needed, resulting in undefined symbols with LDFLAGS=-Wl,--as-needed (in Gentoo known as 50_all_2.5.5-as-needed.patch) Index: Makefile.in =================================================================== RCS file: /cvsroot/evms/evms2/engine/tests/Makefile.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.in 10 Oct 2005 15:56:03 -0000 1.6 +++ Makefile.in 19 Feb 2009 06:40:34 -0000 1.7 @@ -36,7 +36,7 @@ rm -f Makefile evms_clean: % : %.o - $(CC) -L$(top_srcdir)/engine $(EVMS_LDFLAGS) $(EVMS_LIBS) $(PTHREAD_LIBS) $(EFENCE_LIBS) -levms -o $@ $@.o + $(CC) -L$(top_srcdir)/engine $(EVMS_LDFLAGS) $@.o $(EVMS_LIBS) $(PTHREAD_LIBS) $(EFENCE_LIBS) -levms -o $@ evms_deactivate seq_dd lvm2_crc: % : %.o $(CC) -o $@ $@.o |
From: Steve D. <ste...@us...> - 2009-01-23 00:13:29
|
Update of /cvsroot/evms/evms2/engine/tests In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24869 Modified Files: evms_clean.c evms_deactivate.c lvm2_crc.c seq_dd.c Log Message: Cleanup compiler warnings. Index: seq_dd.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/tests/seq_dd.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- seq_dd.c 6 Apr 2004 20:28:09 -0000 1.3 +++ seq_dd.c 23 Jan 2009 00:13:22 -0000 1.4 @@ -48,7 +48,8 @@ { u_int64_t *buffer; unsigned long i; - int fd, rc, j, failed = 0; + int fd, rc; + uint j, failed = 0; buffer = malloc(SECTOR_SIZE); if (!buffer) { @@ -100,7 +101,8 @@ { u_int64_t *buffer; unsigned long i; - int fd, rc, j; + int fd, rc; + uint j; buffer = malloc(SECTOR_SIZE); if (!buffer) { Index: lvm2_crc.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/tests/lvm2_crc.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- lvm2_crc.c 10 Oct 2005 15:56:03 -0000 1.1 +++ lvm2_crc.c 23 Jan 2009 00:13:22 -0000 1.2 @@ -41,7 +41,8 @@ { void *buffer; char *filename; - u_int32_t crc, size; + u_int32_t crc; + ssize_t size; u_int64_t offset; int fd; @@ -68,7 +69,7 @@ return 3; } - if (lseek64(fd, offset, SEEK_SET) != offset) { + if (lseek64(fd, offset, SEEK_SET) != (off64_t) offset) { printf("Error: Could not seek to offset %lu in %s.\n", (unsigned long)offset, filename); return 4; Index: evms_clean.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/tests/evms_clean.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- evms_clean.c 15 Jan 2009 00:42:42 -0000 1.11 +++ evms_clean.c 23 Jan 2009 00:13:22 -0000 1.12 @@ -301,7 +301,7 @@ static int delete_parent_objects(handle_object_info_t * obj_info) { int rc = 0; - int i; + uint i; for (i = 0; i < obj_info->info.disk.parent_objects->count; i++) { @@ -347,7 +347,7 @@ static int clean_parent_objects(handle_object_info_t * obj_info) { int rc = 0; - int i; + uint i; for (i = 0; i < obj_info->info.disk.parent_objects->count; i++) { @@ -451,7 +451,7 @@ static int clean_container(handle_object_info_t * con_info) { int rc = 0; - int i; + uint i; for (i = 0; i < con_info->info.container.objects_produced->count; i++) { @@ -715,4 +715,3 @@ return rc; } - Index: evms_deactivate.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/tests/evms_deactivate.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- evms_deactivate.c 25 Sep 2003 14:54:26 -0000 1.4 +++ evms_deactivate.c 23 Jan 2009 00:13:22 -0000 1.5 @@ -311,7 +311,7 @@ * * Open the DM control node, issue the REMOVE_ALL ioctl, and close. **/ -int main(int argc, char **argv) +int main() { dm_ioctl_t dmi; int rc; @@ -330,7 +330,7 @@ rc = ioctl(dm_control_fd, DM_REMOVE_ALL, &dmi); if (rc) { rc = errno; - fprintf(stderr, "ioctl failed with error code %d: %s\n", + fprintf(stderr, "ioctl failed with error code %d: %s\n", rc, strerror(rc)); goto out; } |
From: Steve D. <ste...@us...> - 2009-01-23 00:08:34
|
Update of /cvsroot/evms/evms2/engine/ui/utils In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24532 Modified Files: evms_metadata_restore.c evms_query.c evmsd.c Log Message: Cleanup compiler warnings. Index: evmsd.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/utils/evmsd.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- evmsd.c 30 Nov 2004 20:40:24 -0000 1.15 +++ evmsd.c 23 Jan 2009 00:08:23 -0000 1.16 @@ -31,7 +31,7 @@ #include <frontend.h> -static char * prog_name; +static char * prog_name; static debug_level_t debug_level = -1; static char * log_file = NULL; static boolean quiet = FALSE; @@ -184,7 +184,7 @@ * daemon. Sleep forever to keep the process. */ -int main(int argc, char * * argv, char * * env){ +int main(int argc, char * * argv){ int rc = 0; Index: evms_metadata_restore.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/utils/evms_metadata_restore.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- evms_metadata_restore.c 15 Jan 2009 00:32:38 -0000 1.31 +++ evms_metadata_restore.c 23 Jan 2009 00:08:23 -0000 1.32 @@ -645,7 +645,6 @@ static int get_file_by_date(const char * date_str, - const char * dir, char * * p_file_name) { int rc = 0; @@ -659,7 +658,7 @@ char * remainder; /* - * Set the time part to 29:59:60 in case the user specified only + * Set the time part to 23:59:60 in case the user specified only * a date and not a date and time. If only a date was given, * then we want the oldest backup file on that date, not the * oldest backup file before that date. @@ -876,12 +875,12 @@ void * * p_metadata) { int rc = 0; void * metadata = NULL; - u_int64_t metadata_byte_length; + ssize_t metadata_byte_length; ssize_t bytes_read; LOG_ENTRY(); - metadata_byte_length = db_entry->length << EVMS_VSECTOR_SIZE_SHIFT; + metadata_byte_length = (ssize_t) db_entry->length << EVMS_VSECTOR_SIZE_SHIFT; metadata = malloc(metadata_byte_length); if (metadata != NULL) { @@ -1938,7 +1937,7 @@ void * metadata) { int i; - int count = 0; + u_int64_t count = 0; u_int8_t * p1 = metadata; u_int8_t * p2 = metadata; u_int64_t metadata_byte_length; @@ -1954,7 +1953,7 @@ */ printf(_("Metadata:\n")); while (count < metadata_byte_length) { - printf("%08x ", count); + printf("%08"PRIx64" ", count); for (i = 0; i < 8; i++) { printf("%02x ", *p1++); } @@ -2124,7 +2123,7 @@ } if (metadata_file == NULL) { - rc = get_file_by_date(date_string, default_metadata_dir, &metadata_file); + rc = get_file_by_date(date_string, &metadata_file); if (rc != 0) { return rc; } Index: evms_query.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/utils/evms_query.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- evms_query.c 15 Jan 2009 00:32:38 -0000 1.10 +++ evms_query.c 23 Jan 2009 00:08:23 -0000 1.11 @@ -116,7 +116,7 @@ static void show_help(void) { - int i; + uint i; LOG(_("Usage: %s [options] <command> [command_options] [name]*\n"), prog_name); LOG(_("Display information about EVMS.\n" " options:\n" @@ -259,7 +259,8 @@ **/ static int get_command(char *command_name) { - int i, rc; + uint i; + int rc; for (i = 0; i < NR_COMMANDS; i++) { rc = strncmp(command_name, query_commands[i].name, @@ -713,7 +714,7 @@ static void display_extended_info_value(extended_info_t *info) { - int i; + uint i; switch (info->collection_type) { case EVMS_Collection_None: @@ -774,7 +775,7 @@ static int display_extended_info(extended_info_array_t *info) { - int i; + uint i; for (i = 0; i < info->count; i++) { display_extended_info_item(info->info + i); @@ -848,7 +849,8 @@ **/ static int display_handle_array(handle_array_t *handles, int name_only) { - int i, rc = 0; + uint i; + int rc = 0; for (i = 0; i < handles->count; i++) { rc = display_handle(handles->handle[i], name_only); @@ -946,7 +948,8 @@ handle_list_t **display_list) { handle_object_info_t *info = NULL; - int i, rc; + uint i; + int rc; if (!handle) { return 0; @@ -1011,7 +1014,8 @@ handle_list_t **display_list) { handle_object_info_t *info = NULL; - int i, rc; + uint i; + int rc; if (!handle) { return 0; @@ -1206,7 +1210,7 @@ * * Display info about an EVMS "thing". **/ -static int info(object_type_t type, int argc, char **argv) +static int info(object_type_t UNUSED(type), int argc, char **argv) { object_handle_t handle; char *name; @@ -1238,7 +1242,7 @@ * * Display detailed info about an EVMS "thing". **/ -static int details(object_type_t type, int argc, char **argv) +static int details(object_type_t UNUSED(type), int argc, char **argv) { object_handle_t handle; extended_info_array_t *info; @@ -1315,7 +1319,7 @@ engine_api.patchlevel); LOG_ERROR(_("\t%s requires %d.%d.%d\n"), prog_name, required_engine_api.major, - required_engine_api.minor, required_engine_api.patchlevel); + required_engine_api.minor, required_engine_api.patchlevel); return EPERM; } |
Update of /cvsroot/evms/evms2/engine/ui/gtk In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24300 Modified Files: activation.c add.c backup.c commit.c container_cb.c create.c delete.c fsutils.c main.c main_window_cb.c message.c mount.c move.c plugin_cb.c reopen.c resize.c segment_cb.c selection_cb.c setinfo.c support.c task.c thing.c transfer.c unassign.c value.c views.c volume_cb.c weblinks.c widget.c Log Message: Cleanup compiler warnings. Added bonus: My editor cleans up trailing whitespace. Index: message.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/gtk/message.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- message.c 9 Apr 2007 15:58:57 -0000 1.8 +++ message.c 23 Jan 2009 00:06:25 -0000 1.9 @@ -4,18 +4,18 @@ * * 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 - * + * * Module: message.c */ @@ -45,11 +45,11 @@ * box for a multiple choice message box has been changed. * We simply determine the index of the new selection from * the choices array and set the answer index appropriately. - * + * * Entry: * editable - the text entry widget of the combo box - * args - address of message_args_t struct - * + * args - address of message_args_t struct + * * Exit: * Updates the answer index to the index of the current selection. * @@ -86,17 +86,17 @@ * This routine is invoked when a message window is * being destroyed. We either signal a blocking thread * to wakeup or exit an inner event loop. - * + * * Entry: * window - the object that received the destroy signal - * args - address of message_args_t struct - * + * args - address of message_args_t struct + * * Exit: * Signals a wakeup on any thread waiting for our destruction * or exits an inner or main event loop. * */ -void on_message_window_destroy(GtkObject * window, message_args_t * args) +void on_message_window_destroy(GtkObject * UNUSED(window), message_args_t * args) { if (args->wakeup_cond) g_cond_signal(args->wakeup_cond); @@ -120,23 +120,23 @@ * gboolean on_message_window_delete_event (GtkWidget *, message_args_t *args) * * Description: - * This routine is invoked when a message window + * This routine is invoked when a message window * received the delete event from the window * manager. We ignore the delete event and hide - * instead if the hide window boolean in the + * instead if the hide window boolean in the * args is TRUE. - * + * * Entry: * window - the window that received the delete-event signal - * args - address of message_args_t struct - * + * args - address of message_args_t struct + * * * Exit: * Allows a destroy of the window or disallows the destroy * aignal and simply hides the window. * */ -gboolean on_message_window_delete_event(GtkWidget * window, GdkEvent * event, message_args_t * args) +gboolean on_message_window_delete_event(GtkWidget * window, GdkEvent * UNUSED(event), message_args_t * args) { gboolean prevent_window_destruction = FALSE; @@ -160,10 +160,10 @@ * signaling any blocked thread that we are done * or simply calls gtk_main_quit () to exit any * nested GTK event loop. - * + * * Entry: * button - address of the GtkButton widget - * args - address of message_args_t struct + * args - address of message_args_t struct * * Exit: * Sets answer and destroys parent window. @@ -181,8 +181,8 @@ * void on_message_clear_button_clicked (GtkButton *, GtkText *) * * Description: - * This routine - * + * This routine + * * Entry: * button - address of the GtkButton widget * text - address of the GtkText widget @@ -191,7 +191,7 @@ * Clears the text in the message window. * */ -void on_message_clear_button_clicked(GtkButton * button, GtkText * text) +void on_message_clear_button_clicked(GtkButton * UNUSED(button), GtkText * text) { gtk_text_backward_delete(text, gtk_text_get_length(text)); } @@ -205,7 +205,7 @@ * as the signal handler for the "clicked" signal for the OK button * located on the informational message window. It decides which to * use depending on the hide_window argument. - * + * * Entry: * ok_button - address of info message OK button * args - address of message_args_t struct @@ -236,7 +236,7 @@ * work as part of a simple set of buttons message window. The * criteria is that there are no more than MAX_MESSAGE_BUTTONS * choices and the text length is short enough to fit in the buttons. - * + * * Entry: * args - address of message_args_t struct * @@ -253,7 +253,7 @@ choices = args->choices; - /* + /* * See if count exceeds our max */ @@ -464,7 +464,7 @@ * This routine creates a choice button, associates its answer * index with it, places it in the button box, connects the * "clicked" signal handler and sets it as default if necessary. - * + * * Entry: * index - choice index * hbuttonbox - the button box container to add the button to @@ -507,7 +507,7 @@ * in the button box. If the button has the label text of "Cancel", * it is placed just left of the affirmative button. We also add * the standard pixmap for "Cancel" while we're here. - * + * * Entry: * button - the button to reorder if necessary * box - the button box containing the button @@ -551,7 +551,7 @@ * Description: * This routine creates a simple popup window that contains * the text of the given message and one to three buttons labeled - * with the short text from the plugin. The focus is placed on the + * with the short text from the plugin. The focus is placed on the * button corresponding to the initial value of the "answer" parameter. * It essentially for boolean conditions but the plugin supplies * the button text. @@ -782,7 +782,7 @@ * void on_message_window_realize (GtkWidget *window, gpointer user_data) * * Description: - * This routine attempts to raise a message window to the top of the + * This routine attempts to raise a message window to the top of the * window stack when it gets realized. * * Entry: @@ -792,7 +792,7 @@ * Exit: * The message window is raised to the top of the window stack. */ -void on_message_window_realize(GtkWidget * window, gpointer user_data) +void on_message_window_realize(GtkWidget * window, gpointer UNUSED(user_data)) { GtkWidget *main_window; @@ -884,7 +884,7 @@ * Description: * This routine is called by the engine for having * us display simple messages or get simple responses - * from a set of choices (strings). + * from a set of choices (strings). * * If this callback is running on a thread other than * the main thread, we schedule an idle function to @@ -895,12 +895,12 @@ * * Informational-only message are always dispatched * asynchronously though. That is, we create/redisplay - * the window and return from this callback to the + * the window and return from this callback to the * engine immediately. * * Entry: * text - the message string to display - * answer - the index of the choice selected + * answer - the index of the choice selected * (initialized with the default selection) * choices - an optional array of choices the user * can select from @@ -953,9 +953,9 @@ gtk_idle_add((GtkFunction) display_message_window_from_main_thread, args); - /* + /* * If this is not an information message then we - * will be blocking until one of the window + * will be blocking until one of the window * message handlers clears a condition to let * us continue to return control to the engine. */ @@ -1023,10 +1023,10 @@ * This routine attempts to redisplay the messages window * if it exists. Otherwise, it displays a popup window * that tells the users that no messages exist to be shown. - * + * * Entry: * None - * + * * Exit: * Re-displays the messages window or displays an no messages * window. @@ -1049,10 +1049,10 @@ * This routine attempts to make the message window a transient * window of the given window. It hopefully allows the suggests * to the window manager to place it on top of the given window. - * + * * Entry: * parent - the window id of the parent for the message window - * + * * Exit: * The message window hopefully is placed on top of the parent * window. Index: setinfo.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/gtk/setinfo.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- setinfo.c 3 Aug 2004 18:41:31 -0000 1.8 +++ setinfo.c 23 Jan 2009 00:06:25 -0000 1.9 @@ -111,7 +111,7 @@ * is displayed. * */ -void on_set_info_button_clicked(GtkButton * button, gpointer user_data) +void on_set_info_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { GList *window_list; GtkWidget *clist; @@ -226,7 +226,7 @@ * See description. * */ -void on_modify_thing_properties_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_modify_thing_properties_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { object_type_t type; Index: transfer.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/gtk/transfer.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- transfer.c 20 Aug 2008 23:32:46 -0000 1.9 +++ transfer.c 23 Jan 2009 00:06:25 -0000 1.10 @@ -84,7 +84,7 @@ * See description. * */ -void on_remove_thing_from_container_button_clicked(GtkButton * button, gpointer user_data) +void on_remove_thing_from_container_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { GtkCList *clist; object_handle_t handle; @@ -138,7 +138,7 @@ * See description. * */ -void on_remove_thing_from_container_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_remove_thing_from_container_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { gint rc; object_handle_t handle = GPOINTER_TO_UINT(user_data); @@ -280,7 +280,7 @@ handle_array_t *objects; rc = evms_get_acceptable_objects(task, &objects); if (rc == SUCCESS) { - gint i; + uint i; for (i = 0; i < objects->count; i++) { if (objects->handle[i] == handle) { @@ -315,7 +315,7 @@ * array that can removed from their consuming container * */ -void on_remove_thing_from_container_clist_realize(GtkWidget * widget, gpointer user_data) +void on_remove_thing_from_container_clist_realize(GtkWidget * widget, gpointer UNUSED(user_data)) { gint rc = 0; GtkCList *clist = GTK_CLIST(widget); Index: support.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/gtk/support.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- support.c 4 Jan 2008 18:17:48 -0000 1.11 +++ support.c 23 Jan 2009 00:06:25 -0000 1.12 @@ -4,16 +4,16 @@ * * 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 * * Module: support.c @@ -52,7 +52,7 @@ * through the children of a higher-level widget such * as the top-level window or any parent of the widget * we want. - * + * * Entry: * widget - address of an ancestor of the widget we want * widget_name - pointer to the string with the name of the @@ -90,7 +90,7 @@ * Description: * This routine dismisses the parent containing the button * that was clicked. - * + * * Entry: * button - address of the GtkButton widget * user_data - address of user data bound with signal (not used) @@ -99,7 +99,7 @@ * Dismisses/destroys parent window of button * */ -void on_button_clicked_destroy_window(GtkButton * button, gpointer user_data) +void on_button_clicked_destroy_window(GtkButton * button, gpointer UNUSED(user_data)) { GtkWidget *window; @@ -115,13 +115,13 @@ /* * * void display_not_implemented_yet_popup (void) - * + * * Description: * This routine display a small popup that indicates * that the function selected has not been implemented * yet. Eventually this function will become dormant * when we reach a fully functional implementation. - * + * * Entry: * Nothing * @@ -137,14 +137,14 @@ /* * * void display_popup_window (gchar *, gchar *) - * + * * Description: * This routine display a small popup that suitable * for short informational messages. - * + * * Entry: * title - address of string containing window title - * message - address of string containing window text + * message - address of string containing window text * * Exit: * Popup is displayed awaiting dismissal. @@ -194,11 +194,11 @@ /* * * void display_help_window (GtkWindow *, gchar *) - * + * * Description: * This routine display a small popup that suitable * for displaying help. - * + * * Entry: * parent - window that we should become a transient window of * text - string containing text for help text box @@ -321,17 +321,17 @@ /* * * inline void destroy_window_list (GList *window_list) - * + * * Description: * This routine destroys the windows in a list starting * at the given link It moves on to the next link as it * removes the current link. - * + * * Entry: * window_list - list of windows to destroy * * Exit: - * Windows in the list are destroyed and the + * Windows in the list are destroyed and the * corresponding links are removed. * */ @@ -353,12 +353,12 @@ /* * * void complete_display_results_window_work (GtkWidget *, gchar *, GSList *, gboolean) - * + * * Description: * This routine completes the work resulting from displaying a results * window. This includes making sure that the message window is stacked * above this window. - * + * * Entry: * window - results window id * message - status bar message string @@ -388,16 +388,16 @@ /* * * GtkWidget* display_results_window (gint, gchar *, gchar *, GSList *, gboolean, GtkWidget *) - * + * * Description: * This routine display a dialog that provides feedback * on the results of a certain operation. The caller - * can provide the window title,an optional message, + * can provide the window title,an optional message, * a list of windows that should be destroyed - * after showing the results window as well as the + * after showing the results window as well as the * actual error code to be used in pulling a descriptive * message for the return code. - * + * * Entry: * rc - the return code (the results of an operation) * title - optional string to use as the title @@ -430,7 +430,7 @@ } /* - * Create the results window and make any modifications + * Create the results window and make any modifications * wanted by caller before showing it. */ @@ -483,16 +483,16 @@ /* * * gboolean editable_field_is_blank (GtkEditable *editable) - * + * * Description: * This routine determines if the given editable widget * has any non-whitespace characters in it. - * + * * Entry: * editable - address of GtkEditable widget to check * * Exit: - * Return TRUE if widget has no viable characters + * Return TRUE if widget has no viable characters * or FALSE if contains non-whitespace characters * */ @@ -514,13 +514,13 @@ /* * * gboolean check_for_empty_list_when_exposed (GtkCList *, GdkEventExpose *, gpointer) - * + * * Description: * This routine determines if a list to be exposed (drawn) * contains any rows. If empty, we append a blank row * and set the some text indicating the list was not * populated. - * + * * Entry: * clist - the list we want to check to see if empty * event - pointer to the expose event structure @@ -531,11 +531,11 @@ * event handlers execute. * */ -gboolean check_for_empty_list_when_exposed(GtkCList * clist, GdkEventExpose * event, +gboolean check_for_empty_list_when_exposed(GtkCList * clist, GdkEventExpose * UNUSED(event), gpointer user_data) { /* - * If the list is empty, append a blank row and set the text at the + * If the list is empty, append a blank row and set the text at the * column where we were instructed to place the empty list text at. Also, * make the list insensitive to avoid the row selection handler from * kicking in on a bogus list. @@ -559,9 +559,9 @@ * void set_selection_window_instructions_label (GtkWidget *, gchar *) * * Description: - * This routine sets the text in the selection dialog window that + * This routine sets the text in the selection dialog window that * instructs the user what to do. - * + * * Entry: * window - the selection dialog window id * next_button_text - the text to be displayed on the "Next" button @@ -595,7 +595,7 @@ * Description: * This routine replaces whatever is in the next button with a label * containing the given text. - * + * * Entry: * next_button - the button id * text - text for the label to be placed in the button @@ -634,12 +634,12 @@ * GtkSignalFunc, GtkSignalFunc, * GtkSignalFunc, GtkSignalFunc, * gpointer) - * + * * Description: * This routine creates the generic selection dialog * and connects the appropriate signal handlers that will * initiate the operation actions. - * + * * Entry: * window_title - title for the selection window * next_button_text - label text for next button (default is "Next") @@ -706,9 +706,9 @@ /* * Before we show the window, setup the signal handlers - * that will populate the clist when the clist is realized. + * that will populate the clist when the clist is realized. * Also initialize the "Cancel" button to dismiss the window - * when no signal handler is provided. Setup the "Next" + * when no signal handler is provided. Setup the "Next" * button with the signal handler given. The "Next" * button's sensitivity is reliant on a row selection. * There is a default set of signal handlers that change @@ -772,11 +772,11 @@ /* * * void display_selection_window_results (GtkWidget *, gint, gchar *, gchar *) - * + * * Description: * This routine displays the results window and destroys the selection * window if the operation was successful. - * + * * Entry: * widget - a widget to help us lookup the selection window * rc - the return code for the selection window operation @@ -800,7 +800,7 @@ * Call the function that displays the window with everything * we want to say about the outcome of the operation. Provide * the selection_window in the window_list to have it destroyed - * it after popping up the results_window. + * it after popping up the results_window. */ selection_window = gtk_widget_get_toplevel(widget); @@ -877,10 +877,10 @@ /* * * inline void set_status_bar_message (const gchar *) - * + * * Description: * This routine sets the message in the main window status bar. - * + * * Entry: * message - the string to push onto the statusbar * @@ -899,11 +899,11 @@ /* * * inline void set_status_bar_message (const gchar *) - * + * * Description: * This routine removes the current message from the * main window status bar. - * + * * Entry: * None * @@ -922,14 +922,14 @@ /* * * gpointer get_single_select_current_row_data (GtkCList *) - * + * * Description: * This routine is a wrapper call to get_clist_selection_data() * to allow retrieving the user data for single selected row. - * + * * Entry: - * clist - address of GtkCList - + * clist - address of GtkCList + * Exit: * The address of the user data associated with the currently * selected row in the list, otherwise NULL is returned. @@ -954,21 +954,21 @@ /* * - * GSList* get_clist_selection_data (GtkCList *) - * + * GSList* get_clist_selection_data (GtkCList *) + * * Description: * This routine builds a singly linked list containing the - * user data corresponding to each row selected. When + * user data corresponding to each row selected. When * building the list, we walk the selection list in reverse - * (last to first) in order to allow optimization in + * (last to first) in order to allow optimization in * prepending items to the head of the list rather than * appending to the end. * * NOTE: The caller should issue a g_slist_free() on the * GSList when it is no longer needed. The user * data in the list should be considered read-only - * items. - * + * items. + * * Entry: * clist - address of GtkCList * @@ -1019,10 +1019,10 @@ * * Description: * This routine searches the window_list for the current window - * then walks the list back from there to find the id of a + * then walks the list back from there to find the id of a * previous window in the list to redisplay. The current window * is hidden prior to showing the previous window. - * + * * Entry: * button - address of the GtkButton widget * user_data - user data (not used) @@ -1031,7 +1031,7 @@ * The current window is hidden and the previous one is displayed. * */ -void on_button_clicked_display_prev_window(GtkButton * button, gpointer user_data) +void on_button_clicked_display_prev_window(GtkButton * button, gpointer UNUSED(user_data)) { GList *window_list; @@ -1077,7 +1077,7 @@ * If there is no window list, this routine simply calls the * on_button_clicked_destroy_window () routine to destroy the * button's parent window only. - * + * * Entry: * button - address of the GtkButton widget * user_data - user data (not used) @@ -1104,7 +1104,7 @@ * Description: * This routine sets the version string in the about * box to the compiled version information. - * + * * Entry: * widget - the version label widget * user_data - user data (not used) @@ -1113,7 +1113,7 @@ * The about label is updated with the version string. * */ -void on_version_label_realize(GtkWidget * widget, gpointer user_data) +void on_version_label_realize(GtkWidget * widget, gpointer UNUSED(user_data)) { gchar *version; @@ -1131,7 +1131,7 @@ * Description: * This routine is called whenever a row is selected on * the read-only clist so that the selection gets undone. - * + * * Entry: * clist - address of GtkCList object that received select-row signal * row - index of row selected @@ -1144,7 +1144,7 @@ * */ void on_readonly_clist_select_row(GtkCList * clist, gint row, gint column, - GdkEventButton * event, gpointer user_data) + GdkEventButton * UNUSED(event), gpointer UNUSED(user_data)) { gtk_clist_unselect_row(clist, row, column); } @@ -1156,9 +1156,9 @@ * Description: * This routine calls g_free() for each data item * in the list and then removes the GSList element. - * It continues this until the entire list is + * It continues this until the entire list is * destroyed. - * + * * Entry: * list - the address of head of the list * @@ -1180,8 +1180,8 @@ * * Description: * This routine is called to display or remove messages - * on the main window status bar for menu items. - * + * on the main window status bar for menu items. + * * Entry: * widget - the menu item that is getting or losing the pointer focus * event - the event->type will tell whether the pointer is entering @@ -1193,7 +1193,7 @@ * Always returns FALSE * */ -gboolean update_statusbar_message(GtkWidget * widget, GdkEventCrossing * event, gpointer user_data) +gboolean update_statusbar_message(GtkWidget * UNUSED(widget), GdkEventCrossing * event, gpointer user_data) { if (event->type == GDK_ENTER_NOTIFY) set_status_bar_message(user_data); @@ -1209,11 +1209,11 @@ * * Description: * This routine is called to display or remove messages - * on the main window status bar for menu items. - * + * on the main window status bar for menu items. + * * Entry: * widget - the menu item that is getting or losing the keyboard focus - * event - the event->in boolean will tell us whether we are getting + * event - the event->in boolean will tell us whether we are getting * or losing keyboard focus * user_data - if getting focus, this should be a pointer to a string with * the status message @@ -1222,7 +1222,7 @@ * Always returns FALSE * */ -gboolean on_menu_item_focus_event(GtkWidget * widget, GdkEventFocus * event, gpointer user_data) +gboolean on_menu_item_focus_event(GtkWidget * UNUSED(widget), GdkEventFocus * event, gpointer user_data) { if (event->in) set_status_bar_message(user_data); @@ -1240,7 +1240,7 @@ * This routine allows setting the text for the selection window * columns. Only those for a which a non-NULL string pointer is given * are changed. - * + * * Entry: * clist - the id of the selection window clist * size_col_text - string for size column or NULL to not change @@ -1272,7 +1272,7 @@ * the pixmap widget from a filename. Instead, it calls the a helper * routine that creates the pixmap widget from static information * already part of the program. - * + * * Entry: * widget - reference widget (not used) * name - pixmap filename @@ -1281,21 +1281,21 @@ * Returns a GtkPixmap widget or NULL if the name was incorrect. * */ -GtkWidget *create_pixmap(GtkWidget * widget, const gchar * name) +GtkWidget *create_pixmap(GtkWidget * UNUSED(widget), const gchar * name) { return create_pixmap_widget(name); } /* * - * inline void add_pixmap_label_to_button (GtkWidget *, GdkPixmap *, GdkBitmap *, + * inline void add_pixmap_label_to_button (GtkWidget *, GdkPixmap *, GdkBitmap *, * const gchar *, GtkAccelGroup *) * * Description: * This routine creates a horizontal box and places a pixmap in * one cell and label in the other. It then places the hbox in * the button provided. - * + * * Entry: * button - the button to contain the pixmap and label * pixmap - the GDK pixmap to create the GtkPixmap from @@ -1349,7 +1349,7 @@ * This routine allows widening or narrowing the width of a * column in a GtkCList. The delta is added to the current * width of the column. - * + * * Entry: * clist - the address of the GtkCList containing the column * column - the index of the column to effect @@ -1374,7 +1374,7 @@ * This routine returns either the default foreground and background * colors for a GtkCList row or an alternate set of colors (currently * a light gray background with a black foreground). - * + * * Entry: * clist - the address of the GtkCList * alternate - TRUE if the alternate color is to be returned @@ -1425,7 +1425,7 @@ * a row in a GtkCList. The choices are default style background * and foreground for normal color or light gray background * with black foreground for alternate color. - * + * * Entry: * clist - the address of the GtkCList * row - the row number of the row to change @@ -1455,7 +1455,7 @@ * a row in a GtkCList. The choices are default style background * and foreground for normal color or light gray background * with black foreground for alternate color. - * + * * Entry: * clist - the address of the GtkCList * row - the row number of the row to change @@ -1484,7 +1484,7 @@ * This routine is basically a wrapper function to gtk_clist_append * that allows for alternating the row background depending on * whether the row is even or odd. - * + * * Entry: * clist - the address of the GtkCList to append row to * text - the array of text strings for columns on row @@ -1513,7 +1513,7 @@ * Description: * This routine walks all of the viewable nodes in a ctree * and sets every other nodes color to an alternating color. - * + * * Entry: * ctree - the address of the GtkCTree to set alternating colors * @@ -1547,7 +1547,7 @@ * Description: * This routine sets the normal foreground color of a widget. * It is typically called for label widgets. - * + * * Entry: * widget - the widget to have its foreground color changed * color_string - the color, e.g. "red" or "#FF0000" (see rgb.txt) @@ -1623,7 +1623,7 @@ * This routine dismisses the parent containing the button * that was clicked and calls gtk_main_quit() to exit the * current event loop. - * + * * Entry: * button - address of the GtkButton widget * user_data - address of user data bound with signal (not used) @@ -1642,17 +1642,17 @@ /* * * GtkWidget* display_results_and_exit (gint, gchar *, gchar *, GSList *, gboolean, GtkWidget *) - * + * * Description: * This routine display a dialog that provides feedback * on the results of a certain operation. The caller - * can provide the window title,an optional message, + * can provide the window title,an optional message, * a list of windows that should be destroyed - * after showing the results window as well as the + * after showing the results window as well as the * actual error code to be used in pulling a descriptive * message for the return code. It also exits the * current event loop when the user clicks on OK button. - * + * * Entry: * rc - the return code (the results of an operation) * title - optional string to use as the title Index: weblinks.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/gtk/weblinks.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- weblinks.c 4 May 2004 22:13:12 -0000 1.1 +++ weblinks.c 23 Jan 2009 00:06:25 -0000 1.2 @@ -149,7 +149,7 @@ } } -static void on_go_button_clicked(GtkButton * button, gchar * url) +static void on_go_button_clicked(GtkButton * UNUSED(button), gchar * url) { display_url_in_browser(url); } Index: volume_cb.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/gtk/volume_cb.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- volume_cb.c 4 Jan 2008 18:17:49 -0000 1.21 +++ volume_cb.c 23 Jan 2009 00:06:25 -0000 1.22 @@ -56,7 +56,7 @@ * See description. * */ -void on_create_compat_volume_button_clicked(GtkButton * button, gpointer user_data) +void on_create_compat_volume_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { gchar *error_msg = _("An error was encountered attempting to create the volume."); gchar *success_msg = _("The volume was successfully created."); @@ -81,7 +81,7 @@ * Selection list populated with sysdata objects * */ -void on_create_compat_volume_clist_realize(GtkWidget * widget, gpointer user_data) +void on_create_compat_volume_clist_realize(GtkWidget * widget, gpointer UNUSED(user_data)) { on_create_volume_clist_realize(widget, TRUE); } @@ -104,7 +104,7 @@ * See description. * */ -void on_create_evms_volume_button_clicked(GtkButton * button, gpointer user_data) +void on_create_evms_volume_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { gchar *error_msg = _("An error was encountered attempting to create the volume."); gchar *success_msg = _("The volume was successfully created."); @@ -129,7 +129,7 @@ * Selection list populated with suitable toplevel storage objects * */ -void on_create_evms_volume_clist_realize(GtkWidget * widget, gpointer user_data) +void on_create_evms_volume_clist_realize(GtkWidget * widget, gpointer UNUSED(user_data)) { on_create_volume_clist_realize(widget, FALSE); } @@ -295,7 +295,7 @@ * See description. * */ -void on_create_volume_popup_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_create_volume_popup_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { GtkWidget *window; @@ -321,7 +321,7 @@ * See description. * */ -void on_create_compatibility_volume_popup_menu_item_activate(GtkMenuItem * menuitem, +void on_create_compatibility_volume_popup_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { GtkWidget *window; @@ -425,7 +425,7 @@ * their properties changed. * */ -void on_modify_volume_clist_realize(GtkWidget * widget, gpointer user_data) +void on_modify_volume_clist_realize(GtkWidget * widget, gpointer UNUSED(user_data)) { gint rc; GtkCList *clist = GTK_CLIST(widget); @@ -439,7 +439,7 @@ if (rc != SUCCESS) { log_error("%s: evms_get_volume_list() returned error code %d.\n", __FUNCTION__, rc); } else { - gint i; + uint i; gboolean is_selected = (volumes->count == 1); for (i = 0; i < volumes->count; i++) { @@ -475,7 +475,7 @@ * Returns nothing. * */ -void on_volume_name_entry_changed(GtkEditable * editable, gpointer user_data) +void on_volume_name_entry_changed(GtkEditable * editable, gpointer UNUSED(user_data)) { GtkWidget *modify_button = lookup_widget(GTK_WIDGET(editable), "modify_button"); @@ -653,7 +653,7 @@ * See description. * */ -void on_modify_volume_selection_button_clicked(GtkButton * button, gpointer user_data) +void on_modify_volume_selection_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { GList *window_list; GtkWidget *clist; @@ -717,7 +717,7 @@ * See description. * */ -void on_modify_volume_help_button_clicked(GtkButton * button, gpointer user_data) +void on_modify_volume_help_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { GtkWidget *parent; @@ -740,7 +740,7 @@ * See description. * */ -void on_modify_volume_popup_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_modify_volume_popup_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { GtkWidget *window; @@ -1030,7 +1030,7 @@ * Returns nothing. * */ -void on_display_volume_details_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_display_volume_details_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { gint rc; object_handle_t handle = GPOINTER_TO_UINT(user_data); @@ -1075,7 +1075,7 @@ * user to try again. * */ -void on_convert_to_evms_volume_button_clicked(GtkButton * button, gpointer user_data) +void on_convert_to_evms_volume_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { gchar *error_msg; gchar *success_msg; @@ -1129,7 +1129,7 @@ * be converted to EVMS volumes. * */ -void on_convert_to_evms_volume_clist_realize(GtkWidget * widget, gpointer user_data) +void on_convert_to_evms_volume_clist_realize(GtkWidget * widget, gpointer UNUSED(user_data)) { gint rc; GtkCList *clist = GTK_CLIST(widget); @@ -1143,7 +1143,7 @@ if (rc != SUCCESS) { log_error("%s: evms_get_volume_list() returned error code %d.\n", __FUNCTION__, rc); } else { - gint i; + uint i; gboolean is_selected = (volumes->count == 1); for (i = 0; i < volumes->count; i++) { @@ -1176,7 +1176,7 @@ * be converted to compatibility volumes. * */ -void on_convert_to_compatibility_volume_clist_realize(GtkWidget * widget, gpointer user_data) +void on_convert_to_compatibility_volume_clist_realize(GtkWidget * widget, gpointer UNUSED(user_data)) { gint rc; GtkCList *clist = GTK_CLIST(widget); @@ -1190,7 +1190,7 @@ if (rc != SUCCESS) { log_error("%s: evms_get_volume_list() returned error code %d.\n", __FUNCTION__, rc); } else { - gint i; + uint i; gboolean is_selected = (volumes->count == 1); for (i = 0; i < volumes->count; i++) { @@ -1285,7 +1285,7 @@ * See description. * */ -void on_convert_to_evms_volume_popup_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_convert_to_evms_volume_popup_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { GtkWidget *window; @@ -1311,7 +1311,7 @@ * is displayed. * */ -void on_convert_to_compatibility_volume_button_clicked(GtkButton * button, gpointer user_data) +void on_convert_to_compatibility_volume_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { gchar *error_msg; gchar *success_msg; @@ -1350,7 +1350,7 @@ * See description. * */ -void on_convert_to_compatibility_volume_popup_menu_item_activate(GtkMenuItem * menuitem, +void on_convert_to_compatibility_volume_popup_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { GtkWidget *window; @@ -1396,7 +1396,7 @@ if (rc != SUCCESS) { log_error("%s: evms_get_plugin_list() returned error code %d.\n", __FUNCTION__, rc); } else { - gint i; + uint i; gboolean is_selected = (plugins->count == 1); for (i = 0; i < plugins->count; i++) { @@ -1457,7 +1457,7 @@ * See description. * */ -void on_add_feature_to_volume_popup_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_add_feature_to_volume_popup_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { GtkWidget *window; @@ -1488,7 +1488,7 @@ * have a feature added to them. * */ -void on_add_feature_to_volume_clist_realize(GtkWidget * widget, gpointer user_data) +void on_add_feature_to_volume_clist_realize(GtkWidget * widget, gpointer UNUSED(user_data)) { gint rc; GtkCList *clist = GTK_CLIST(widget); @@ -1502,7 +1502,7 @@ if (rc != SUCCESS) { log_error("%s: evms_get_volume_list() returned error code %d.\n", __FUNCTION__, rc); } else { - gint i; + uint i; gboolean is_selected = (volumes->count == 1); for (i = 0; i < volumes->count; i++) { @@ -1535,7 +1535,7 @@ * See description. * */ -void on_volume_to_add_feature_to_button_clicked(GtkButton * button, gpointer user_data) +void on_volume_to_add_feature_to_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { GList *window_list; GtkCList *clist; @@ -1700,7 +1700,7 @@ * See description. * */ -void on_set_mount_options_button_clicked(GtkButton * button, GtkWidget * mount_window) +void on_set_mount_options_button_clicked(GtkButton * UNUSED(button), GtkWidget * mount_window) { GtkWidget *options_window; @@ -1889,7 +1889,7 @@ * See description. * */ -void on_mount_volume_button_clicked(GtkButton * button, gpointer user_data) +void on_mount_volume_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { int rc; gchar *mountpoint; @@ -1938,7 +1938,7 @@ * Selection list populated with volumes that can be mounted * */ -void on_mount_volume_clist_realize(GtkWidget * widget, gpointer user_data) +void on_mount_volume_clist_realize(GtkWidget * widget, gpointer UNUSED(user_data)) { populate_clist_for_mount_operation(GTK_CLIST(widget), MOUNT); } @@ -1958,7 +1958,7 @@ * See description. * */ -void on_mount_volume_popup_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_mount_volume_popup_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { GtkWidget *window; @@ -1985,7 +1985,7 @@ * See description. * */ -void on_unmount_volume_button_clicked(GtkButton * button, gpointer user_data) +void on_unmount_volume_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { int rc; GtkCList *clist; @@ -2019,7 +2019,7 @@ * See description. * */ -void on_unmount_volume_popup_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_unmount_volume_popup_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { GtkWidget *window; @@ -2049,7 +2049,7 @@ * Selection list populated with volumes that can be unmounted * */ -void on_unmount_volume_clist_realize(GtkWidget * widget, gpointer user_data) +void on_unmount_volume_clist_realize(GtkWidget * widget, gpointer UNUSED(user_data)) { populate_clist_for_mount_operation(GTK_CLIST(widget), UNMOUNT); } @@ -2069,7 +2069,7 @@ * See description. * */ -void on_remount_volume_button_clicked(GtkButton * button, gpointer user_data) +void on_remount_volume_button_clicked(GtkButton * UNUSED(button), gpointer UNUSED(user_data)) { } @@ -2088,7 +2088,7 @@ * See description. * */ -void on_remount_volume_popup_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_remount_volume_popup_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer UNUSED(user_data)) { } @@ -2108,7 +2108,7 @@ * Selection list populated with volumes that can be re-mounted * */ -void on_remount_volume_clist_realize(GtkWidget * widget, gpointer user_data) +void on_remount_volume_clist_realize(GtkWidget * widget, gpointer UNUSED(user_data)) { populate_clist_for_mount_operation(GTK_CLIST(widget), REMOUNT); } Index: create.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/gtk/create.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- create.c 3 Aug 2004 18:41:30 -0000 1.7 +++ create.c 23 Jan 2009 00:06:25 -0000 1.8 @@ -326,7 +326,7 @@ * Returns nothing. * */ -void on_create_from_freespace_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_create_from_freespace_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { plugin_handle_t plugin; object_handle_t handle = GPOINTER_TO_UINT(user_data); @@ -437,7 +437,7 @@ */ if (object->info.object.parent_objects == NULL || object->info.object.parent_objects->count == 0) { - gint i; + uint i; handle_array_t *plugins; plugins = get_all_feature_plugins_list(); @@ -673,7 +673,7 @@ * Returns nothing. * */ -void on_create_feature_object_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_create_feature_object_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { GtkWidget *window; Index: resize.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/gtk/resize.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- resize.c 4 Jan 2008 18:17:48 -0000 1.8 +++ resize.c 23 Jan 2009 00:06:25 -0000 1.9 @@ -130,7 +130,7 @@ log_error("%s: evms_get_shrink_points() returned error code %d.\n", __FUNCTION__, rc); } else { - gint i; + uint i; gboolean is_selected = (shrink_points->count == 1); set_resize_points_clist_properties(clist, EVMS_Task_Shrink); @@ -173,7 +173,7 @@ log_error("%s: evms_get_expand_points() returned error code %d.\n", __FUNCTION__, rc); } else { - gint i; + uint i; gboolean is_selected = (expand_points->count == 1); set_resize_points_clist_properties(clist, EVMS_Task_Expand); @@ -414,7 +414,7 @@ * This window is hidden and another standard selection window is displayed. * */ -void on_expand_point_selection_button_clicked(GtkButton * button, gpointer user_data) +void on_expand_point_selection_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { on_resize_point_selection_button_clicked(button, EVMS_Task_Expand); } @@ -437,7 +437,7 @@ * This window is hidden and another standard selection window is displayed. * */ -void on_shrink_point_selection_button_clicked(GtkButton * button, gpointer user_data) +void on_shrink_point_selection_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { on_resize_point_selection_button_clicked(button, EVMS_Task_Shrink); } @@ -628,7 +628,7 @@ void add_expandable_objects_to_selection_clist(GtkCList * clist, handle_array_t * objects, gboolean objects_are_volumes) { - gint i; + uint i; gint row; gboolean is_selected = (objects->count == 1); @@ -670,7 +670,7 @@ void add_shrinkable_objects_to_selection_clist(GtkCList * clist, handle_array_t * objects, gboolean objects_are_volumes) { - gint i; + uint i; gint row; gboolean is_selected = (objects->count == 1); @@ -706,7 +706,7 @@ * and this window is hidden. * */ -void on_expand_thing_button_clicked(GtkButton * button, gpointer user_data) +void on_expand_thing_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { on_resize_selection_button_clicked(button, EVMS_Task_Expand); } @@ -727,7 +727,7 @@ * The objects to consume are displayed. * */ -void on_expand_container_button_clicked(GtkButton * button, gpointer user_data) +void on_expand_container_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { on_resize_point_selection_button_clicked(button, EVMS_Task_Expand); } @@ -748,7 +748,7 @@ * The objects to consume are displayed. * */ -void on_shrink_container_button_clicked(GtkButton * button, gpointer user_data) +void on_shrink_container_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { on_resize_point_selection_button_clicked(button, EVMS_Task_Shrink); } @@ -770,7 +770,7 @@ * and this window is hidden. * */ -void on_shrink_thing_button_clicked(GtkButton * button, gpointer user_data) +void on_shrink_thing_button_clicked(GtkButton * button, gpointer UNUSED(user_data)) { on_resize_selection_button_clicked(button, EVMS_Task_Shrink); } @@ -874,7 +874,7 @@ * See description. * */ -void on_expand_thing_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_expand_thing_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { object_type_t type; @@ -945,7 +945,7 @@ * See description. * */ -void on_shrink_thing_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_shrink_thing_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { object_type_t type; Index: segment_cb.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/gtk/segment_cb.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- segment_cb.c 12 Nov 2003 20:44:01 -0000 1.3 +++ segment_cb.c 23 Jan 2009 00:06:25 -0000 1.4 @@ -4,16 +4,16 @@ * * 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 * * Module: segment_cb.c @@ -30,11 +30,11 @@ /* * * void on_segment_manager_clist_realize (GtkWidget *, gpointer) - * + * * Description: * This routine populates the given GtkCList with the list * of segments managers to choose from. - * + * * Entry: * widget - address of the selections GtkCList widget * user_data - contains task action code for action to use list @@ -54,22 +54,22 @@ /* * * void on_unassign_segment_manager_clist_realize (GtkWidget *, gpointer) - * + * * Description: * This routine populates the given GtkCList with the list * objects that have a segment manager assigned to them that * can have it removed. - * + * * Entry: * widget - address of the selections GtkCList widget * user_data - address of user data bound with signal (not used) * * Exit: - * Selection list populated with storage object that can have a + * Selection list populated with storage object that can have a * segment removed from them. * */ -void on_unassign_segment_manager_clist_realize(GtkWidget * widget, gpointer user_data) +void on_unassign_segment_manager_clist_realize(GtkWidget * widget, gpointer UNUSED(user_data)) { on_unassign_parent_plugin_clist_realize(widget, EVMS_SEGMENT_MANAGER); } Index: delete.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/gtk/delete.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- delete.c 12 Nov 2003 20:44:01 -0000 1.6 +++ delete.c 23 Jan 2009 00:06:25 -0000 1.7 @@ -4,16 +4,16 @@ * * 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 * * Module: delete.c @@ -34,10 +34,10 @@ * void on_deletion_window_clist_select_row (GtkCList *, gint, gint, GdkEventButton *, gpointer) * * Description: - * This routine is called whenever a row is selected. + * This routine is called whenever a row is selected. * All we do is ensure that the "Delete" and "Recursive Delete" * buttons are sensitive to allow the operation to be initiated. - * + * * Entry: * clist - address of GtkCList object that received select-row signal * row - index of row selected @@ -49,8 +49,8 @@ * Returns nothing. * */ -void on_deletion_window_clist_select_row(GtkCList * clist, gint row, gint column, - GdkEventButton * event, gpointer user_data) +void on_deletion_window_clist_select_row(GtkCList * clist, gint UNUSED(row), gint UNUSED(column), + GdkEventButton * UNUSED(event), gpointer UNUSED(user_data)) { GtkWidget *delete_button = lookup_widget(GTK_WIDGET(clist), "selection_window_next_button"); GtkWidget *recursive_delete_button = @@ -70,11 +70,11 @@ * void on_deletion_window_clist_unselect_row (GtkCList *, gint, gint, GdkEventButton *, gpointer) * * Description: - * This routine is called whenever a row is unselected. + * This routine is called whenever a row is unselected. * All we do is ensure that the "Delete" and "Recursive Delete" - * buttons are not sensitive to disallow the operation from being + * buttons are not sensitive to disallow the operation from being * initiated until a choice is made. - * + * * Entry: * clist - address of GtkCList object that received unselect-row signal * row - index of row deselected @@ -86,8 +86,8 @@ * Returns nothing. * */ -void on_deletion_window_clist_unselect_row(GtkCList * clist, gint row, gint column, - GdkEventButton * event, gpointer user_data) +void on_deletion_window_clist_unselect_row(GtkCList * clist, gint UNUSED(row), gint UNUSED(column), + GdkEventButton * UNUSED(event), gpointer UNUSED(user_data)) { GtkWidget *delete_button = lookup_widget(GTK_WIDGET(clist), "selection_window_next_button"); GtkWidget *recursive_delete_button = @@ -110,7 +110,7 @@ * This creates the window used for deleting "things". It makes some minor * modifications to a standard selection window to reuse the "Prev" button * to mean "Recursive Delete". - * + * * Entry: * title - the text for the window title * clist_realize_handler - the handler to populate the selection list @@ -178,11 +178,11 @@ /* * * inline static void get_delete_result_messages (gboolean, object_type_t, gchar **, gchar **) - * + * * Description: * This routine returns the messages displayed to the user as the * result of a delete operation. - * + * * Entry: * recursive - TRUE if recursive delete * type - the object type being deleted @@ -190,7 +190,7 @@ * success_msg - address of string to point to success message * * Exit: - * + * * */ inline static void get_delete_result_messages(gboolean recursive, object_type_t type, @@ -237,17 +237,17 @@ * void delete_thing_button_clicked (GtkButton *, gboolean, object_type_t) * * Description: - * This routine initiates a single or recursive delete using the handle of the - * objects associated with rows selected. It then creates and + * This routine initiates a single or recursive delete using the handle of the + * objects associated with rows selected. It then creates and * displays the results popup which destroys both windows when dismissed. - * + * * Entry: * button - address of the GtkButton widget * recursive - TRUE if recursive delete wanted * type - the type of thing to delete (volume, container, storage object) * * Exit: - * Deletes one or more things and results window is displayed + * Deletes one or more things and results window is displayed * */ void delete_thing_button_clicked(GtkButton * button, gboolean recursive, object_type_t type) @@ -341,10 +341,10 @@ * Description: * This routine initiates the deletion of a thing. It uses the * handle of the object associated with the selected rows. - * + * * Entry: * button - address of the GtkButton widget - * user_data - + * user_data - * * Exit: * See description. @@ -361,12 +361,12 @@ * * Description: * This routine initiates the deletion of a thing and its deletable - * children. It uses the handle of the object associated with the + * children. It uses the handle of the object associated with the * selected rows. - * + * * Entry: * button - address of the GtkButton widget - * user_data - + * user_data - * * Exit: * See description. @@ -380,11 +380,11 @@ /* * * void on_delete_thing_clist_realize (GtkWidget *, gpointer) - * + * * Description: * This routine populates the given GtkCList with the list * of things that can be used on a delete operation. - * + * * Entry: * widget - address of the selections GtkCList widget * user_data - type of thing to delete (volume, container, object) @@ -446,10 +446,10 @@ * * Description: * This routine handles initiating the destruction of a "thing". - * The handle to the thing is received as the user data. We - * select the proper messages for the results screen and invoke + * The handle to the thing is received as the user data. We + * select the proper messages for the results screen and invoke * the routine that actually delete the thing. - * + * * Entry: * button - address of the GtkButton widget * user_data - object handle @@ -472,11 +472,11 @@ * * Description: * This routine handles initiating the destruction of a "thing" - * and all its deletable children. The handle to the thing + * and all its deletable children. The handle to the thing * to start with is received as the user data. We select the - * proper messages for the results screen and invoke + * proper messages for the results screen and invoke * the routine that actually delete the thing and the children. - * + * * Entry: * button - address of the GtkButton widget * user_data - object handle @@ -500,7 +500,7 @@ * Description: * This routine will display the thing we intend to delete and * allow the user to confirm the deletion of the thing. - * + * * Entry: * menuitem - the menuitem that initiated the action * user_data - object handle @@ -509,7 +509,7 @@ * See description. * */ -void on_delete_thing_menu_item_activate(GtkMenuItem * menuitem, gpointer user_data) +void on_delete_thing_menu_item_activate(GtkMenuItem * UNUSED(menuitem), gpointer user_data) { object_type_t type; Index: activation.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/gtk/activation.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- activation.c 8 Jun 2004 19:02:47 -0000 1.3 +++ activation.c 23 Jan 2009 00:06:25 -0000 1.4 @@ -49,8 +49,8 @@ * Returns... [truncated message content] |
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] |
From: Steve D. <ste...@us...> - 2009-01-21 00:59:22
|
Update of /cvsroot/evms/evms2/engine/ui/ncurses In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31403 Modified Files: task.c Log Message: In update_selected_objects() the count parameter is not used. It should be updated to remove the the number of declined objects, if any. Index: task.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/ui/ncurses/task.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- task.c 4 Jan 2008 18:17:50 -0000 1.7 +++ task.c 21 Jan 2009 00:59:16 -0000 1.8 @@ -971,6 +971,7 @@ display_declination_window(declined_list); log_warning("%s: Some of the object selections were declined.\n", __FUNCTION__); + *count -= declined_list->count; evms_free(declined_list); } sched_clist_idle_func(clist, (clist_idle_func)reload_acceptable_objects); |
From: Steve D. <ste...@us...> - 2009-01-19 22:58:56
|
Update of /cvsroot/evms/evms2/engine/plugins/xfs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21389 Modified Files: fs_xfs.c fsimxfs.c Log Message: Cleanup compiler warnings. Added bonus: My editor cleans up trailing whitespace. Index: fs_xfs.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/xfs/fs_xfs.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- fs_xfs.c 4 Jan 2008 18:17:47 -0000 1.47 +++ fs_xfs.c 19 Jan 2009 22:58:51 -0000 1.48 @@ -377,7 +377,7 @@ * to new_size, set new_size to the new_size of the filesystem. **/ static int xfs_expand(logical_volume_t * volume, - sector_count_t * new_size) + sector_count_t * UNUSED(new_size)) { char * argv[3]; char * buffer; @@ -508,9 +508,9 @@ * * Shrinking XFS filesystems is not currently supported. */ -static int xfs_shrink(logical_volume_t * volume, - sector_count_t requested_size, - sector_count_t * new_size) +static int xfs_shrink(logical_volume_t * UNUSED(volume), + sector_count_t UNUSED(requested_size), + sector_count_t * UNUSED(new_size)) { LOG_ENTRY(); LOG_EXIT_INT(ENOSYS); @@ -526,7 +526,7 @@ static int xfs_mkfs_setup(logical_volume_t * volume, option_array_t * options) { - int i; + uint i; char * ext_log_vol = NULL; list_anchor_t avail_ext_logs; list_element_t logs_list_iter; @@ -719,7 +719,8 @@ logical_volume_t * vol; list_anchor_t global_volumes; list_element_t vol_list_iter; - int rc, i, count; + int rc; + u_int i, count; LOG_ENTRY(); @@ -851,7 +852,7 @@ context->option_descriptors->count = 0; switch (context->action) { - + case EVMS_Task_mkfs: rc = fs_init_mkfs_acceptable_objects(context); @@ -1007,7 +1008,7 @@ static int xfs_set_option(task_context_t * context, u_int32_t index, value_t * value, - task_effect_t * effect) + task_effect_t * UNUSED(effect)) { option_descriptor_t * option = context->option_descriptors->option; int rc = 0; @@ -1015,10 +1016,10 @@ LOG_ENTRY(); switch (context->action) { - + case EVMS_Task_mkfs: switch (index) { - + case MKFS_SETVOL_INDEX: strncpy(option[index].value.s, value->s, LV_NAME_SIZE); break; @@ -1042,7 +1043,7 @@ case EVMS_Task_fsck: switch (index) { - + case FSCK_READONLY_INDEX: option[index].value.b = value->b; break; @@ -1080,7 +1081,7 @@ * settings have changed. **/ static int xfs_set_volumes(task_context_t * context, - list_anchor_t declined_volumes, + list_anchor_t UNUSED(declined_volumes), task_effect_t * effect) { logical_volume_t * vol; @@ -1362,7 +1363,7 @@ * * Returns Plugin specific information. **/ -static int xfs_get_plugin_info(char * descriptor_name, +static int xfs_get_plugin_info(char * UNUSED(descriptor_name), extended_info_array_t ** info) { extended_info_array_t * Info; @@ -1468,8 +1469,8 @@ * * How much can file system shrink? Currently unsupported in XFS. **/ -static int xfs_can_shrink_by(logical_volume_t * volume, - sector_count_t * delta) +static int xfs_can_shrink_by(logical_volume_t * UNUSED(volume), + sector_count_t * UNUSED(delta)) { LOG_ENTRY(); LOG_EXIT_INT(ENOSYS); Index: fsimxfs.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/xfs/fsimxfs.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- fsimxfs.c 6 Oct 2004 20:47:57 -0000 1.20 +++ fsimxfs.c 19 Jan 2009 22:58:51 -0000 1.21 @@ -47,8 +47,8 @@ */ static int rw_diskblocks(logical_volume_t * volume, int fd, - int64_t start, - int32_t count, + u_int64_t start, + u_int32_t count, void * buffer, int mode) { @@ -117,7 +117,7 @@ memset(xfs_vol->log_sb, 0, sizeof(xlog_rec_header_t)); fd2 = EngFncs->open_volume(volume, O_RDWR|O_EXCL, 0); if (fd2 < 0) { - rw_diskblocks(volume, fd2, XFS_SUPER1_OFF, + rw_diskblocks(volume, fd2, XFS_SUPER1_OFF, SIZE_OF_SUPER, xfs_vol->log_sb, PUT); EngFncs->close_volume(volume, fd2); } @@ -157,7 +157,8 @@ char ** argv, logical_volume_t * volume) { - int rc, i = 0, opt_count = 0; + int rc; + uint i = 0, opt_count = 0; char buffer[EVMS_VOLUME_NAME_SIZE + 10]; LOG_ENTRY(); @@ -318,7 +319,8 @@ char ** argv, logical_volume_t * volume) { - int rc, i = 0, opt_count = 0; + int rc; + uint i = 0, opt_count = 0; xfs_volume_t * xfs_vol = volume->private_data; LOG_ENTRY(); @@ -593,7 +595,8 @@ char * buffer, * buf_ptr; int fds2[2]; int status, bytes_read; - int ver_string_size, rc; + uint ver_string_size; + int rc; LOG_ENTRY(); |
From: Steve D. <ste...@us...> - 2009-01-19 22:57:31
|
Update of /cvsroot/evms/evms2/engine/plugins/swap In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21237 Modified Files: swapfs.c swapfs.h Log Message: Cleanup compiler warnings. Index: swapfs.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/swap/swapfs.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- swapfs.c 26 Aug 2008 06:46:17 -0000 1.51 +++ swapfs.c 19 Jan 2009 22:57:27 -0000 1.52 @@ -90,7 +90,7 @@ static void set_mkfs_options(option_array_t *options, char **argv, char *vol_name) { - int i, opt_count = 1; + uint i, opt_count = 1; LOG_ENTRY(); @@ -477,7 +477,7 @@ * * The swap FSIM has no private data attached to the volume. **/ -static int swap_discard(logical_volume_t *volume) +static int swap_discard(logical_volume_t * UNUSED(volume)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -556,7 +556,7 @@ * shrunk exactly to new_size, set new_size to the new_size of the filesystem. */ static int swap_shrink(logical_volume_t *volume, - sector_count_t requested_size, + sector_count_t UNUSED(requested_size), sector_count_t *new_size) { int rc; @@ -833,7 +833,7 @@ /* If priority option is "Low"...*/ if (strcasecmp(context->option_descriptors->option[SWAP_ON_PRIORITY_INDEX].value.s, context->option_descriptors->option[SWAP_ON_PRIORITY_INDEX].constraint.list->value[0].s)) { - + /* Set priority option to "High". */ strcpy(context->option_descriptors->option[SWAP_ON_PRIORITY_INDEX].value.s, context->option_descriptors->option[SWAP_ON_PRIORITY_INDEX].constraint.list->value[1].s); @@ -872,8 +872,8 @@ * Validate the volumes in the selected_objects list in the task context. **/ static int swap_set_volumes(task_context_t *context, - list_anchor_t declined_volumes, - task_effect_t *effect) + list_anchor_t UNUSED(declined_volumes), + task_effect_t * UNUSED(effect)) { logical_volume_t *vol; int rc = 0; @@ -914,7 +914,7 @@ * * Display info about the swap plugin. **/ -static int swap_get_plugin_info(char *descriptor_name, +static int swap_get_plugin_info(char * UNUSED(descriptor_name), extended_info_array_t **info) { extended_info_array_t *Info; @@ -1052,12 +1052,12 @@ */ static int swap_plugin_function(logical_volume_t * volume, task_action_t action, - list_anchor_t objects, + list_anchor_t UNUSED(objects), option_array_t * options) { int status; int rc = 0; - int i; + uint i; int priority = 0; LOG_ENTRY(); Index: swapfs.h =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/swap/swapfs.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- swapfs.h 26 Aug 2008 06:46:18 -0000 1.13 +++ swapfs.h 19 Jan 2009 22:57:27 -0000 1.14 @@ -47,8 +47,8 @@ #define PUT 1 #define SWAPFS_MAGIC_STRING "SWAP_SPACE" #define SWAPFS_MAGIC_STRING2 "SWAPSPACE2" -#define SWAPFS_MIN_SIZE (sysconf(_SC_PAGESIZE) / EVMS_VSECTOR_SIZE * 10) -#define SWAP_MAGIC_OFFSET_IN_BYTES (sysconf(_SC_PAGESIZE) - 10) /* last 10 bytes of first page */ +#define SWAPFS_MIN_SIZE (sector_count_t)(sysconf(_SC_PAGESIZE) / EVMS_VSECTOR_SIZE * 10) +#define SWAP_MAGIC_OFFSET_IN_BYTES (sector_count_t)(sysconf(_SC_PAGESIZE) - 10) /* last 10 bytes of first page */ #define EVMS_Task_swapon EVMS_Task_Plugin_Function + 1 #define EVMS_Task_swapoff EVMS_Task_Plugin_Function + 2 |
From: Steve D. <ste...@us...> - 2009-01-19 22:56:29
|
Update of /cvsroot/evms/evms2/engine/plugins/snapshot In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21080 Modified Files: snap_options.c snap_rollback.c snapshot.c Log Message: Cleanup compiler warnings. Index: snap_options.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/snapshot/snap_options.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- snap_options.c 22 Sep 2004 22:37:12 -0000 1.22 +++ snap_options.c 19 Jan 2009 22:56:24 -0000 1.23 @@ -69,7 +69,7 @@ u_int32_t * chunk_size, int * writeable) { - int i; + uint i; LOG_ENTRY(); @@ -332,11 +332,12 @@ int set_option_create(task_context_t * context, u_int32_t index, value_t * value, - task_effect_t * effect) + task_effect_t * UNUSED(effect)) { option_desc_array_t * od = context->option_descriptors; storage_object_t * snap_child; - int i, rc = EINVAL; + u_int i; + int rc = EINVAL; LOG_ENTRY(); @@ -409,8 +410,8 @@ * Validate the selected objects for a create task. **/ int set_objects_create(task_context_t * context, - list_anchor_t declined_objects, - task_effect_t * effect) + list_anchor_t UNUSED(declined_objects), + task_effect_t * UNUSED(effect)) { option_desc_array_t * oda = context->option_descriptors; option_descriptor_t * od = &(oda->option[SNAP_OPTION_ORG_VOLUME_INDEX]); Index: snap_rollback.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/snapshot/snap_rollback.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- snap_rollback.c 24 Nov 2004 22:09:23 -0000 1.13 +++ snap_rollback.c 19 Jan 2009 22:56:24 -0000 1.14 @@ -164,8 +164,7 @@ /** * end_rollback_progress **/ -static void end_rollback_progress(snapshot_volume_t * snap_volume, - progress_t * progress) +static void end_rollback_progress(progress_t * progress) { LOG_ENTRY(); @@ -380,7 +379,7 @@ } out: - end_rollback_progress(snap_volume, rollback_progress); + end_rollback_progress(rollback_progress); EngFncs->engine_free(table); LOG_EXIT_INT(rc); return rc; Index: snapshot.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/snapshot/snapshot.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- snapshot.c 22 Feb 2006 20:21:25 -0000 1.90 +++ snapshot.c 19 Jan 2009 22:56:24 -0000 1.91 @@ -136,7 +136,7 @@ * the same amount. Origin volumes cannot expand at this time. **/ static int snap_can_expand_by(storage_object_t * object, - sector_count_t * size) + sector_count_t * UNUSED(size)) { snapshot_volume_t * volume = object->private_data; int rc = EINVAL; @@ -187,7 +187,7 @@ **/ static int snap_discover(list_anchor_t input_objects, list_anchor_t output_objects, - boolean final_call) + boolean UNUSED(final_call)) { storage_object_t * org_child, * snap_child; snapshot_volume_t * org_volume, * snap_volume = NULL; @@ -629,9 +629,9 @@ * * We don't really expect to get called on this API. **/ -static int snap_add_sectors_to_kill_list(storage_object_t * object, - lsn_t lsn, - sector_count_t count) +static int snap_add_sectors_to_kill_list(storage_object_t * UNUSED(object), + lsn_t UNUSED(lsn), + sector_count_t UNUSED(count)) { LOG_ENTRY(); LOG_WARNING("WARNING!!! Called for Kill-Sectors!\n"); @@ -700,14 +700,14 @@ return rc; } -static int snap_can_activate(storage_object_t * object) +static int snap_can_activate(storage_object_t * UNUSED(object)) { LOG_ENTRY(); LOG_EXIT_INT(0); return 0; } -static int snap_can_deactivate(storage_object_t * object) +static int snap_can_deactivate(storage_object_t * UNUSED(object)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -1223,10 +1223,10 @@ * These writes would essentially be "around" the snapshot kernel code, and * thus not actually be snapshotted. **/ -static int snap_write(storage_object_t * object, - lsn_t lsn, - sector_count_t count, - void * buffer) +static int snap_write(storage_object_t * UNUSED(object), + lsn_t UNUSED(lsn), + sector_count_t UNUSED(count), + void * UNUSED(buffer)) { LOG_ENTRY(); LOG_ERROR("No writing to snapshot or origin volumes within the engine!\n"); @@ -1358,8 +1358,8 @@ **/ static int snap_plugin_function(storage_object_t * object, task_action_t action, - list_anchor_t objects, - option_array_t * options) + list_anchor_t UNUSED(objects), + option_array_t * UNUSED(options)) { snapshot_volume_t * volume = object->private_data; char * reset_choices[3] = { _("Reset"), _("Don't Reset"), NULL }; |
From: Steve D. <ste...@us...> - 2009-01-16 23:18:49
|
Update of /cvsroot/evms/evms2/engine/plugins/multipath In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12578 Modified Files: mp_daemon.c mp_lvm.c multipath.c Log Message: Cleanup compiler warnings. Index: multipath.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/multipath/multipath.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- multipath.c 16 Jun 2005 16:53:53 -0000 1.15 +++ multipath.c 16 Jan 2009 22:34:27 -0000 1.16 @@ -115,7 +115,7 @@ /** * multipath_can_delete **/ -static int multipath_can_delete(storage_object_t *object) +static int multipath_can_delete(storage_object_t * UNUSED(object)) { LOG_ENTRY(); @@ -128,7 +128,7 @@ * * Just like can_delete(). **/ -static int multipath_can_unassign(storage_object_t *object) +static int multipath_can_unassign(storage_object_t * UNUSED(object)) { LOG_ENTRY(); @@ -142,7 +142,7 @@ * We aren't yet going to support volumes directly on MP objects, since * we're initially targetting this for LVM MP-PVs. **/ -static int multipath_can_set_volume(storage_object_t *object, boolean flag) +static int multipath_can_set_volume(storage_object_t * UNUSED(object), boolean UNUSED(flag)) { LOG_ENTRY(); @@ -288,7 +288,7 @@ * * Don't support unassign yet. **/ -static int multipath_unassign(storage_object_t *object) +static int multipath_unassign(storage_object_t * UNUSED(object)) { LOG_ENTRY(); @@ -323,8 +323,8 @@ * * Nothing to do yet for commit, since we don't yet have any metadata. **/ -static int multipath_commit_changes(storage_object_t *object, - commit_phase_t phase) +static int multipath_commit_changes(storage_object_t * UNUSED(object), + commit_phase_t UNUSED(phase)) { LOG_ENTRY(); @@ -337,7 +337,7 @@ * * Multipath segments can always be activated. **/ -static int multipath_can_activate(storage_object_t *object) +static int multipath_can_activate(storage_object_t * UNUSED(object)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -382,7 +382,7 @@ * * Multipath segments can always be deactivated. **/ -static int multipath_can_deactivate(storage_object_t *object) +static int multipath_can_deactivate(storage_object_t * UNUSED(object)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -452,9 +452,9 @@ * * OPTIONAL **/ -static int multipath_get_info(storage_object_t *object, - char *info_name, - extended_info_array_t **info) +static int multipath_get_info(storage_object_t * UNUSED(object), + char * UNUSED(info_name), + extended_info_array_t ** UNUSED(info)) { LOG_ENTRY(); @@ -494,8 +494,8 @@ * * OPTIONAL **/ -static int multipath_get_plugin_info(char *info_name, - extended_info_array_t **info) +static int multipath_get_plugin_info(char * UNUSED(info_name), + extended_info_array_t ** UNUSED(info)) { LOG_ENTRY(); @@ -552,7 +552,7 @@ * * Nothing to do yet for backup, since we don't yet have any metadata. **/ -static int multipath_backup_metadata(storage_object_t *object) +static int multipath_backup_metadata(storage_object_t * UNUSED(object)) { LOG_ENTRY(); Index: mp_lvm.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/multipath/mp_lvm.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- mp_lvm.c 25 May 2005 21:45:01 -0000 1.14 +++ mp_lvm.c 16 Jan 2009 22:34:27 -0000 1.15 @@ -126,7 +126,7 @@ rc = ENOMEM; goto out; } - + /* Read the first sector. */ rc = READ(object, bytes_to_sectors(LVM_PV_DISK_BASE), bytes_to_sectors(LVM_PV_DISK_SIZE), pv_buffer); @@ -254,7 +254,7 @@ dm_priority_group_t *pg = &mp->group[0]; char device[25]; char *dev, active; - int i, fail_count; + u_int32_t i, fail_count; LOG_ENTRY(); @@ -286,9 +286,10 @@ dm_priority_group_t *pg = &mp->group[0]; storage_object_t *child; list_element_t itr; - int num_paths = EngFncs->list_count(object->child_objects); - int matched_paths = 0, active_paths = 0; - int found, i, rc = EINVAL; + uint num_paths = EngFncs->list_count(object->child_objects); + uint matched_paths = 0, active_paths = 0; + u_int32_t i; + int found, rc = EINVAL; LOG_ENTRY(); @@ -469,7 +470,7 @@ * LVM has no extra private data. It attaches the PV structs to the * consuming-private-data of the child objects. **/ -int mp_lvm_allocate(storage_object_t *object) +int mp_lvm_allocate(storage_object_t * UNUSED(object)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -521,7 +522,7 @@ * * Always select the first object on the child list. No extra offsets. **/ -int mp_lvm_map(storage_object_t **object, lsn_t *lsn, sector_count_t *count) +int mp_lvm_map(storage_object_t **object, lsn_t * UNUSED(lsn), sector_count_t * UNUSED(count)) { storage_object_t *child; int rc = EIO; Index: mp_daemon.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/multipath/mp_daemon.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- mp_daemon.c 29 Jul 2004 21:24:41 -0000 1.11 +++ mp_daemon.c 16 Jan 2009 22:34:27 -0000 1.12 @@ -129,7 +129,7 @@ #endif argv[i++] = object->name; argv[i++] = object_size; - + LIST_FOR_EACH(object->child_objects, itr, child) { argv[i++] = child->name; } @@ -223,7 +223,7 @@ return rc; } -static int globerror(const char *path, int error) +static int globerror(const char * UNUSED(path), int UNUSED(error)) { return 0; } @@ -266,7 +266,8 @@ list_anchor_t objects; list_element_t itr; char lock_file_name[256]; - int i, rc; + size_t i; + int rc; LOG_ENTRY(); @@ -351,7 +352,7 @@ void cleanup_stale_daemons(void) { glob_t result; - int i; + size_t i; LOG_ENTRY(); |
From: Steve D. <ste...@us...> - 2009-01-16 23:18:28
|
Update of /cvsroot/evms/evms2/engine/plugins/ntfs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12919 Modified Files: ntfsfsim.c utils.c Log Message: Cleanup compiler warnings. Added bonus: My editor cleans up trailing whitespace. Index: ntfsfsim.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/ntfs/ntfsfsim.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ntfsfsim.c 10 Oct 2005 14:45:53 -0000 1.13 +++ ntfsfsim.c 16 Jan 2009 22:36:14 -0000 1.14 @@ -203,7 +203,7 @@ /* * Can fsck this volume? */ -static int ntfs_can_fsck(logical_volume_t * volume) { +static int ntfs_can_fsck(logical_volume_t * UNUSED(volume)) { LOG_ENTRY(); @@ -291,7 +291,7 @@ } min_fs_size = get_min_fs_size(volume); - + if (min_fs_size >= volume->vol_size) { /* No room to shrink. */ LOG_DETAILS("Volume %s has no room to shrink.\n", volume->name); @@ -333,7 +333,7 @@ sector_count_t * min_size, sector_count_t * max_volume_size, sector_count_t * max_object_size) { - + private_data_t * pd = volume->private_data; LOG_ENTRY(); @@ -362,7 +362,7 @@ * volume for an external log. */ static int ntfs_mkfs_setup(logical_volume_t * volume, - option_array_t * options) { + option_array_t * UNUSED(options)) { int rc = 0; @@ -394,8 +394,8 @@ static void set_ntfs_mkfs_options(option_array_t * options, char * * argv, logical_volume_t * volume) { - - int i; + + uint i; int bufsize; int opt_count; char *buf; @@ -430,7 +430,7 @@ } switch (options->option[i].number) { - + case MKFS_LABEL_INDEX: if (options->option[i].value.s != NULL) { argv[opt_count++] = "-L"; @@ -520,7 +520,7 @@ * Put the file system on the volume. */ static int ntfs_mkfs(logical_volume_t * volume, option_array_t * options) { - + int rc = 0; char * argv[MKFS_OPTIONS_STRING_COUNT + 3]; pid_t pidm; @@ -596,7 +596,7 @@ } EngFncs->engine_free(buffer); - + close(fds[0]); close(fds[1]); @@ -662,7 +662,7 @@ * data structures you may have associated with it. */ static int ntfs_discard(logical_volume_t * volume) { - + LOG_ENTRY(); if (volume->private_data) { @@ -806,7 +806,7 @@ * Return the total number of supported options for the specified task. */ static int ntfs_get_option_count(task_context_t * context) { - + int count = 0; LOG_ENTRY(); @@ -833,7 +833,7 @@ * adding them to the acceptable objects list. */ static int init_mkfs_acceptable_objects(task_context_t * context) { - + int rc; list_anchor_t global_volumes; list_element_t vol_list_iter; @@ -908,7 +908,7 @@ */ static int init_ntfsclone_target_list(logical_volume_t * source, value_list_t * * list) { - + int rc; list_anchor_t volume_list; list_element_t iter1; @@ -978,7 +978,7 @@ } switch (context->action) { - + case EVMS_Task_mkfs: rc = init_mkfs_acceptable_objects(context); if (rc) { @@ -1136,7 +1136,7 @@ } switch (context->action) { - + case EVMS_Task_mkfs: switch (index) { case MKFS_LABEL_INDEX: @@ -1217,7 +1217,7 @@ */ static int ntfs_set_volumes(task_context_t * context, list_anchor_t declined_volumes, /* of type declined_handle_t */ - task_effect_t * effect) { + task_effect_t * UNUSED(effect)) { int rc; list_element_t iter1; list_element_t iter2; @@ -1416,7 +1416,7 @@ * Return Plug-in specific information. */ static int ntfs_get_plugin_info(char * descriptor_name, extended_info_array_t * * info) { - + int rc = EINVAL; extended_info_array_t * Info; char version_string[64]; @@ -1689,12 +1689,12 @@ */ int ntfs_plugin_function(logical_volume_t * volume, task_action_t action, - list_anchor_t objects, + list_anchor_t UNUSED(objects), option_array_t * options) { int rc = 0; private_data_t * pd = (private_data_t *) volume->private_data; - int i; + uint i; logical_volume_t * target = NULL; private_data_t * target_pd; @@ -1709,7 +1709,7 @@ switch (action) { case EVMS_Task_ntfsfix: pd->flags |= PDFLAG_RUN_NTFSFIX; - + /* Call me at commit time. */ volume->flags |= VOLFLAG_DIRTY; break; @@ -1726,7 +1726,7 @@ option->number = NTFSCLONE_FORCE_INDEX; } } - + switch (option->number) { case NTFSCLONE_TARGET_INDEX: target = find_volume(option->value.s); @@ -1741,7 +1741,7 @@ } } - if (target != NULL) { + if (target != NULL) { /* Claim the target volume.*/ rc = EngFncs->assign_fsim_to_volume(my_plugin_record, target); if (rc == 0) { Index: utils.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/ntfs/utils.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- utils.c 23 May 2006 22:34:13 -0000 1.5 +++ utils.c 16 Jan 2009 22:36:14 -0000 1.6 @@ -108,7 +108,7 @@ * If the checksum field is zero, then there is no checksum to validate.. */ if (boot_sector->checksum != 0) { - int sum; + u_int32_t sum; u_int32_t * p_32; for (sum = 0, p_32 = (u_int32_t *) boot_sector; |
From: Steve D. <ste...@us...> - 2009-01-16 23:17:48
|
Update of /cvsroot/evms/evms2/engine/plugins/ocfs2 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13207 Modified Files: ocfs2.c Log Message: Cleanup compiler warnings. Added bonus: My editor cleans up trailing whitespace. Index: ocfs2.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/ocfs2/ocfs2.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ocfs2.c 14 Aug 2008 23:10:34 -0000 1.3 +++ ocfs2.c 16 Jan 2009 22:42:14 -0000 1.4 @@ -35,7 +35,7 @@ * functions prototypes ****************************************************************************/ static int fsim_rw_diskblocks(logical_volume_t *volume, int dev_ptr, - u_int64_t disk_offset, int32_t disk_count, + u_int64_t disk_offset, u_int32_t disk_count, void *data_buffer, int mode); static void fsim_set_mkfs_options(option_array_t *options, char **argv, char *vol_name); @@ -260,7 +260,7 @@ char *vol_name) { int opt_count = 0; - int i; + uint i; LOG_ENTRY(); @@ -406,7 +406,7 @@ * argv * *****************************************************************************/ -static void fsim_set_fsck_options(option_array_t *options, +static void fsim_set_fsck_options(option_array_t * UNUSED(options), char **argv, logical_volume_t *volume) { @@ -495,7 +495,7 @@ } EngFncs->close_volume(volume, fd); - + LOG_EXIT_INT(rc); return rc; } @@ -577,7 +577,7 @@ static int fsim_rw_diskblocks(logical_volume_t *volume, int dev_ptr, u_int64_t disk_offset, - int32_t disk_count, + u_int32_t disk_count, void *data_buffer, int mode) { @@ -874,7 +874,7 @@ * * PARAMETERS: * volume - * + * * RETURNS: * (0) for success * @@ -1257,7 +1257,7 @@ LOG_ENTRY(); switch (context->action) { - + case EVMS_Task_mkfs: if (oc2_version < 2) { @@ -1411,10 +1411,10 @@ } switch (context->action) { - + case EVMS_Task_mkfs: switch (index) { - + case MKFS_VERSION_INDEX: /* User typed over version field option set? * Ignore and reload from the option descriptor. @@ -1439,7 +1439,7 @@ case EVMS_Task_fsck: switch (index) { - + case FSCK_MODE_INDEX: /* If mounted, only allow read-only */ if (EngFncs->is_mounted(context->volume->dev_node, NULL)) { @@ -1502,8 +1502,8 @@ * *****************************************************************************/ static int oc2_set_volumes(task_context_t *context, - list_anchor_t declined_volumes, - task_effect_t *effect) + list_anchor_t UNUSED(declined_volumes), + task_effect_t * UNUSED(effect)) { int rc = 0; logical_volume_t *vol; |
From: Steve D. <ste...@us...> - 2009-01-16 22:51:31
|
Update of /cvsroot/evms/evms2/engine/plugins/replace In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13611 Modified Files: replace.c Log Message: Cleanup compler warnings. Added bonus: My editor cleans up trailing whitespace. Index: replace.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/replace/replace.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- replace.c 22 Jun 2005 21:59:50 -0000 1.61 +++ replace.c 16 Jan 2009 22:51:28 -0000 1.62 @@ -130,9 +130,9 @@ * * Function not supported yet. */ -static int rep_can_replace_child(storage_object_t * obj, - storage_object_t * child, - storage_object_t * new_child) { +static int rep_can_replace_child(storage_object_t * UNUSED(obj), + storage_object_t * UNUSED(child), + storage_object_t * UNUSED(new_child)) { LOG_ENTRY(); LOG_EXIT_INT(ENOSYS); @@ -404,7 +404,7 @@ } -static void find_replace_dm_devices(list_anchor_t result_list) { +static void find_replace_dm_devices(list_anchor_t UNUSED(result_list)) { dm_device_list_t * device_list = NULL; dm_device_list_t * device; @@ -799,7 +799,7 @@ * Create a new replace object using the specified objects. */ static int rep_create(list_anchor_t objects, - option_array_t * options, + option_array_t * UNUSED(options), list_anchor_t new_obj_list) { int rc = 0; @@ -867,7 +867,7 @@ * * We don't expect the replace plugin to ever be called for discard. */ -static int rep_discard(list_anchor_t objects) { +static int rep_discard(list_anchor_t UNUSED(objects)) { LOG_ENTRY(); LOG_EXIT_INT(ENOSYS); return ENOSYS; @@ -914,9 +914,9 @@ /* * rep_replace_child */ -static int rep_replace_child(storage_object_t * obj, - storage_object_t * child, - storage_object_t * new_child) { +static int rep_replace_child(storage_object_t * UNUSED(obj), + storage_object_t * UNUSED(child), + storage_object_t * UNUSED(new_child)) { LOG_ENTRY(); LOG_EXIT_INT(ENOSYS); return(ENOSYS); @@ -1152,7 +1152,7 @@ * Any existing replace object will be activated. Asking if it can be * activated is redundant. */ -static int rep_can_activate(storage_object_t * obj) { +static int rep_can_activate(storage_object_t * UNUSED(obj)) { LOG_ENTRY(); @@ -1212,7 +1212,7 @@ * * Repalce objects cannot be deactivated by the user. */ -static int rep_can_deactivate(storage_object_t * obj) { +static int rep_can_deactivate(storage_object_t * UNUSED(obj)) { LOG_ENTRY(); @@ -1291,7 +1291,7 @@ } switch (context->action) { - + case EVMS_Task_Create: /* No options for create. */ context->option_descriptors->count = 0; @@ -1331,7 +1331,7 @@ * options as appropriate. */ static int rep_set_option(task_context_t * context, - u_int32_t index, + u_int32_t UNUSED(index), value_t * value, task_effect_t * effect) { int rc = 0; @@ -1344,7 +1344,7 @@ } switch (context->action) { - + case EVMS_Task_Create: break; @@ -1377,7 +1377,7 @@ } switch (context->action) { - + case EVMS_Task_Create: // Assume front end has selected valid objects from the // acceptable_objects list. Could add safety checking. @@ -1677,7 +1677,7 @@ * * This stub is here for completeness and to document the above. */ -static int rep_backup_metadata(storage_object_t * object) { +static int rep_backup_metadata(storage_object_t * UNUSED(object)) { LOG_ENTRY(); |
From: Steve D. <ste...@us...> - 2009-01-16 22:49:42
|
Update of /cvsroot/evms/evms2/engine/plugins/reiser In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13524 Modified Files: reiserfs.c Log Message: Cleanup compiler warnings. Index: reiserfs.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/reiser/reiserfs.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- reiserfs.c 22 Feb 2006 16:05:18 -0000 1.56 +++ reiserfs.c 16 Jan 2009 22:49:37 -0000 1.57 @@ -31,7 +31,7 @@ #include "reiserfsim.h" -static int fsim_rw_diskblocks( logical_volume_t *,int, int64_t, int32_t, void *, int ); +static int fsim_rw_diskblocks( logical_volume_t *,int, u_int64_t, u_int32_t, void *, int ); static int reiser_version = 0; // version of reiserfs utils. static char reiser_version_text[32]; // version of reiserfs utils. @@ -77,7 +77,8 @@ */ static void set_mkfs_options( option_array_t * options, char ** argv, char * vol_name ) { - int i, opt_count = 0; + uint i; + int opt_count = 0; char buffer[EVMS_VOLUME_NAME_SIZE + 10]; LOG_ENTRY(); @@ -216,7 +217,8 @@ */ static void set_fsck_options( option_array_t * options, char ** argv, logical_volume_t * volume ) { - int i, opt_count = 0; + uint i; + int opt_count = 0; LOG_ENTRY(); argv[opt_count++] = "reiserfsck"; @@ -425,11 +427,11 @@ * */ static int fsim_rw_diskblocks( logical_volume_t * volume, - int dev_ptr, - int64_t disk_offset, - int32_t disk_count, - void *data_buffer, - int mode ) + int dev_ptr, + u_int64_t disk_offset, + u_int32_t disk_count, + void *data_buffer, + int mode ) { int rc = 0; size_t Bytes_Transferred; @@ -690,7 +692,7 @@ /* * Can fsck this volume? */ -static int reiser_can_fsck(logical_volume_t *volume) +static int reiser_can_fsck(logical_volume_t * UNUSED(volume)) { int rc=0; @@ -1462,8 +1464,8 @@ * settings have changed. */ static int reiser_set_volumes(task_context_t *context, - list_anchor_t declined_volumes, - task_effect_t *effect) + list_anchor_t UNUSED(declined_volumes), + task_effect_t * UNUSED(effect)) { int rc = 0; logical_volume_t * vol; |
From: Steve D. <ste...@us...> - 2009-01-16 22:48:10
|
Update of /cvsroot/evms/evms2/engine/plugins/ogfs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13436 Modified Files: fs_ogfs.c ondisk.c Log Message: Cleanup compiler warnings. Added bonus: My editor cleans up trailing whitespace. Index: ondisk.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/ogfs/ondisk.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ondisk.c 6 Nov 2003 23:38:29 -0000 1.3 +++ ondisk.c 16 Jan 2009 22:48:03 -0000 1.4 @@ -18,8 +18,7 @@ */ #include <stdio.h> #include <string.h> -#define __STDC_FORMAT_MACROS 1 -#include <inttypes.h> +#include <plugin.h> #include "osi_endian.h" #include "ogfs_ondisk.h" @@ -115,7 +114,7 @@ * */ void -ogfs_inum_print(ogfs_inum_t * no, int console) +ogfs_inum_print(ogfs_inum_t * no, int UNUSED(console)) { pv(no, no_formal_ino, "%"PRIu64); pv(no, no_addr, "%"PRIu64); @@ -168,7 +167,7 @@ * */ void -ogfs_meta_header_print(ogfs_meta_header_t * mh, int console) +ogfs_meta_header_print(ogfs_meta_header_t * mh, int UNUSED(console)) { pv(mh, mh_magic, "0x%.8X"); pv(mh, mh_type, "%u"); @@ -977,7 +976,7 @@ * */ void -ogfs_tag_print(ogfs_block_tag_t * tg, int console) +ogfs_tag_print(ogfs_block_tag_t * tg, int UNUSED(console)) { pv(tg, bt_blkno, "%"PRIu64); pv(tg, bt_flags, "%u"); Index: fs_ogfs.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/ogfs/fs_ogfs.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- fs_ogfs.c 4 Jan 2008 18:17:47 -0000 1.41 +++ fs_ogfs.c 16 Jan 2009 22:48:03 -0000 1.42 @@ -49,13 +49,13 @@ static ogfs_volume_type_t ogfs_get_volume_type(logical_volume_t *volume) { ogfs_volume_type_t type = OGFS_UNKNOWN_VOL; - + if (volume->private_data != NULL) { uint32 magic = *((uint32 *)volume->private_data); - + if (magic == OGFS_MAGIC) { ogfs_meta_header_t *ogfs_mh; [...1257 lines suppressed...] ogfsutils_support) { struct ogfs_sb *ogfs_sb; - + ogfs_sb = (struct ogfs_sb *)volume->private_data; /* @@ -3098,10 +3103,10 @@ * * Currently OpenGFS does not support shrinking a file system. */ -static int ogfs_can_shrink_by(logical_volume_t *volume, sector_count_t *delta) +static int ogfs_can_shrink_by(logical_volume_t * UNUSED(volume), sector_count_t * UNUSED(delta)) { int rc = ENOSYS; - + LOG_ENTRY(); LOG_EXIT_INT(rc); return rc; |
From: Steve D. <ste...@us...> - 2009-01-16 18:14:47
|
Update of /cvsroot/evms/evms2/engine/plugins/md In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv26794 Modified Files: linear_mgr.c md.h md_discover.c md_dlist.c md_dlist.h md_info.c md_main.c md_super.c md_super.h multipath.c raid0_mgr.c raid1_funcs.c raid1_mgr.c raid5_funcs.c raid5_mgr.c Log Message: Cleanup compiler warnings. Added bonus: My editor cleans up trailing whitespace. Index: raid5_mgr.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/md/raid5_mgr.c,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- raid5_mgr.c 4 Jan 2008 22:12:21 -0000 1.117 +++ raid5_mgr.c 16 Jan 2009 18:14:39 -0000 1.118 @@ -95,14 +95,14 @@ { raid5_conf_t * conf = mdvol_to_conf(vol); disk_info_t * conf_disk; - int disk_index; + u_int32_t disk_index; md_member_t *member; storage_object_t *obj; list_element_t iter; md_super_info_t info; mdu_disk_info_t d; - int i, count, length = 0; - int conf_disks; + uint i, count, length = 0; + u_int32_t conf_disks; int rc = 0; LOG_ENTRY(); @@ -119,8 +119,8 @@ LOG_DEBUG("%s: info.raid_disks: %d, info.nr_disks: %d.\n", vol->name, info.raid_disks, info.nr_disks); conf_disks = (info.raid_disks > info.nr_disks) ? info.raid_disks : info.nr_disks; - - /* + + /* * If a spare is added to fix a degrade array and recovery is running, * its index could be greater than nr_disks. * We should take this into account when allocating memory for disks. @@ -135,7 +135,7 @@ conf_disks = member->dev_number + 1; } } - + conf->disks = EngFncs->engine_alloc(sizeof(disk_info_t) * conf_disks); conf->stripe.nr_disks = conf_disks; conf->stripe.chunks = EngFncs->engine_alloc(sizeof(chunk_t) * conf_disks); @@ -160,7 +160,7 @@ * During discovery, raid_disk is set to -1 for spare devices. * Therefore, we can not use -1, must use i instead. */ - if (disk_index == -1) { + if ((int) disk_index == -1) { disk_index = d.number; } @@ -262,7 +262,7 @@ if (conf->failed_disk_index < 0) { /* Find the missing disk. */ - for (i = 0; (i <conf->raid_disks) && (conf->failed_disk_index < 0); i++) { + for (i = 0; ((int) i <conf->raid_disks) && (conf->failed_disk_index < 0); i++) { if (conf->disks[i].used_slot == 0) { conf->failed_disk_index = i; } @@ -414,7 +414,7 @@ * * Can we remove the specified MD logical volume */ -static int raid5_can_delete( storage_object_t * region ) { +static int raid5_can_delete( storage_object_t * UNUSED(region) ) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -517,9 +517,9 @@ * Function: raid5_expand */ static int raid5_expand( storage_object_t * region, - storage_object_t * expand_object, + storage_object_t * UNUSED(expand_object), list_anchor_t input_objects, - option_array_t * options ) + option_array_t * UNUSED(options) ) { int rc = 0; list_element_t iter; @@ -645,7 +645,7 @@ sector_count_t expand_size; logical_volume_t *evms_volume; sector_count_t size; - int disk_count; + uint disk_count; raid5_conf_t *conf = mdvol_to_conf(vol); my_plugin = raid5_plugin; @@ -771,7 +771,8 @@ md_saved_info_t *info = NULL; list_element_t li = NULL; list_element_t iter; - int i, rc = 0; + u_int32_t i; + int rc = 0; list_anchor_t remove_list = NULL; storage_object_t *obj; md_member_t *member; @@ -898,9 +899,9 @@ /* Function: raid5_shrink */ static int raid5_shrink( storage_object_t * region, - storage_object_t * shrink_object, + storage_object_t * UNUSED(shrink_object), list_anchor_t input_objects, - option_array_t * options ) + option_array_t * UNUSED(options) ) { int rc = 0; list_element_t iter; @@ -1104,7 +1105,8 @@ md_saved_info_t *info = NULL; list_element_t li = NULL; list_element_t iter; - int i, rc = 0; + u_int32_t i; + int rc = 0; list_anchor_t remove_list = NULL; storage_object_t *obj; md_member_t *member; @@ -1454,7 +1456,7 @@ md_member_t *member; list_element_t iter; storage_object_t *obj; - int md_minor; + u_int32_t md_minor; LOG_ENTRY(); @@ -1728,9 +1730,9 @@ unsigned int * raid_level, unsigned int * parity_algorithm, boolean * degrade, - int * missing_index) + unsigned int * missing_index) { - int i; + uint i; int rc = 0; boolean ver1_superblock = FALSE; @@ -1904,7 +1906,7 @@ md_sb_ver_t sb_ver = {MD_SB_VER_0, 90, 0}; md_member_t *member; boolean degrade = FALSE; - int missing_index = 0; + u_int32_t missing_index = 0; boolean missing_added = FALSE; int count, min_disks; int rc = 0; @@ -1936,7 +1938,7 @@ if (count > MAX_SB_DISKS(&sb_ver)) { MESSAGE(_("Too many devices (%d) were specified." - " For MD superblock version %d.%d, the maximum is %d.\n"), + " For MD superblock version %d.%d, the maximum is %d.\n"), count, sb_ver.major_version, sb_ver.minor_version, MAX_SB_DISKS(&sb_ver)); return EINVAL; @@ -3227,7 +3229,7 @@ return rc; } -static int raid5_can_deactivate_region(storage_object_t * region) +static int raid5_can_deactivate_region(storage_object_t * UNUSED(region)) { LOG_ENTRY(); @@ -3297,7 +3299,7 @@ storage_object_t * object; list_anchor_t tmp_list; list_element_t li; - int count, i; + uint count, i; LOG_ENTRY(); @@ -3898,7 +3900,7 @@ { storage_object_t * obj = NULL; storage_object_t * spare = NULL; - u_int64_t smallest_size = -1; + u_int64_t smallest_size = UINT64_MAX; list_element_t li; md_sb_ver_t sb_ver = {MD_SB_VER_0, 90, 0}; int chunksize = MD_DEFAULT_CHUNK_SIZE >> EVMS_VSECTOR_SIZE_SHIFT; @@ -3921,7 +3923,7 @@ * If we got a smallest size, then check the size of the spare, if one * is specified and see if it is the smallest. */ - if (smallest_size != -1) { + if (smallest_size != UINT64_MAX) { if (context->option_descriptors->option[RAID5_CREATE_OPT_SPARE_DISK_INDEX].value.s != NULL) { spare = md_find_valid_input_object( context->option_descriptors->option[RAID5_CREATE_OPT_SPARE_DISK_INDEX].value.s); @@ -3937,7 +3939,7 @@ * any object whose size exceeds the threshold over the smallest * object size. */ - if (smallest_size != -1) { + if (smallest_size != UINT64_MAX) { u_int64_t diffsize; LIST_FOR_EACH(context->selected_objects, li, obj) { @@ -4154,8 +4156,8 @@ static int raid5_set_expand_object( task_context_t * context, - list_anchor_t declined_objects, - task_effect_t * effect ) + list_anchor_t UNUSED(declined_objects), + task_effect_t * UNUSED(effect) ) { int rc = 0; md_volume_t *volume = (md_volume_t *)context->object->private_data; @@ -4554,7 +4556,7 @@ xorblock.buf[0] = stripe->chunks[dev_index].data; for (i = 0, count = 1; i < conf->raid_disks; i++) { - if (i == dev_index) { + if (i == (int) dev_index) { continue; } @@ -4579,7 +4581,7 @@ static void free_stripe_data(stripe_t * stripe) { - int i; + u_int32_t i; if (stripe->data_size != 0) { /* Free up all the buffers in the stripe. */ @@ -5320,7 +5322,7 @@ fia->info[*function_count].function = MD_RAID5_FUNCTION_ADD_SPARE; fia->info[*function_count].name = EngFncs->engine_strdup("addspare"); fia->info[*function_count].verb = EngFncs->engine_strdup(_("Add spare")); - if (volume->flags & MD_DEGRADED && (volume->nr_disks < conf->raid_disks)) { + if (volume->flags & MD_DEGRADED && ((int) volume->nr_disks < conf->raid_disks)) { fia->info[*function_count].title = EngFncs->engine_strdup(_("Add spare to fix degraded array")); fia->info[*function_count].help = @@ -5639,7 +5641,7 @@ static int raid5_plugin_function(storage_object_t * region, task_action_t action, list_anchor_t objects, - option_array_t * options) { + option_array_t * UNUSED(options)) { int rc = 0; md_volume_t * vol = (md_volume_t *) region->private_data; @@ -5698,7 +5700,7 @@ LOG_EXIT_INT(rc); return rc; } - if ((vol->flags & MD_DEGRADED) && + if ((vol->flags & MD_DEGRADED) && (!(vol->region->flags & SOFLAG_ACTIVE)) ) { MESSAGE(_("Array %s is running in degrade mode. " "At least one spare must be left for the array to recover.\n"), Index: multipath.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/md/multipath.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- multipath.c 26 May 2006 21:54:32 -0000 1.69 +++ multipath.c 16 Jan 2009 18:14:39 -0000 1.70 @@ -131,7 +131,7 @@ #endif argv[i++] = volume->region->name; argv[i++] = object_size; - + LIST_FOR_EACH(volume->region->child_objects, itr, child) { argv[i++] = child->name; } @@ -235,7 +235,8 @@ { md_volume_t *volume; char lock_file_name[256]; - int i, rc; + size_t i; + int rc; LOG_ENTRY(); @@ -311,7 +312,7 @@ LOG_EXIT_VOID(); } -static int globerror(const char *path, int error) +static int globerror(const char * UNUSED(path), int UNUSED(error)) { return 0; } @@ -326,7 +327,8 @@ static void mp_cleanup_stale_daemons(void) { glob_t result; - int i, rc; + size_t i; + int rc; LOG_ENTRY(); @@ -364,8 +366,10 @@ { dm_target_multipath_t *kernel_mp = kernel_target->data.multipath; dm_priority_group_t *kernel_pg = &kernel_mp->group[0]; - int found, matched_paths = 0, active_paths = 0; - int j, rc = EINVAL; + int found, matched_paths = 0; + u_int32_t active_paths = 0; + u_int32_t j; + int rc = EINVAL; md_member_t *member; list_element_t iter; @@ -422,7 +426,7 @@ rc = 0; } -out: +out: LOG_DEBUG("there are %d active paths and %d matched path structs\n", active_paths, matched_paths); LOG_EXIT_INT(rc); return rc; @@ -440,7 +444,7 @@ dm_priority_group_t *pg = &mp->group[0]; char device[25]; char *dev, active; - int i, fail_count; + u_int32_t i, fail_count; LOG_ENTRY(); @@ -614,8 +618,9 @@ */ static int multipath_verify_sb_info(md_volume_t * vol, boolean do_msg) { - int i, nr_disks, rc = 0; - int raid_disks = 0, spare_disks = 0, working_disks=0, active_disks=0, failed_disks=0; + u_int32_t i, nr_disks; + int rc = 0; + u_int32_t raid_disks = 0, spare_disks = 0, working_disks=0, active_disks=0, failed_disks=0; md_super_info_t info; md_member_t *member; mdu_disk_info_t d; @@ -653,17 +658,17 @@ rc = EINVAL; if (do_msg) { MESSAGE( _("Region %s has too few disk discriptors. " - "Could not find a disk descriptor at index %d for object %s.\n"), + "Could not find a disk descriptor at index %u for object %s.\n"), vol->name, i, member->obj->name ); } } else { vol->sb_func->get_sb_disk_info(member, &d); - if ( d.number != i || d.raid_disk != i ) { + if ( d.number != (int) i || d.raid_disk != (int) i ) { rc = EINVAL; if (do_msg) { - MESSAGE( _("Region %s has a disk descriptor at index %d" + MESSAGE( _("Region %s has a disk descriptor at index %u" " with a raid number that is not valid. " - "Superblock says %d but it should be %d\n"), + "Superblock says %d but it should be %u\n"), vol->name, i, info.raid_disks, i ); } } @@ -684,7 +689,7 @@ vol->sb_func->get_sb_disk_info(member, &d); switch (d.state) { - + case (1<<MD_DISK_ACTIVE | 1<<MD_DISK_SYNC): active_disks++; raid_disks++; @@ -993,7 +998,7 @@ * Can we remove the specified MD logical volume, and consolidate the * space with the freespace volume? */ -static int multipath_can_delete( storage_object_t *region ) +static int multipath_can_delete( storage_object_t * UNUSED(region) ) { my_plugin = mp_plugin; LOG_ENTRY(); @@ -1064,7 +1069,7 @@ " spares=%d, actives=%d, working=%d\n", vol->name, vol->nr_disks, vol->raid_disks, vol->spare_disks, vol->active_disks, vol->working_disks); - + LIST_FOR_EACH(vol->members, iter, member) { md_append_region_to_object(region, member->obj); @@ -1078,14 +1083,14 @@ vol->region = region; region->flags |= SOFLAG_DIRTY; md_add_object_to_list(region, output_list); - + mp_identify_backup_paths(vol); } error_out: if (rc && backup_array) { EngFncs->engine_free(backup_array); } -out: +out: LOG_EXIT_INT(rc); return rc; } @@ -1098,7 +1103,7 @@ * DLIST. */ static int multipath_create( list_anchor_t objects, - option_array_t *options, + option_array_t * UNUSED(options), list_anchor_t new_region_list ) { int rc = 0; @@ -1108,7 +1113,7 @@ list_element_t iter1; list_element_t iter2; md_sb_ver_t sb_ver = {MD_SB_VER_0, 90, 0}; - u_int64_t size = -1; + u_int64_t size = UINT64_MAX; int count, raid_disk; @@ -1119,7 +1124,7 @@ if (count > MAX_SB_DISKS(&sb_ver)) { MESSAGE(_("Too many devices (%d) were specified." - " For MD superblock version %d.%d, the maximum is %d.\n"), + " For MD superblock version %d.%d, the maximum is %d.\n"), count, sb_ver.major_version, sb_ver.minor_version, MAX_SB_DISKS(&sb_ver)); return EINVAL; @@ -1137,7 +1142,7 @@ } LIST_FOR_EACH_SAFE(objects, iter1, iter2, object) { - if (size == -1) { + if (size == UINT64_MAX) { size = md_object_usable_size(object, &sb_ver, 0); } else { if (size != md_object_usable_size(object, &sb_ver, 0)) { @@ -1429,7 +1434,7 @@ return rc; } -static int multipath_can_activate(storage_object_t *region) +static int multipath_can_activate(storage_object_t * UNUSED(region)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -1478,7 +1483,7 @@ } -static int multipath_can_deactivate(storage_object_t *region) +static int multipath_can_deactivate(storage_object_t * UNUSED(region)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -1574,7 +1579,7 @@ switch (context->action) { - + case EVMS_Task_Create: context->min_selected_objects = 1; @@ -1589,7 +1594,7 @@ break; case EVMS_Task_Rewrite_Superblock: - + region = context->object; vol = (md_volume_t *)region->private_data; e=EngFncs->insert_thing( context->acceptable_objects, @@ -1621,7 +1626,7 @@ * Function: multipath_set_option */ static int multipath_set_option(task_context_t *context, - u_int32_t index, + u_int32_t UNUSED(index), value_t *value, task_effect_t *effect ) { @@ -1731,7 +1736,7 @@ } } - // Test 3 ... MD superblock location + // Test 3 ... MD superblock location if (!rc) { lba = MD_NEW_SIZE_SECTORS(obj->size); LOG_DEBUG("Test 3 start ... lba= %"PRIu64"\n", lba); @@ -1846,7 +1851,7 @@ * object. */ static int multipath_set_rewrite_object( task_context_t * context, - list_anchor_t declined_objects, + list_anchor_t UNUSED(declined_objects), task_effect_t * effect ) { int rc=0; @@ -1904,7 +1909,7 @@ REQUIRE(effect != NULL); switch (context->action) { - + case EVMS_Task_Create: rc = multipath_set_create_object( context, declined_objects, effect ); break; @@ -2237,9 +2242,9 @@ * superblock so that it reflects the current configuration. */ static int rewrite_multipath_superblock( storage_object_t * region, - task_action_t action, + task_action_t UNUSED(action), list_anchor_t objects, - option_array_t * options) + option_array_t * UNUSED(options)) { int rc=EINVAL; md_volume_t *vol; @@ -2249,7 +2254,7 @@ list_element_t iter1; list_element_t iter2; list_element_t li; - u_int64_t size = -1; + u_int64_t size = UINT64_MAX; md_sb_ver_t sb_ver; int raid_disk; int md_minor; @@ -2283,7 +2288,7 @@ if (!(vol = md_allocate_volume())) { vol->flags |= MD_CORRUPT; - region->flags |= SOFLAG_CORRUPT; + region->flags |= SOFLAG_CORRUPT; LOG_EXIT_INT(ENOMEM); return ENOMEM; } @@ -2292,7 +2297,7 @@ md_volume_set_name(vol, NULL); LIST_FOR_EACH_SAFE(my_objects, iter1, iter2, object) { - if (size == -1) { + if (size == UINT64_MAX) { size = md_object_usable_size(object, &sb_ver, 0); } else { if (size != md_object_usable_size(object, &sb_ver, 0)) { @@ -2426,7 +2431,7 @@ required_engine_api_version: { major: 15, minor: 0, patchlevel: 0}, - + required_plugin_api_version: { plugin: {major: 13, minor: 0, patchlevel: 0}}, Index: md_info.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/md/md_info.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- md_info.c 21 Aug 2008 01:15:27 -0000 1.24 +++ md_info.c 16 Jan 2009 18:14:38 -0000 1.25 @@ -52,14 +52,14 @@ char resync_status[64] = {0}; LOG_ENTRY(); - + region = vol->region; if (!region) { LOG_CRITICAL("No region was created for MD volume %s.\n", vol->name); LOG_EXIT_INT(EINVAL); return EINVAL; } - + if (region->flags & SOFLAG_ACTIVE) { md_analyze_active_region(vol); } @@ -397,7 +397,7 @@ info.major = d.major; info.minor = d.minor; info.raid_disk = d.raid_disk; - + buffer[0] = '\0'; if (d.state & (1 << MD_DISK_FAULTY)) { strcat(buffer, _("Faulty")); @@ -406,7 +406,7 @@ strcat(buffer, ", "); } strcat(buffer, _("Removed")); - } + } } else { if (d.state & (1 << MD_DISK_ACTIVE)) { if (buffer[0] != '\0') { @@ -421,7 +421,7 @@ strcat(buffer, _("Sync")); } } - + // If none of the flags are set, it must be a spare disk. if (buffer[0] == '\0') { strcpy(buffer, _("Spare")); @@ -482,7 +482,7 @@ strcat(buffer, _("Pending")); } info.state = buffer; - + rc = set_disk_info(&info, cur_info); LOG_EXIT_INT(rc); @@ -550,7 +550,7 @@ info = EngFncs->engine_alloc(sizeof(extended_info_array_t) + sizeof(extended_info_t) * (NUM_DISK_INFO_ENTRIES + 1)); if (info != NULL) { - + info->count = get_superblock_disk_info(member->vol, member->dev_number, info->info); if (info->count != NUM_DISK_INFO_ENTRIES) { @@ -603,7 +603,7 @@ extended_info_t *cur_info; int info_entries; md_super_info_t super; - int i; + uint i; LOG_ENTRY(); @@ -615,7 +615,7 @@ } info_entries = NUM_SUPER_INFO_ENTRIES + super.nr_disks*NUM_DISK_INFO_ENTRIES; - + info = EngFncs->engine_alloc(sizeof(extended_info_array_t) + sizeof(extended_info_t) * info_entries); if (info == NULL) { @@ -811,7 +811,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; cur_info->name = EngFncs->engine_strdup("set_uuid1"); cur_info->title = EngFncs->engine_strdup(_("UUID1")); @@ -826,7 +826,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; cur_info->name = EngFncs->engine_strdup("set_uuid2"); cur_info->title = EngFncs->engine_strdup(_("UUID2")); @@ -841,7 +841,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; cur_info->name = EngFncs->engine_strdup("set_uuid3"); cur_info->title = EngFncs->engine_strdup(_("UUID3")); @@ -856,7 +856,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; cur_info->name = EngFncs->engine_strdup("utime"); cur_info->title = EngFncs->engine_strdup(_("Superblock update time")); @@ -876,7 +876,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; cur_info->name = EngFncs->engine_strdup("state"); cur_info->title = EngFncs->engine_strdup(_("State")); @@ -903,7 +903,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; cur_info->name = EngFncs->engine_strdup("active_disks"); cur_info->title = EngFncs->engine_strdup(_("Active disks")); @@ -918,7 +918,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; cur_info->name = EngFncs->engine_strdup("working_disks"); cur_info->title = EngFncs->engine_strdup(_("Working disks")); @@ -948,7 +948,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; cur_info->name = EngFncs->engine_strdup("spare_disks"); cur_info->title = EngFncs->engine_strdup(_("Spare disks")); @@ -963,7 +963,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; cur_info->name = EngFncs->engine_strdup("sb_csum"); cur_info->title = EngFncs->engine_strdup(_("Check sum")); @@ -978,7 +978,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; cur_info->name = EngFncs->engine_strdup("events"); cur_info->title = EngFncs->engine_strdup(_("Update count")); @@ -993,7 +993,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; cur_info->name = EngFncs->engine_strdup("layout"); cur_info->title = EngFncs->engine_strdup(_("Layout")); @@ -1028,7 +1028,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; cur_info->name = EngFncs->engine_strdup("chunk_size"); cur_info->title = EngFncs->engine_strdup(_("Chunk size")); @@ -1043,7 +1043,7 @@ cur_info->group.group_level = 0; cur_info->group.group_name = NULL; cur_info->flags = 0; - + cur_info++; for (i=0; i<super.nr_disks; i++) { int count; @@ -1075,7 +1075,7 @@ int md_get_info(md_volume_t *vol, char *name, extended_info_array_t **info_array) { int rc = 0; - int idx = -1; + uint idx; md_member_t *member; list_element_t iter; @@ -1121,7 +1121,7 @@ else if ( ! strncmp(name, "superblock", 10) ) { // "Extra" information about the master superblock rc = md_get_superblock_info(vol, NULL, info_array); - } + } else if ( ! strncmp(name, "superblock_child_object_", 24) ) { // "Extra" information about the child superblock idx = atoi(name + 24); Index: raid1_funcs.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/md/raid1_funcs.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- raid1_funcs.c 17 Jan 2005 05:50:23 -0000 1.17 +++ raid1_funcs.c 16 Jan 2009 18:14:39 -0000 1.18 @@ -89,7 +89,7 @@ rc = EINVAL; goto undo_activate_spare; } - + rc = md_volume_mark_faulty(member, TRUE); // mark faulty and removed if (!rc) { parm.disk_info = disk_info; @@ -184,7 +184,7 @@ * Function: remove_active_disk_post_activate * */ -static int remove_active_disk_post_activate(md_volume_t *vol, md_ioctl_pkg_t *pkg) +static int remove_active_disk_post_activate(md_volume_t *vol, md_ioctl_pkg_t * UNUSED(pkg)) { LOG_ENTRY(); vol->region_mgr_flags &= ~MD_RAID1_CONFIG_CHANGE_PENDING; @@ -247,7 +247,7 @@ md_remove_region_from_object(vol->region, member->obj); vol->sb_func->zero_superblock(member, FALSE); md_free_member(member); - + if (md_is_region_active(vol->region)) { vol->region->flags |= (SOFLAG_NEEDS_DEACTIVATE | SOFLAG_NEEDS_ACTIVATE); } @@ -284,11 +284,11 @@ * This function should be called during SETUP phase of commit. * * - Retrieve the disk entry added in raid1_add_active_disk() - * - Change the new entry to faulty entry. + * - Change the new entry to faulty entry. * - Schedule the EVMS_MD_ADD so that on the POST_ACTIVATE phase, we will IOCTL - * the kernel MD driver to hot-add this new disk to fix the degraded array. + * the kernel MD driver to hot-add this new disk to fix the degraded array. * - Mark volume DIRTY for superblock update. - * - Next phase of commit process is FIRST_METADATA_WRITE, we will write + * - Next phase of commit process is FIRST_METADATA_WRITE, we will write * modified superblock to indicate "degraded" array. */ static int add_active_disk_setup(md_volume_t *vol, md_setup_func_t *setup) @@ -303,7 +303,7 @@ disk_info = setup->disk_info; new_disk = disk_info->object; - + member = md_volume_find_member(vol, disk_info->number); if (!member || member->obj != new_disk) { LOG_ERROR("Could not find the new disk %s to add to region [%s]\n", @@ -311,7 +311,7 @@ rc = EINVAL; goto undo_add_active_disk; } - + if (setup->proceed == FALSE) { LOG_WARNING("Cancel add new active disk (%s) to region %s\n", new_disk->name, vol->name); @@ -368,7 +368,7 @@ int rc=0; evms_md_disk_info_t *disk_info = NULL; md_member_t *member = NULL; - + LOG_ENTRY(); member = md_allocate_member(new_disk); @@ -399,7 +399,7 @@ new_disk->name); goto out; } - + md_append_region_to_object(vol->region, new_disk); if (md_is_region_active(vol->region)) { @@ -451,7 +451,7 @@ LOG_EXIT_INT(EFAULT); return EFAULT; } - + if (md_is_region_active(vol->region)) { rc = md_volume_remove_spare_from_active_region(vol, spare); } else { @@ -464,7 +464,7 @@ int raid1_remove_stale_disk(md_volume_t *vol, storage_object_t * stale_disk) { int rc=0; - + LOG_ENTRY(); if (!vol || !stale_disk) { @@ -490,7 +490,7 @@ LOG_EXIT_INT(EFAULT); return EFAULT; } - + if (md_is_region_active(vol->region)) { rc = md_volume_remove_faulty_from_active_region(vol, faulty); } else { @@ -546,9 +546,9 @@ rc = ENODEV; goto out; } else { - if ((info.major != active->dev_major) || (info.minor != active->dev_minor)) { + if ((info.major != (int) active->dev_major) || (info.minor != (int) active->dev_minor)) { LOG_WARNING("(%s) mismatch major/minor, kernel(%d:%d), EVMS(%d:%d)\n", - active->name, info.major, info.minor, + active->name, info.major, info.minor, active->dev_major, active->dev_minor); } } @@ -558,7 +558,7 @@ rc = ENOMEM; goto out; } - + rc = md_volume_mark_faulty(member, FALSE); if (rc) { goto out; Index: raid5_funcs.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/md/raid5_funcs.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- raid5_funcs.c 17 Jan 2005 05:50:23 -0000 1.13 +++ raid5_funcs.c 16 Jan 2009 18:14:39 -0000 1.14 @@ -59,7 +59,7 @@ LOG_EXIT_INT(EFAULT); return EFAULT; } - + if (md_is_region_active(vol->region)) { rc = md_volume_remove_faulty_from_active_region(vol, faulty); } else { @@ -72,7 +72,7 @@ int raid5_remove_stale_disk(md_volume_t *vol, storage_object_t * stale_disk) { int rc=0; - + LOG_ENTRY(); if (!vol || !stale_disk) { @@ -135,9 +135,9 @@ rc = ENODEV; goto out; } else { - if ((info.major != active->dev_major) || (info.minor != active->dev_minor)) { + if ((info.major != (int) active->dev_major) || (info.minor != (int) active->dev_minor)) { LOG_WARNING("(%s) mismatch major/minor, kernel(%d:%d), EVMS(%d:%d)\n", - active->name, info.major, info.minor, + active->name, info.major, info.minor, active->dev_major, active->dev_minor); } } @@ -152,7 +152,7 @@ rc = ENOMEM; goto out; } - + disk_info->number = member->dev_number; disk_info->major = info.major; disk_info->minor = info.minor; Index: linear_mgr.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/md/linear_mgr.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- linear_mgr.c 26 May 2006 21:54:32 -0000 1.72 +++ linear_mgr.c 16 Jan 2009 18:14:38 -0000 1.73 @@ -43,7 +43,7 @@ if (volume->region_mgr_flags & MD_LINEAR_CONFIG_CHANGE_PENDING) { rc = FALSE; } - + LOG_EXIT_BOOL(rc); return rc; } @@ -65,7 +65,7 @@ md_member_t *member = NULL; LOG_ENTRY(); - + member = md_allocate_member(new_disk); if (!member) { rc = ENOMEM; @@ -166,7 +166,7 @@ * Can we remove the specified MD logical volume, and consolidate the * space with the freespace volume? */ -static int linear_can_delete( storage_object_t * region ) +static int linear_can_delete( storage_object_t * UNUSED(region) ) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -187,7 +187,7 @@ list_element_t li; storage_object_t *child; md_volume_t *vol = (md_volume_t *)region->private_data; - + LOG_ENTRY(); if (vol->nr_disks < 1) { LOG_EXIT_INT(ENODEV); @@ -219,7 +219,7 @@ list_element_t li; storage_object_t *child; md_volume_t *vol = (md_volume_t *)region->private_data; - + LOG_ENTRY(); if (vol->nr_disks < 1) { LOG_EXIT_INT(ENODEV); @@ -276,7 +276,7 @@ region->disk_group, VALID_INPUT_OBJECT | NO_DISK_GROUP, &tmp_list); - + /* Remove this MD object from the list */ EngFncs->remove_thing(tmp_list, region); @@ -317,8 +317,8 @@ * from the freespace volume in the same group? */ -static int linear_can_expand_by(storage_object_t * child_object, - u_int64_t * size ) +static int linear_can_expand_by(storage_object_t * UNUSED(child_object), + u_int64_t * UNUSED(size) ) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -392,8 +392,8 @@ * space into the freespace volume? If it can be shrunk, but not to * exactly new_size, reset new_size to the next lower possible size. */ -static int linear_can_shrink_by(storage_object_t * region, - u_int64_t * size ) +static int linear_can_shrink_by(storage_object_t * UNUSED(region), + u_int64_t * UNUSED(size) ) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -461,7 +461,7 @@ out: EngFncs->dm_deallocate_targets(targets); - LOG_EXIT_INT(rc); + LOG_EXIT_INT(rc); return rc; } @@ -470,7 +470,7 @@ int rc = 0; storage_object_t * region = NULL; md_member_t *member; - int i; + uint i; int length; mdu_array_info_t info; @@ -637,7 +637,7 @@ static int linear_get_create_options( option_array_t *options, md_sb_ver_t *sb_ver) { - int i; + uint i; int rc = 0; boolean version_1 = FALSE; @@ -651,7 +651,7 @@ case LINEAR_CREATE_OPT_SB1_INDEX: version_1 = options->option[i].value.b; break; - + default: break; } @@ -694,7 +694,7 @@ LOG_DEBUG("Creating new region %s: nr_disks=%d, raid_disks=%d, spares=%d, actives=%d, working=%d\n", vol->name, vol->nr_disks, vol->raid_disks, vol->spare_disks, vol->active_disks, vol->working_disks); - + if (!rc) { LIST_FOR_EACH(vol->members, iter, member) { md_append_region_to_object(region, member->obj); @@ -748,7 +748,7 @@ if (count > MAX_SB_DISKS(&sb_ver)) { MESSAGE(_("Too many devices (%d) were specified." - " For MD superblock version %d.%d, the maximum is %d.\n"), + " For MD superblock version %d.%d, the maximum is %d.\n"), count, sb_ver.major_version, sb_ver.minor_version, MAX_SB_DISKS(&sb_ver)); return EINVAL; @@ -758,7 +758,7 @@ LOG_EXIT_INT(ENOMEM); return ENOMEM; } - + rc = md_volume_get_available_name(volume, 256); if (rc) { goto error_free; @@ -767,13 +767,13 @@ LIST_FOR_EACH_SAFE(objects, iter1, iter2, object) { size = min(size, md_object_usable_size(object, &sb_ver, 0)); } - + rc = md_init_sb(volume, &sb_ver, MD_LEVEL_LINEAR, 0, size, 0); if (rc) { goto error_free; } - + LIST_FOR_EACH_SAFE(objects, iter1, iter2, object) { member = md_allocate_member(object); if (member) { @@ -981,7 +981,7 @@ { int rc = 0; md_volume_t *vol; - int saved_nr_disks; + u_int32_t saved_nr_disks; storage_object_t *candidate; md_member_t *last; list_element_t li; @@ -1043,7 +1043,7 @@ list_anchor_t removed_list; md_member_t *last; list_element_t li = NULL; - + my_plugin = linear_plugin; LOG_ENTRY(); @@ -1248,7 +1248,7 @@ u_int64_t offset = 0; md_member_t *member; list_element_t iter; - + my_plugin = linear_plugin; LOG_ENTRY(); @@ -1294,10 +1294,10 @@ } -static int linear_can_deactivate_region(storage_object_t * region) +static int linear_can_deactivate_region(storage_object_t * UNUSED(region)) { LOG_ENTRY(); - + LOG_EXIT_INT(0); return 0; } @@ -1355,7 +1355,7 @@ case EVMS_Task_Shrink: count = 0; break; - + default: count = 0; break; @@ -1411,7 +1411,7 @@ context->option_descriptors->option[LINEAR_CREATE_OPT_SB1_INDEX].type = EVMS_Type_Boolean; context->option_descriptors->option[LINEAR_CREATE_OPT_SB1_INDEX].unit = EVMS_Unit_None; context->option_descriptors->option[LINEAR_CREATE_OPT_SB1_INDEX].value.b = FALSE; - + // get a list of all valid input disks, segments, and regions. EngFncs->get_object_list(DISK | SEGMENT | REGION, DATA_TYPE, @@ -1426,7 +1426,7 @@ break; case EVMS_Task_Expand: - + vol = (md_volume_t *) context->object->private_data; context->option_descriptors->count = 0; @@ -1440,10 +1440,10 @@ /* Remove this MD object from the list */ EngFncs->remove_thing(tmp_list, context->object); - + /* Remove all parents of this MD region from acceptable list */ remove_parent_regions_from_list(tmp_list, context->object); - + /* move these items to the acceptable objects list. */ md_transfer_list(tmp_list, context->acceptable_objects); EngFncs->destroy_list(tmp_list); @@ -1452,7 +1452,7 @@ break; case EVMS_Task_Shrink: - + vol = (md_volume_t *) context->object->private_data; context->option_descriptors->count = 0; @@ -1502,7 +1502,7 @@ static int linear_set_option(task_context_t * context, u_int32_t index, value_t * value, - task_effect_t * effect ) + task_effect_t * UNUSED(effect) ) { int rc = 0; @@ -1526,11 +1526,11 @@ break; } break; - + case EVMS_Task_Expand: // no options, just return 0 break; - + case EVMS_Task_Shrink: // no options, just return 0 break; @@ -1719,7 +1719,7 @@ EngFncs->destroy_list(decline_list); EngFncs->destroy_list(reversed_list); EngFncs->destroy_list(my_list); - + *effect |= EVMS_Effect_Reload_Objects; @@ -1759,11 +1759,11 @@ // do we need any further validation here? rc = 0; break; - + case EVMS_Task_Expand: rc = linear_set_expand_object( context, declined_objects, effect ); break; - + case EVMS_Task_Shrink: rc = linear_set_shrink_object( context, declined_objects, effect ); break; @@ -1812,7 +1812,7 @@ extended_info_array_t * info = NULL; char buffer[50] = {0}; int i = 0; - + my_plugin = linear_plugin; LOG_ENTRY(); @@ -1939,24 +1939,24 @@ LIST_FOR_EACH(vol->members, iter, member) { current_end += member->data_size; if ( current_end >= io_lsn ) { - + max_sector_count = current_end - io_lsn + 1; - + if ( max_sector_count >= sectors_left_to_read ) { io_sector_count = sectors_left_to_read; } else { io_sector_count = max_sector_count; } - + link_lsn = (io_lsn - current_start); - + rc = READ(member->obj, link_lsn + member->data_offset, io_sector_count, (void *)io_buffer_ptr ); - + io_lsn += io_sector_count; io_buffer_ptr += io_sector_count*EVMS_VSECTOR_SIZE; sectors_left_to_read -= io_sector_count; - + if ((sectors_left_to_read == 0) || (rc)) break; } current_start = current_end; @@ -2033,7 +2033,7 @@ return rc; } -static int linear_get_plugin_functions(storage_object_t *region, function_info_array_t * * functions) +static int linear_get_plugin_functions(storage_object_t * UNUSED(region), function_info_array_t * * UNUSED(functions)) { my_plugin = linear_plugin; LOG_ENTRY(); @@ -2041,10 +2041,10 @@ return ENOSYS; } -static int linear_plugin_function(storage_object_t * object, - task_action_t action, - list_anchor_t objects, - option_array_t * options) +static int linear_plugin_function(storage_object_t * UNUSED(object), + task_action_t UNUSED(action), + list_anchor_t UNUSED(objects), + option_array_t * UNUSED(options)) { my_plugin = linear_plugin; LOG_ENTRY(); @@ -2061,7 +2061,7 @@ { md_volume_t *volume; int rc=0; - + my_plugin = linear_plugin; LOG_ENTRY(); Index: md_dlist.h =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/md/md_dlist.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- md_dlist.h 17 Jun 2005 00:13:29 -0000 1.20 +++ md_dlist.h 16 Jan 2009 18:14:38 -0000 1.21 @@ -43,7 +43,7 @@ u_int32_t minor; storage_object_t *object; } evms_md_disk_info_t; - + union evms_md_ioctl_parm { evms_md_disk_info_t * disk_info; /* for EVMS_MD_ADD and EVMS_MD_REMOVE */ mdp_super_t *sb; /* for EVMS_MD_ACTIVATE_REGION */ @@ -77,7 +77,7 @@ // Functions exported from md_dlist.c int md_queue_corrupt_message(md_volume_t *vol, const char *message, int length); int md_count_corrupt_messages(md_volume_t *vol); -void md_display_corrupt_messages(int personality); +void md_display_corrupt_messages(u_int32_t personality); void md_destroy_list_corrupt_messages(void); int md_append_region_to_object(storage_object_t * region, Index: md_super.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/md/md_super.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- md_super.c 25 May 2006 21:40:41 -0000 1.15 +++ md_super.c 16 Jan 2009 18:14:39 -0000 1.16 @@ -66,7 +66,7 @@ * * This function is common for both versions of MD formats. */ -static void md_analyze_sb(md_volume_t *vol, int level, int raid_disks, u_int32_t chunksize_in_bytes) +static void md_analyze_sb(md_volume_t *vol, int level, u_int32_t raid_disks, u_int32_t chunksize_in_bytes) { int length=0; int count; @@ -85,7 +85,7 @@ } if (vol->active_disks < raid_disks) { - switch ((int)level) { + switch (level) { case MD_LEVEL_MULTIPATH: case MD_LEVEL_RAID1: if (vol->active_disks >= 1) { @@ -145,7 +145,7 @@ vol->flags |= MD_CORRUPT; goto queue_corrupt_message; } - + if (((chunksize_in_bytes - 1) & chunksize_in_bytes) != 0) { length = sprintf(message_buffer, _("%s region %s is corrupt." @@ -273,7 +273,7 @@ mdp_super_t *sb = (mdp_super_t *)super; md_array_info_t *array; mdp_disk_t *d; - int i; + u_int32_t i; LOG_ENTRY(); @@ -485,7 +485,7 @@ return rc; } -static int sb0_max_disks() { +static uint sb0_max_disks() { return MD_SB_DISKS; } @@ -648,7 +648,7 @@ member->data_offset = 0; member->super_offset = MD_NEW_SIZE_SECTORS(member->obj->size); - if (member->data_size == -1) { + if (member->data_size == UINT64_MAX) { member->data_size = md_object_usable_size(member->obj, &member->vol->sb_ver, member->vol->chunksize); @@ -763,8 +763,8 @@ } member->raid_disk = -1; - member->data_offset = -1; - member->data_size = -1; + member->data_offset = UINT64_MAX; + member->data_size = UINT64_MAX; member->flags = MD_MEMBER_DISK_REMOVED; out: LOG_EXIT_INT(rc); @@ -1088,20 +1088,20 @@ return rc; } -static int sb0_mark_disk_missing(md_volume_t *vol, int dev_number) +static int sb0_mark_disk_missing(md_volume_t *vol, u_int32_t dev_number) { mdp_super_t *master_sb; mdp_disk_t *disk; int rc = 0; LOG_ENTRY(); - + if (!vol || !vol->sb) { LOG_MD_BUG(); rc = EINVAL; goto out; } - + master_sb = (mdp_super_t *)vol->sb; disk = &master_sb->disks[dev_number]; disk->state = (1<<MD_DISK_FAULTY) | (1<<MD_DISK_REMOVED); @@ -1126,7 +1126,7 @@ static int sb0_write_sb(md_member_t *member) { int rc = 0; - int i; + u_int32_t i; mdp_super_t *sb; mdp_super_t *master; storage_object_t *obj; @@ -1431,7 +1431,7 @@ return loc; } -static u_int64_t sb1_minor_version_to_data_offset(storage_object_t *obj, int minor_version) +static u_int64_t sb1_minor_version_to_data_offset(storage_object_t * UNUSED(obj), int minor_version) { u_int64_t offset; @@ -1493,7 +1493,7 @@ */ static void sb1_disk_to_cpu(mdp_sb_1_t * sb) { - int i; + u_int32_t i; LOG_ENTRY(); sb->magic = DISK_TO_CPU32(sb->magic); @@ -1531,7 +1531,7 @@ */ static void sb1_cpu_to_disk(mdp_sb_1_t * sb) { - int i; + u_int32_t i; LOG_ENTRY(); sb->magic = CPU_TO_DISK32(sb->magic); @@ -1565,7 +1565,7 @@ static void sb1_print_sb(void *super) { mdp_sb_1_t *sb = (mdp_sb_1_t *)super; - int i; + u_int32_t i; LOG_ENTRY(); LOG_DEBUG("Sizeof structure: %d bytes.\n", sizeof(*sb)); LOG_DEBUG("magic: %x.\n", sb->magic); @@ -1584,8 +1584,8 @@ LOG_DEBUG("dev_number: %d,\n", sb->dev_number); LOG_DEBUG("cnt_corrected_read: %d,\n", sb->cnt_corrected_read); LOG_DEBUG("events: %"PRIu64".\n", sb->events); - if (sb->resync_offset == -1) - LOG_DEBUG("resync_offset: -1.\n"); + if (sb->resync_offset == UINT64_MAX) + LOG_DEBUG("resync_offset: UINT64_MAX.\n"); else LOG_DEBUG("resync_offset: %"PRIu64".\n", sb->resync_offset); LOG_DEBUG("max_dev: %d,\n", sb->max_dev); @@ -1753,7 +1753,7 @@ sb->dev_number = member->dev_number; - if (member->data_size == -1) { + if (member->data_size == UINT64_MAX) { sb->data_size = md_object_usable_size(member->obj, &member->vol->sb_ver, member->vol->chunksize); @@ -1762,7 +1762,7 @@ sb->data_size = member->data_size; } - if (member->data_offset == -1) { + if (member->data_offset == UINT64_MAX) { sb->data_offset = sb1_minor_version_to_data_offset(member->obj, member->vol->sb_ver.minor_version); member->data_offset = sb->data_offset; @@ -1770,7 +1770,7 @@ sb->data_offset = member->data_offset; } - if (member->super_offset == -1) { + if (member->super_offset == UINT64_MAX) { sb->super_offset = sb1_minor_version_to_super_offset(member->obj, member->vol->sb_ver.minor_version); member->super_offset = sb->super_offset; @@ -1891,8 +1891,8 @@ } member->raid_disk = -1; - member->data_offset = -1; - member->data_size = -1; + member->data_offset = UINT64_MAX; + member->data_size = UINT64_MAX; member->flags = MD_MEMBER_DISK_REMOVED; out: LOG_EXIT_INT(rc); @@ -2132,7 +2132,7 @@ /* * Note: mark_removed parameter is not used in this function. */ -static int sb1_mark_disk_faulty(md_member_t *member, boolean mark_removed) +static int sb1_mark_disk_faulty(md_member_t *member, boolean UNUSED(mark_removed)) { mdp_sb_1_t *master_sb; int rc = 0; @@ -2164,13 +2164,13 @@ return rc; } -static int sb1_mark_disk_missing(md_volume_t *vol, int dev_number) +static int sb1_mark_disk_missing(md_volume_t *vol, u_int32_t dev_number) { mdp_sb_1_t *master_sb; int rc = 0; LOG_ENTRY(); - + if (!vol || !vol->sb) { LOG_MD_BUG(); rc = EINVAL; @@ -2277,7 +2277,7 @@ { mdp_sb_1_t *sb = (mdp_sb_1_t *)super; md_array_info_t *array; - int i; + u_int32_t i; LOG_ENTRY(); @@ -2320,7 +2320,7 @@ static void sb1_get_sb_info(void *super, md_super_info_t *info) { mdp_sb_1_t *sb = (mdp_sb_1_t *)super; - int i; + u_int32_t i; LOG_ENTRY(); @@ -2397,7 +2397,7 @@ return sb1->level; } -static int sb1_max_disks() +static uint sb1_max_disks() { return MD_SB_1_DISKS; } @@ -2479,11 +2479,11 @@ vol = member->vol; master = (mdp_sb_1_t *)vol->sb; - + if (vol->flags & (MD_NEW_REGION | MD_DEGRADED)) { LOG_WARNING("%s: Creating new array with missing disk," - " set resync_offset to -1.\n", vol->name); - master->resync_offset = -1; + " set resync_offset to UINT64_MAX.\n", vol->name); + master->resync_offset = UINT64_MAX; } /* Copy from master superblock */ @@ -2766,7 +2766,7 @@ goto out; } - if (member->dev_number == -1) { + if (member->dev_number == UINT32_MAX) { md_volume_get_super_info(vol, &info); vol->nr_disks = info.nr_disks; member->dev_number = vol->nr_disks; @@ -2860,7 +2860,7 @@ info.state_flags = MD_SUPER_INFO_CLEAN; vol->sb_func->set_sb_info(vol->sb, &info); vol->sb_func->mark_disk_missing(vol, info.nr_disks-1); - + /* Free all existing superblocks, then re-create from the master */ LIST_FOR_EACH(vol->members, iter, my_member) { if (my_member->sb) { @@ -2883,7 +2883,7 @@ vol->working_disks = info.working_disks; vol->failed_disks = info.failed_disks; vol->flags |= MD_DEGRADED; - + LOG_DEBUG("MD region %s: nr_disks(%d) raid_disks(%d) active_disks(%d)" " spare_disks(%d) working_disks(%d) failed_disks(%d).\n", vol->name, vol->nr_disks, vol->raid_disks, vol->active_disks, @@ -3223,7 +3223,7 @@ rc = EngFncs->read_object(obj, fd, buf, sects<<EVMS_VSECTOR_SIZE_SHIFT, loc<<EVMS_VSECTOR_SIZE_SHIFT); - if (rc == (sects<<EVMS_VSECTOR_SIZE_SHIFT)) { + if (rc == (int32_t) (sects<<EVMS_VSECTOR_SIZE_SHIFT)) { rc = 0; } else { LOG_ERROR("READ from %s failed, rc=%d.\n", obj->name, rc); Index: md_main.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/md/md_main.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- md_main.c 6 Jan 2009 23:05:11 -0000 1.59 +++ md_main.c 16 Jan 2009 18:14:38 -0000 1.60 @@ -73,10 +73,10 @@ LOG_ENTRY(); fp = fopen("/proc/version", "r"); - if (fp >= 0) { + if (fp != NULL) { fread(haystack, 1, 255, fp); fclose(fp); - + ver = strstr(haystack, needle); if (ver) { sscanf(ver, "%*s %d.%d.%d", &kernel_major, &kernel_minor, &kernel_patch); @@ -169,7 +169,7 @@ boolean load_kernel_md_driver(void) { FILE *fp; - + LOG_ENTRY(); if (md_driver_loaded == FALSE) { @@ -200,7 +200,7 @@ storage_object_t *region; LOG_ENTRY(); - + while (vol) { region = vol->region; if (region && (vol->flags & MD_DISCOVERED)) { @@ -226,7 +226,7 @@ storage_object_t *new_child) { int rc = 0; - logical_volume_t *evms_volume; + logical_volume_t *evms_volume; u_int64_t child_size, new_child_size; md_volume_t *vol; @@ -251,11 +251,11 @@ rc = EINVAL; goto out; } - + LOG_DEBUG("region: %s, child:%s, new child:%s\n", region->name, child->name, new_child ? new_child->name : "<unknown>"); - + if (new_child) { /* * The Engine passed in new child object, @@ -307,7 +307,7 @@ rc = EINVAL; goto out; } - + child_size = md_object_usable_size(child, &vol->sb_ver, vol->chunksize); new_child_size = md_object_usable_size(new_child, &vol->sb_ver, vol->chunksize); @@ -465,7 +465,7 @@ } -int md_can_deactivate_region(storage_object_t * region) +int md_can_deactivate_region(storage_object_t * UNUSED(region)) { LOG_ENTRY(); @@ -483,7 +483,7 @@ LOG_EXIT_INT(EFAULT); return EFAULT; } - + /* If the region is not active, just clear flags and return success */ if (!md_is_region_active(region)) { region->flags &= ~(SOFLAG_ACTIVE | SOFLAG_NEEDS_DEACTIVATE); @@ -513,7 +513,7 @@ } } } - + if (!rc || (rc == ENODEV)) { region->flags &= ~(SOFLAG_ACTIVE | SOFLAG_NEEDS_DEACTIVATE); rc = 0; @@ -577,7 +577,7 @@ recovery_running = TRUE; p += 6; } - + /* found mdx, break out of while() loop */ break; } @@ -606,12 +606,12 @@ vol = (md_volume_t *)region->private_data; recovery_running = mdstat_check_recovery(vol->md_minor, NULL); - + LOG_EXIT_INT(recovery_running); return recovery_running; } -int md_fix_dev_major_minor(md_volume_t *vol, boolean do_msg) +int md_fix_dev_major_minor(md_volume_t *vol, boolean UNUSED(do_msg)) { storage_object_t *obj; md_member_t *member; @@ -624,7 +624,7 @@ LOG_EXIT_INT(EFAULT); return EFAULT; } - + if (!vol->region) { LOG_MD_BUG(); LOG_EXIT_INT(EFAULT); @@ -643,12 +643,12 @@ LOG_EXIT_INT(0); return 0; } - + if (md_is_region_active(vol->region)) { LOG_WARNING("MD region %s is active, can not change device major/minor.\n", vol->name); LOG_EXIT_INT(0); - return 0; + return 0; } LIST_FOR_EACH(vol->members, iter, member) { @@ -657,8 +657,8 @@ if (obj->flags & SOFLAG_ACTIVE) { major = md_member_get_disk_major(member); minor = md_member_get_disk_minor(member); - if (( major != obj->dev_major) || - ( minor != obj->dev_minor)) { + if (( major != (int) obj->dev_major) || + ( minor != (int) obj->dev_minor)) { MESSAGE(_("Region %s: The MD superblock has old device " "major/minor number for object (%s). " "When this MD region is activated," @@ -693,7 +693,7 @@ "If you elect not to remove [%s] at this time, " "you should consider removing it later via the region's option menu.\n"), faulty->name, faulty->name, volume->name, faulty->name); - + return answer ? TRUE : FALSE; } @@ -713,7 +713,7 @@ LOG_EXIT_BOOL(TRUE); return TRUE; } - + if (md_is_region_active(region)) { if (region->volume) { if (!(region->volume->flags & VOLFLAG_COMPATIBILITY)) { @@ -727,7 +727,7 @@ rc = FALSE; } } - + if (EngFncs->list_count(region->parent_objects)) { LOG_DETAILS("Region %s has parent(s).\n", region->name); rc = FALSE; @@ -784,7 +784,7 @@ * This function performs an extensive search for a member whose object * major an minor match the input parameters. */ -md_member_t *md_find_member(int major, int minor) +md_member_t *md_find_member(u_int32_t major, u_int32_t minor) { md_volume_t *vol; list_element_t iter; @@ -828,7 +828,7 @@ return NULL; } -md_member_t * md_volume_find_member_from_major_minor(md_volume_t *vol, int major, int minor) +md_member_t * md_volume_find_member_from_major_minor(md_volume_t *vol, u_int32_t major, u_int32_t minor) { list_element_t iter; md_member_t *member; @@ -845,7 +845,7 @@ return NULL; } -md_member_t * md_volume_find_member(md_volume_t *vol, int dev_number) +md_member_t * md_volume_find_member(md_volume_t *vol, u_int32_t dev_number) { list_element_t iter; md_member_t *member; @@ -880,7 +880,7 @@ return FALSE; } -int md_volume_count_children(md_volume_t *vol) +uint md_volume_count_children(md_volume_t *vol) { int count=0; list_element_t iter; @@ -897,7 +897,7 @@ return count; } -int md_volume_count_active_disks(md_volume_t *vol) +uint md_volume_count_active_disks(md_volume_t *vol) { int count=0; list_element_t iter; @@ -916,7 +916,7 @@ return count; } -int md_volume_count_faulty_disks(md_volume_t *vol) +uint md_volume_count_faulty_disks(md_volume_t *vol) { int count=0; list_element_t iter; @@ -934,7 +934,7 @@ return count; } -int md_volume_count_spare_disks(md_volume_t *vol) +uint md_volume_count_spare_disks(md_volume_t *vol) { int count=0; list_element_t iter; @@ -952,7 +952,7 @@ return count; } -int md_volume_count_stale_disks(md_volume_t *vol) +uint md_volume_count_stale_disks(md_volume_t *vol) { int count=0; list_element_t iter; @@ -991,10 +991,10 @@ if (new_member) { new_member->obj = obj; new_member->raid_disk = -1; - new_member->dev_number = -1; - new_member->data_size = -1; - new_member->data_offset = -1; - new_member->super_offset = -1; + new_member->dev_number = UINT32_MAX; + new_member->data_size = UINT64_MAX; + new_member->data_offset = UINT64_MAX; + new_member->super_offset = UINT64_MAX; } LOG_EXIT_PTR(new_member); return new_member; @@ -1062,7 +1062,7 @@ LOG_EXIT_VOID(); return; } - + LIST_FOR_EACH(vol->members, iter, member) { md_free_member(member); } @@ -1080,7 +1080,7 @@ EngFncs->destroy_list(vol->ioctl_pkgs); vol->ioctl_pkgs = NULL; } - + if (vol->ioctl_cleanup != NULL) { free_ioctl_pkgs(vol); EngFncs->destroy_list(vol->ioctl_cleanup); @@ -1223,11 +1223,11 @@ return new_vol; } -int md_volume_sort_members(void *thing1, void *thing2, void *user_data) +int md_volume_sort_members(void *thing1, void *thing2, void * UNUSED(user_data)) { md_member_t *m1 = (md_member_t *)thing1; md_member_t *m2 = (md_member_t *)thing2; - + if (m1->dev_number < m2->dev_number) return -1; if (m1->dev_number > m2->dev_number) return 1; return 0; @@ -1257,7 +1257,7 @@ LOG_EXIT_VOID(); } -boolean md_volume_is_minor_taken(int md_minor) +boolean md_volume_is_minor_taken(u_int32_t md_minor) { md_volume_t *vol = volume_list_head; @@ -1380,7 +1380,7 @@ break; } } - + for (md_minor=limit; md_minor >= 0; md_minor--) { if (md_volume_is_minor_taken(md_minor) == FALSE) { @@ -1536,7 +1536,7 @@ /* * This common callback handler will free the memory allocated for disk_info */ -static int free_disk_info_post_ioctl(md_volume_t *vol, md_ioctl_pkg_t *pkg) +static int free_disk_info_post_ioctl(md_volume_t * UNUSED(vol), md_ioctl_pkg_t *pkg) { LOG_ENTRY(); if (pkg->parm.disk_info) { @@ -1582,7 +1582,7 @@ rc = EINVAL; goto out; } - + vol->flags |= MD_DIRTY; vol->commit_flag |= MD_COMMIT_DONT_CHECK_ACTIVE; @@ -1594,7 +1594,7 @@ } out: - + LOG_EXIT_INT(rc); return rc; } @@ -1652,7 +1652,7 @@ } md_append_region_to_object(vol->region, spare); - + LOG_EXIT_INT(0); return 0; @@ -1727,7 +1727,7 @@ evms_md_ioctl_parm_t parm; mdu_disk_info_t info; md_member_t *member; - + LOG_ENTRY(); member = md_volume_find_object(vol, spare); @@ -1755,7 +1755,7 @@ rc = ENODEV; goto out; } else { - if ((info.major != spare->dev_major) || (info.minor != spare->dev_minor)) { + if ((info.major != (int) spare->dev_major) || (info.minor != (int) spare->dev_minor)) { MESSAGE(_("WARNING: Region:%s, Device:%s: Index:%d\n" " There is a mismatch major/minor, Kernel MD driver has (%d:%d), EVMS has (%d:%d)." @@ -1767,7 +1767,7 @@ vol->name); } } - + disk_info = EngFncs->engine_alloc(sizeof(evms_md_disk_info_t)); if ( !disk_info ) { rc = ENOMEM; @@ -1798,7 +1798,7 @@ { int rc=0; md_member_t *member; - + LOG_ENTRY(); if (!vol || !spare) { LOG_EXIT_INT(EFAULT); @@ -1848,9 +1848,9 @@ mdu_disk_info_t info; md_member_t *member; int kernel_idx; - + LOG_ENTRY(); - + member = md_volume_find_object(vol, faulty); if (!member) { LOG_WARNING("%s is not in region %s.\n", faulty->name, vol->name); @@ -1873,7 +1873,7 @@ faulty->dev_minor); if (kernel_idx != -1) { /* Faulty disk is still in the active region */ - if (kernel_idx != member->dev_number) { + if (kernel_idx != (int) member->dev_number) { LOG_WARNING("The superblock has %s at index=%d," " whereas the kernel said index=%d.\n", faulty->name, member->dev_number, kernel_idx); @@ -1884,7 +1884,7 @@ goto out; } - if ((info.major != faulty->dev_major) || (info.minor != faulty->dev_minor)) { + if ((info.major != (int) faulty->dev_major) || (info.minor != (int) faulty->dev_minor)) { MESSAGE(_("WARNING: Region:%s, Device:%s: Index:%d\n" " There is a mismatch major/minor, Kernel MD driver has (%d:%d)," " EVMS has (%d:%d). However, if %s was created by another MD tool" @@ -1912,7 +1912,7 @@ } else { goto out_remove_faulty; } - + out_remove_faulty: rc = md_volume_remove_member(member, FALSE); if (!rc) { @@ -1991,15 +1991,15 @@ stale_disk->dev_minor); if (kernel_idx != -1) { /* Stale disk is still in the active region */ - if (kernel_idx != member->dev_number) { + if (kernel_idx != (int) member->dev_number) { LOG_WARNING("The superblock has %s at index=%d," " whereas the kernel said index=%d.\n", stale_disk->name, member->dev_number, kernel_idx); } info.number = kernel_idx; rc = md_ioctl_get_disk_info(vol->region, &info); - if (!rc && (info.major == stale_disk->dev_major) && - (info.minor == stale_disk->dev_minor)) { + if (!rc && (info.major == (int) stale_disk->dev_major) && + (info.minor == (int) stale_disk->dev_minor)) { if (!(info.state & (1<<MD_DISK_REMOVED))) { disk_info = EngFncs->engine_alloc(sizeof(evms_md_disk_info_t)); if (!disk_info ) { Index: md.h =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/md/md.h,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- md.h 15 Feb 2005 00:38:53 -0000 1.60 +++ md.h 16 Jan 2009 18:14:38 -0000 1.61 @@ -246,7 +246,7 @@ #define MD_COMMIT_BACKUP_METADATA (1 << 1) typedef struct md_volume_s { - storage_object_t * region; + storage_object_t * region; list_anchor_t members; // List of all members (ie. disks) md_sb_ver_t sb_ver; // Version of MD superblock void *sb; // Master superblock @@ -355,9 +355,9 @@ md_member_t * md_volume_find_object(md_volume_t *vol, storage_object_t *obj); int find_disk_in_active_region(storage_object_t *region, int major, int minor); -md_member_t *md_find_member(int major, int minor); -md_member_t * md_volume_find_member(md_volume_t *vol, int dev_number); -md_member_t * md_volume_find_member_from_major_minor(md_volume_t *vol, int major, int minor); +md_member_t *md_find_member(u_int32_t major, u_int32_t minor); +md_member_t * md_volume_find_member(md_volume_t *vol, u_int32_t dev_number); +md_member_t * md_volume_find_member_from_major_minor(md_volume_t *vol, u_int32_t major, u_int32_t minor); //int find_empty_slot(mdp_super_t *sb); int md_fix_dev_major_minor(md_volume_t * vol, boolean do_msg); @@ -368,7 +368,7 @@ void md_free_volume(md_volume_t *vol); int md_delete_volume(md_volume_t * volume, boolean tear_down); md_volume_t * md_clone_volume(md_volume_t *vol); -boolean md_volume_is_minor_taken(int md_minor); +boolean md_volume_is_minor_taken(u_int32_t md_minor); storage_object_t * md_find_valid_input_object( char * name ); @@ -376,11 +376,11 @@ int md_volume_get_alternative_name(md_volume_t *vol, int limit); int md_volume_sort_members(void *thing1, void *thing2, void *user_data); -int md_volume_count_children(md_volume_t *vol); -int md_volume_count_active_disks(md_volume_t *vol); -int md_volume_count_faulty_disks(md_volume_t *vol); -int md_volume_count_spare_disks(md_volume_t *vol); -int md_volume_count_stale_disks(md_volume_t *vol); +uint md_volume_count_children(md_volume_t *vol); +uint md_volume_count_active_disks(md_volume_t *vol); +uint md_volume_count_faulty_disks(md_volume_t *vol); +uint md_volume_count_spare_disks(md_volume_t *vol); +uint md_volume_count_stale_disks(md_volume_t *vol); u_int64_t md_volume_smallest_data_size(md_volume_t *vol); void md_volume_add_member(md_volume_t *vol, md_member_t *member); Index: md_dlist.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/md/md_dlist.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- md_dlist.c 28 Nov 2005 14:29:46 -0000 1.42 +++ md_dlist.c 16 Jan 2009 18:14:38 -0000 1.43 @@ -145,7 +145,7 @@ * This function should be called by each of the pesonalities * at the end of their final discovery process. */ -void md_display_corrupt_messages(int personality) +void md_display_corrupt_messages(u_int32_t personality) { list_element_t iter1; list_element_t iter2; @@ -312,7 +312,7 @@ { int rc=0; list_element_t li = NULL; - + LOG_ENTRY(); li = EngFncs->insert_thing(objects, object, INSERT_AFTER, NULL); @@ -375,7 +375,7 @@ { md_setup_func_t *setup; list_element_t iter1, iter2; - + LOG_ENTRY(); LIST_FOR_EACH_SAFE(vol->setup_funcs,iter1,iter2,setup) { @@ -397,14 +397,14 @@ int rc=0; md_setup_func_t *setup; list_element_t li; - + LOG_ENTRY(); if (!vol) { LOG_MD_BUG(); LOG_EXIT_INT(EFAULT); return EFAULT; - + } if (!vol->region) { @@ -419,7 +419,7 @@ } setup = EngFncs->engine_alloc(sizeof(md_setup_func_t)); - + if (!setup) { LOG_EXIT_INT(ENOMEM); return ENOMEM; @@ -427,7 +427,7 @@ setup->disk_info = disk_info; setup->setup_func = setup_func; - + li = EngFncs->insert_thing(vol->setup_funcs, setup, INSERT_AFTER, NULL); if (!li) { EngFncs->engine_free(setup); @@ -446,7 +446,7 @@ md_volume_t * vol; LOG_ENTRY(); - + if (!region) { LOG_EXIT_INT(EFAULT); return rc; @@ -457,7 +457,7 @@ LOG_EXIT_INT(EFAULT); return rc; } - + LIST_FOR_EACH_SAFE(vol->setup_funcs, iter1, iter2, setup) { setup->proceed = TRUE; rc = setup->setup_func(vol, setup); @@ -478,7 +478,7 @@ { md_ioctl_pkg_t *pkg; list_element_t iter1, iter2; - + LOG_ENTRY(); if (vol->... [truncated message content] |
From: Steve D. <ste...@us...> - 2009-01-16 16:05:26
|
Update of /cvsroot/evms/evms2/engine/plugins/mac In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20243 Modified Files: commit.c discovery.c dm.c mac_disklabel.h options.c segments.c Log Message: Cleanup compiler warnings. Added bonus: My editor cleans up trailing whitespace. Index: dm.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/mac/dm.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- dm.c 31 Aug 2004 17:55:29 -0000 1.8 +++ dm.c 16 Jan 2009 16:05:22 -0000 1.9 @@ -34,7 +34,7 @@ /* * Function: mac_can_activate */ -int mac_can_activate( DISKSEG *seg ) +int mac_can_activate( DISKSEG * UNUSED(seg) ) { LOG_ENTRY(); @@ -86,7 +86,7 @@ /* * Function: mac_can_deactivate */ -int mac_can_deactivate( DISKSEG *seg ) +int mac_can_deactivate( DISKSEG * UNUSED(seg) ) { LOG_ENTRY(); Index: options.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/mac/options.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- options.c 31 Aug 2004 18:02:22 -0000 1.10 +++ options.c 16 Jan 2009 16:05:22 -0000 1.11 @@ -106,7 +106,7 @@ /* * Returns MAC metadata specific information ... under construction */ -int mac_get_metadata_info( storage_object_t * object, extended_info_array_t * * info) +int mac_get_metadata_info( storage_object_t * UNUSED(object), extended_info_array_t * * info) { int rc; @@ -132,7 +132,7 @@ /* * Returns plugin specific information */ -int mac_get_plugin_info( char * descriptor_name, extended_info_array_t * * info ) +int mac_get_plugin_info( char * UNUSED(descriptor_name), extended_info_array_t * * info ) { int rc = EINVAL; extended_info_array_t *Info; Index: discovery.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/mac/discovery.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- discovery.c 4 Jun 2004 21:48:10 -0000 1.11 +++ discovery.c 16 Jan 2009 16:05:22 -0000 1.12 @@ -113,7 +113,8 @@ */ static int get_segments( LOGICALDISK *ld, mac_disklabel_t *disklabel ) { - int rc=EINVAL,i; + int rc=EINVAL; + u_int32_t i; DISKSEG *seg=NULL; int seg_count=0; u_int32_t map_count=0; Index: segments.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/mac/segments.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- segments.c 22 Feb 2006 16:05:14 -0000 1.11 +++ segments.c 16 Jan 2009 16:05:22 -0000 1.12 @@ -31,7 +31,7 @@ #include "mac_plugin.h" -int mac_can_set_volume( DISKSEG * seg, boolean flag ) +int mac_can_set_volume( DISKSEG * seg, boolean UNUSED(flag) ) { int rc = 0; @@ -74,7 +74,7 @@ * copied to the output_object list. * */ -int mac_discover( list_anchor_t input_objects, list_anchor_t output_objects, boolean final_call) +int mac_discover( list_anchor_t input_objects, list_anchor_t output_objects, boolean UNUSED(final_call)) { uint count = 0; list_element_t iter; @@ -159,7 +159,7 @@ } -int mac_destroy( DISKSEG * seg, list_anchor_t child_objects ) +int mac_destroy( DISKSEG * seg, list_anchor_t UNUSED(child_objects) ) { int rc = EINVAL; DISKSEG *metadata=NULL; @@ -404,7 +404,7 @@ } -void mac_set_volume(storage_object_t * object, boolean flag) +void mac_set_volume(storage_object_t * UNUSED(object), boolean UNUSED(flag)) { return; } Index: commit.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/mac/commit.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- commit.c 19 Nov 2004 22:45:59 -0000 1.9 +++ commit.c 16 Jan 2009 16:05:22 -0000 1.10 @@ -40,7 +40,8 @@ DISKSEG *seg; char *buffer; disk_private_data_t *disk_pdata; - int rc = 0, i; + int rc = 0; + sector_count_t i; seg_private_data_t *pdata; int map_count=0; int count=0; @@ -64,7 +65,7 @@ REQUIRE(buffer != NULL); - disklabel = (mac_disklabel_t *) buffer; + disklabel = (mac_disklabel_t *) buffer; // read mac info & verify we have valid disk label rc = READ( ld, md->start, md->size, buffer ); @@ -75,7 +76,7 @@ } if (!rc) { - vsectors_per_block = MAC_DISK_TO_CPU16(disklabel->block_size)>>EVMS_VSECTOR_SIZE_SHIFT; + vsectors_per_block = MAC_DISK_TO_CPU16(disklabel->block_size)>>EVMS_VSECTOR_SIZE_SHIFT; pmap = buffer + (vsectors_per_block*EVMS_VSECTOR_SIZE); max_map_count = md->size - vsectors_per_block; } @@ -83,11 +84,11 @@ free(buffer); LOG_EXIT_INT(rc); return rc; - } + } - // walk through the partition table, removing all linux partition records + // walk through the partition table, removing all linux partition records // by replacing them with Apple Scratch records - LOG_DEBUG("there should be %d partition records\n", disk_pdata->pcount); + LOG_DEBUG("there should be %d partition records\n", disk_pdata->pcount); for ( i=0; (i<max_map_count)&&(rc==0); i++ ) { p = (mac_partition_t *) (pmap + (i*vsectors_per_block*EVMS_VSECTOR_SIZE)); @@ -95,13 +96,13 @@ strncpy(pname, p->name, PMAP_STRING_SIZE); strncpy(ptype, p->type, PMAP_STRING_SIZE); - LOG_DEBUG( " Index (%d): type: %s name: %s\n", i, ptype, pname ); + LOG_DEBUG( " Index (%"PRIu64"): type: %s name: %s\n", i, ptype, pname ); if ( MAC_DISK_TO_CPU32(p->status) & MAC_STATUS_VALID ) { if ( isa_mac_data_partition(p) == TRUE ) { LOG_DEBUG(" clearing the entry\n"); - memset( (void *) p, 0, sizeof(mac_partition_t) ); + memset( (void *) p, 0, sizeof(mac_partition_t) ); } else { LOG_DEBUG(" not clearing entry\n"); @@ -115,7 +116,7 @@ } - // now walk through the segment list on this drive and add each + // now walk through the segment list on this drive and add each // segment to the PMAP LIST_FOR_EACH( ld->parent_objects, iter, seg ) { @@ -130,12 +131,12 @@ p = (mac_partition_t *) (pmap + (i*vsectors_per_block*EVMS_VSECTOR_SIZE)); if ( isa_mac_null_partition(p)==TRUE) { - rc = 0; + rc = 0; } } if (!rc) { - memcpy( (void *) p, (void *) &pdata->p_record, sizeof(mac_partition_t) ); + memcpy( (void *) p, (void *) &pdata->p_record, sizeof(mac_partition_t) ); } } @@ -143,23 +144,23 @@ } // tally up the partitions to get a current map count - map_count = 0; + map_count = 0; for ( i=0; i<max_map_count; i++) { p = (mac_partition_t *) (pmap + (i*vsectors_per_block*EVMS_VSECTOR_SIZE)); if ( MAC_DISK_TO_CPU32(p->status) & MAC_STATUS_VALID ) { ++map_count; } - } + } // keep map count current in the disk private data disk_pdata->pcount = map_count; - // update the map_count in each partition record - count = 0; + // update the map_count in each partition record + count = 0; for ( i=0; i<max_map_count && count<map_count; i++) { p = (mac_partition_t *) (pmap + (i*vsectors_per_block*EVMS_VSECTOR_SIZE)); if ( MAC_DISK_TO_CPU32(p->status) & MAC_STATUS_VALID ) { - p->map_count = CPU_TO_MAC_DISK32(map_count); + p->map_count = CPU_TO_MAC_DISK32(map_count); ++count; } } @@ -184,7 +185,7 @@ * * Called to commit the mac disk label information. */ -int commit_mac_segments( DISKSEG *seg, LOGICALDISK *ld, uint commit_phase ) +int commit_mac_segments( DISKSEG *seg, LOGICALDISK *ld, uint UNUSED(commit_phase) ) { int rc=0; Index: mac_disklabel.h =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/mac/mac_disklabel.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mac_disklabel.h 25 Sep 2003 14:54:24 -0000 1.3 +++ mac_disklabel.h 16 Jan 2009 16:05:22 -0000 1.4 @@ -27,11 +27,11 @@ /* mac disk labeling follows these rules: - - If you will be creating a MacOS compatibility disk then you need to keep several partitions + + If you will be creating a MacOS compatibility disk then you need to keep several partitions for MacOS. - - order type name length system + + order type name length system ----------------------------------------------------------------------------------------- 1 Apple_partition_map Apple 63 (1st track ?) partition map 2 Apple_Driver43 Macintosh 54 driver 4.3 @@ -41,35 +41,35 @@ 6 Apple_Bootstrap bootstrap 1600 unknown 7 Apple_Free Extra xxxx free space for linux partitions 8 Apple_HFS untitled xxxx HFS ... min of 160 meg - + Mac partitions have both a type and a name and both are strings! - - NewWorld Macs are those brightly colored machines. - + + NewWorld Macs are those brightly colored machines. + For NewWorld PowerMac systems you must have an 800k Apple_Bootstrap partition appearing before any MacOS - partitions. - + partitions. + You could create an Apple_UNIX_SRV2 partition in the free space and use it as Linux native. - + Linux partitions should always appear before the MacOS or MacOSX partitions. - + In the mac disklabel ... a block == a hardsector ... 512 bytes. - + The partition name does not matter EXCEPT for swap ... which should be named swap. using mount points as the partition name is a good idea. - + MacOSX uses UFS partitions created by Drive Setup as a placeholder. It deletes them and creates two bootstrap partitions ... then recreates a UFS partition with the remainder of the room. - + Creating more than 15 partitions is not advised. - + */ -#define MAC_DISK_MAGIC 0x4552 +#define MAC_DISK_MAGIC 0x4552 typedef struct mac_driver_desc { - u_int16_t signature; // MAC_DRIVER_MAGIC + u_int16_t signature; // MAC_DRIVER_MAGIC u_int16_t block_size; // usually 512 ... could be some multiple of 2 ? u_int32_t block_count; // size of driver in blocks u_int16_t dev_type; // ? @@ -83,21 +83,21 @@ } mac_disklabel_t; -#define MAC_PARTITION_MAGIC 0x504d -#define MAC_STATUS_BOOTABLE 8 // means partition is bootable +#define MAC_PARTITION_MAGIC 0x504d +#define MAC_STATUS_BOOTABLE 8 // means partition is bootable #define PMAP_STRING_SIZE 32 // maximum string size in a mac partition record typedef struct mac_partition { - u_int16_t signature; // MAC_PARTITION_MAGIC + u_int16_t signature; // MAC_PARTITION_MAGIC u_int16_t res1; - u_int32_t map_count; // # blocks in partition map - u_int32_t start_block; // absolute starting block # of partition - u_int32_t block_count; // number of blocks in partition - char name[PMAP_STRING_SIZE]; // partition name - char type[PMAP_STRING_SIZE]; // string type description - u_int32_t data_start; // rel block # of first data block - u_int32_t data_count; // number of data blocks - u_int32_t status; // partition status bits + u_int32_t map_count; // # blocks in partition map + u_int32_t start_block; // absolute starting block # of partition + u_int32_t block_count; // number of blocks in partition + char name[PMAP_STRING_SIZE]; // partition name + char type[PMAP_STRING_SIZE]; // string type description + u_int32_t data_start; // rel block # of first data block + u_int32_t data_count; // number of data blocks + u_int32_t status; // partition status bits u_int32_t boot_start; u_int32_t boot_size; u_int32_t boot_load; @@ -126,7 +126,7 @@ #define MAC_UNIX_SVR2 "Apple_Unix_SVR2" // some kind of Unix partition ... Linux -#define MAC_STATUS_MASK 0x7F // mask for partition record status field +#define MAC_STATUS_MASK 0x7F // mask for partition record status field #define MAC_STATUS_VALID 0x01 // partition record is valid #define MAC_STATUS_ALLOCATED 0x02 // partition is allocated #define MAC_STATUS_INUSE 0x04 // partition in-use ... cleared with reboot @@ -140,9 +140,9 @@ static inline void string_to_upper_case(char *str) { - int i; + size_t i; for(i=0;i<strlen(str); i++){ - if (str[i] >= 'a' && str[i] <= 'z') { + if (str[i] >= 'a' && str[i] <= 'z') { str[i] -= 0x20; } } @@ -151,37 +151,37 @@ static inline boolean isa_mac_pmap_partition( mac_partition_t *p ) { - if ( strncmp(p->type,MAC_PMAP_STRING,PMAP_STRING_SIZE) == 0 ) { + if ( strncmp(p->type,MAC_PMAP_STRING,PMAP_STRING_SIZE) == 0 ) { return TRUE; } - + return FALSE; } static inline boolean isa_mac_freespace_partition( mac_partition_t *p ) { - if ( strncmp(p->type,MAC_FREE_STRING,PMAP_STRING_SIZE) == 0 ) { + if ( strncmp(p->type,MAC_FREE_STRING,PMAP_STRING_SIZE) == 0 ) { return TRUE; } - + return FALSE; } static inline boolean isa_mac_scratch_partition( mac_partition_t *p ) { - if ( strncmp(p->type,MAC_SCRATCH_STRING,PMAP_STRING_SIZE) == 0 ) { + if ( strncmp(p->type,MAC_SCRATCH_STRING,PMAP_STRING_SIZE) == 0 ) { return TRUE; } - + return FALSE; } static inline boolean isa_mac_null_partition( mac_partition_t *p ) { - if ( strlen(p->type)==0 && strlen(p->name)==0 ) { + if ( strlen(p->type)==0 && strlen(p->name)==0 ) { return TRUE; } - + return FALSE; } @@ -194,13 +194,13 @@ strncpy(p_name, p->name, PMAP_STRING_SIZE); string_to_upper_case(p_name); - if ( strncmp(p_name,"LINUX",PMAP_STRING_SIZE) == 0 || - strncmp(p_name,"SWAP", PMAP_STRING_SIZE) == 0 ) { + if ( strncmp(p_name,"LINUX",PMAP_STRING_SIZE) == 0 || + strncmp(p_name,"SWAP", PMAP_STRING_SIZE) == 0 ) { return TRUE; } } - + return FALSE; } @@ -212,7 +212,7 @@ isa_mac_null_partition( p ) == FALSE ) { return TRUE; } - + return FALSE; } |
From: Steve D. <ste...@us...> - 2009-01-16 16:01:55
|
Update of /cvsroot/evms/evms2/engine/plugins/lvm2 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20086 Modified Files: containers.c lvm2.c metadata.c options.c regions.c Log Message: Cleanup warning messages. Added bonus: My editor cleans up trailing whitespace. Index: metadata.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm2/metadata.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- metadata.c 20 Aug 2008 23:56:39 -0000 1.19 +++ metadata.c 16 Jan 2009 16:01:52 -0000 1.20 @@ -579,7 +579,8 @@ { label_header_t *label; u_int32_t crc; - int sector, rc; + lsn_t sector; + int rc; LOG_ENTRY(); @@ -600,7 +601,7 @@ rc = memcmp(label->id, LVM2_LABEL_ID, sizeof(label->id)); if (rc) { LOG_DEBUG("No LVM2 label found on object %s, " - "sector %u\n", object->name, sector); + "sector %"PRIu64"\n", object->name, sector); rc = EINVAL; continue; } @@ -612,7 +613,7 @@ EVMS_VSECTOR_SIZE - ((void*)&label->offset - (void*)label)); if (DISK_TO_CPU32(label->crc) != crc) { - LOG_WARNING("Found LVM2 label on object %s, sector %u " + LOG_WARNING("Found LVM2 label on object %s, sector %"PRIu64" " "with wrong CRC.\n", object->name, sector); LOG_WARNING("Found CRC %u, expecting %u\n", crc, DISK_TO_CPU32(label->crc)); @@ -626,7 +627,7 @@ if (label->sector != sector) { LOG_WARNING("Found LVM2 label on object %s at wrong " "sector.\n", object->name); - LOG_WARNING("Found at sector %u, expected at " + LOG_WARNING("Found at sector %"PRIu64", expected at " "%"PRIu64"\n", sector, label->sector); rc = EINVAL; continue; @@ -635,14 +636,14 @@ /* Verify the label type. */ rc = memcmp(label->type, LVM2_LABEL_TYPE, sizeof(label->type)); if (rc) { - LOG_WARNING("Found LVM2 label on object %s, sector %u " + LOG_WARNING("Found LVM2 label on object %s, sector %"PRIu64" " "with wrong type.\n", object->name, sector); rc = EINVAL; continue; } /* Found a valid label. */ - LOG_DETAILS("Found LVM2 label on object %s, sector %u.\n", + LOG_DETAILS("Found LVM2 label on object %s, sector %"PRIu64".\n", object->name, sector); *pv_label = label; break; Index: lvm2.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm2/lvm2.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- lvm2.c 16 Jun 2005 16:53:49 -0000 1.34 +++ lvm2.c 16 Jan 2009 16:01:52 -0000 1.35 @@ -388,7 +388,7 @@ * its producing container and remove the region from any PV's parent-objects * list. **/ -static int lvm2_delete(storage_object_t *region, list_anchor_t child_objects) +static int lvm2_delete(storage_object_t *region, list_anchor_t UNUSED(child_objects)) { storage_container_t *container = region->producing_container; int rc; @@ -426,7 +426,7 @@ **/ static int lvm2_expand(storage_object_t *region, storage_object_t *expand_object, - list_anchor_t input_objects, + list_anchor_t UNUSED(input_objects), option_array_t *options) { storage_container_t *container = region->producing_container; @@ -522,7 +522,7 @@ **/ static int lvm2_shrink(storage_object_t *region, storage_object_t *shrink_object, - list_anchor_t input_objects, + list_anchor_t UNUSED(input_objects), option_array_t *options) { storage_container_t *container = region->producing_container; @@ -598,7 +598,7 @@ * * All LVM2 metadata commits are done in lvm2_commit_container_changes. **/ -static int lvm2_commit_changes(storage_object_t *region, commit_phase_t phase) +static int lvm2_commit_changes(storage_object_t *region, commit_phase_t UNUSED(phase)) { LOG_ENTRY(); region->flags &= ~(SOFLAG_DIRTY | SOFLAG_NEW); @@ -846,7 +846,7 @@ * option-descriptor based on these selected-objects. **/ static int lvm2_set_objects(task_context_t *context, - list_anchor_t declined_objects, /* of type declined_handle_t */ + list_anchor_t UNUSED(declined_objects), /* of type declined_handle_t */ task_effect_t *effect) { int rc; @@ -1068,7 +1068,7 @@ extended_info_array_t *info = NULL; char buffer[50] = {0}; int i = 0, rc = 0; - + LOG_ENTRY(); if (info_name) { @@ -1327,7 +1327,7 @@ **/ static int lvm2_function(storage_object_t *region, task_action_t action, - list_anchor_t objects, + list_anchor_t UNUSED(objects), option_array_t *options) { int rc; @@ -1420,7 +1420,7 @@ "deleted.\n", container->name, count-1); rc = EBUSY; } - + LOG_EXIT_INT(rc); return rc; } @@ -1544,9 +1544,9 @@ * * When expanding a PV, LVM2 doesn't care how much the PV expands by. **/ -static int lvm2_can_expand_container_by(storage_container_t *container, - storage_object_t *consumed_object, - sector_count_t *delta_size) +static int lvm2_can_expand_container_by(storage_container_t * UNUSED(container), + storage_object_t * UNUSED(consumed_object), + sector_count_t * UNUSED(delta_size)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -1984,8 +1984,8 @@ * * Return an array of plugin functions that you support for this container. **/ -static int lvm2_get_container_functions(storage_container_t *container, - function_info_array_t **actions) +static int lvm2_get_container_functions(storage_container_t * UNUSED(container), + function_info_array_t ** UNUSED(actions)) { LOG_ENTRY(); LOG_EXIT_INT(ENOSYS); @@ -1997,10 +1997,10 @@ * * Execute the plug-in function on the container. **/ -static int lvm2_container_function(storage_container_t *container, - task_action_t action, - list_anchor_t objects, - option_array_t *options) +static int lvm2_container_function(storage_container_t * UNUSED(container), + task_action_t UNUSED(action), + list_anchor_t UNUSED(objects), + option_array_t * UNUSED(options)) { LOG_ENTRY(); LOG_EXIT_INT(ENOSYS); Index: options.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm2/options.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- options.c 19 May 2005 16:59:09 -0000 1.24 +++ options.c 16 Jan 2009 16:01:52 -0000 1.25 @@ -415,7 +415,7 @@ * selected container. **/ int expand_container_set_objects(task_context_t *context, - task_effect_t *effect) + task_effect_t * UNUSED(effect)) { container_data_t *c_data = context->container->private_data; storage_object_t *object; @@ -500,7 +500,7 @@ * from the selected container. **/ int shrink_container_set_objects(task_context_t *context, - task_effect_t *effect) + task_effect_t * UNUSED(effect)) { storage_container_t *container = context->container; storage_object_t *object; @@ -1778,7 +1778,7 @@ int shrink_region_set_option(task_context_t *context, u_int32_t index, value_t *value, - task_effect_t *effect) + task_effect_t * UNUSED(effect)) { option_desc_array_t *od = context->option_descriptors; int rc = 0; @@ -1950,7 +1950,7 @@ int set_region_info_set_option(task_context_t *context, u_int32_t index, value_t *value, - task_effect_t *effect) + task_effect_t * UNUSED(effect)) { storage_container_t *container = context->object->producing_container; option_desc_array_t *od = context->option_descriptors; @@ -1984,7 +1984,7 @@ * * Parse the option-values from the option-array. **/ -void set_region_info_parse_options(storage_object_t *region, +void set_region_info_parse_options(storage_object_t * UNUSED(region), option_array_t *options, char **lv_name) { @@ -2090,7 +2090,7 @@ int set_container_info_set_option(task_context_t *context, u_int32_t index, value_t *value, - task_effect_t *effect) + task_effect_t * UNUSED(effect)) { option_desc_array_t *od = context->option_descriptors; int rc; @@ -2123,7 +2123,7 @@ * * Parse the option-values from the option-array. **/ -void set_container_info_parse_options(storage_container_t *container, +void set_container_info_parse_options(storage_container_t * UNUSED(container), option_array_t *options, char **vg_name) { @@ -2819,7 +2819,8 @@ option_desc_array_t *od = context->option_descriptors; storage_object_t *object, *region = context->object; region_mapping_t *r_map; - int i, rc; + uint i; + int rc; LOG_ENTRY(); @@ -3031,7 +3032,7 @@ /* Default values. */ *r_map_index = 0; *stripe_index = 0; - *object_name = NULL; + *object_name = NULL; *extent_index = 0; LOG_ENTRY(); Index: regions.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm2/regions.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- regions.c 22 Feb 2006 20:21:25 -0000 1.22 +++ regions.c 16 Jan 2009 16:01:52 -0000 1.23 @@ -50,7 +50,7 @@ dm_target_stripe_t *stripe = NULL; dm_device_t *linear; list_element_t iter; - int i; + u_int64_t i; LOG_ENTRY(); LOG_DEBUG("Building target list for region %s.\n", region->name); @@ -499,7 +499,7 @@ r_map->r_data = r_data; EngFncs->insert_thing(r_data->mappings, r_map, flag, iter); increment_region_size(r_data->region, r_map); - + LOG_EXIT_VOID(); } @@ -1809,7 +1809,8 @@ u_int64_t *object_extents, i = 0; storage_object_t *object; list_element_t iter; - int j, rc = 0; + u_int32_t j; + int rc = 0; LOG_ENTRY(); @@ -2387,7 +2388,7 @@ rc = ENOMEM; goto out; } - + /* Set up the LE-maps for the new mappings. */ for (i = 0; i < r_map->stripe_count; i++) { pv_indexes[i] = r_map->le_maps[i].map[0].pe->pv_data->pv_index; Index: containers.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm2/containers.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- containers.c 7 Dec 2004 04:25:19 -0000 1.18 +++ containers.c 16 Jan 2009 16:01:52 -0000 1.19 @@ -443,7 +443,8 @@ { container_data_t *c_data = container->private_data; key_value_t *node; - int seqno, rc = 0; + u_int32_t seqno; + int rc = 0; LOG_ENTRY(); @@ -967,7 +968,7 @@ **/ int add_object(storage_object_t *object, storage_container_t *container, - option_array_t *options) + option_array_t * UNUSED(options)) { storage_object_t *this_object; list_element_t iter; @@ -1234,7 +1235,7 @@ /* Calculate the number of extents to remove after the object shrunk. */ new_size = consumed_object->size; delta_size = old_size - new_size; - removed_extents = (delta_size / c_data->pe_size) + + removed_extents = (delta_size / c_data->pe_size) + ((delta_size % c_data->pe_size) ? 1 : 0); /* Save the old PE map and allocate a new PE map. */ |
From: Steve D. <ste...@us...> - 2009-01-16 15:58:33
|
Update of /cvsroot/evms/evms2/engine/plugins/lvm In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19857 Modified Files: lvm_groups.c lvm_info.c lvm_io.c lvm_move.c lvm_options.c lvm_pv.c lvm_pv.h lvm_volumes.c lvmregmgr.c lvmregmgr.h Log Message: Cleanup compiler warnings. Added bonus: My editor cleans up trailing whitespace. Index: lvm_options.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_options.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- lvm_options.c 13 Jan 2005 18:27:02 -0000 1.35 +++ lvm_options.c 16 Jan 2009 15:58:28 -0000 1.36 @@ -47,7 +47,8 @@ char * vg_name, u_int32_t * pe_size) { - int i, rc = 0; + uint i; + int rc = 0; LOG_ENTRY(); @@ -182,7 +183,7 @@ * on which objects are selected. **/ int lvm_create_container_set_objects(task_context_t * context, - list_anchor_t declined_objects, + list_anchor_t UNUSED(declined_objects), task_effect_t * effect) { storage_object_t * segment; @@ -305,7 +306,8 @@ lvm_physical_volume_t * pv_entries[], lvm_volume_group_t * group) { - int i, rc = 0; + uint i; + int rc = 0; LOG_ENTRY(); @@ -341,7 +343,8 @@ lvm_volume_group_t * group, lvm_lv_create_options_t * lv_opts) { - int i, rc; + uint i; + int rc; LOG_ENTRY(); @@ -627,7 +630,7 @@ * declined_objects. **/ int lvm_create_region_set_objects(task_context_t * context, - list_anchor_t declined_objects, + list_anchor_t UNUSED(declined_objects), task_effect_t * effect) { lvm_logical_volume_t * freespace; @@ -717,7 +720,8 @@ u_int32_t extents = 0; u_int32_t lv_size = 0; u_int32_t stripes = 1; - int i, rc = 0; + uint i; + int rc = 0; LOG_ENTRY(); @@ -869,7 +873,8 @@ lvm_logical_volume_t * volume, lvm_lv_expand_options_t * lv_opts) { - int i, j, rc = 0; + uint i, j; + int rc = 0; LOG_ENTRY(); @@ -1161,7 +1166,8 @@ u_int32_t add_extents = 0; u_int32_t add_size = 0; sector_count_t add_sectors; - int i, rc = 0; + uint i; + int rc = 0; LOG_ENTRY(); @@ -1333,7 +1339,8 @@ { u_int32_t extents = 0; u_int32_t size = 0; - int i, rc; + uint i; + int rc; LOG_ENTRY(); @@ -1742,8 +1749,8 @@ * declined_objects. **/ int lvm_expand_container_set_objects(task_context_t * context, - list_anchor_t declined_objects, - task_effect_t * effect) + list_anchor_t UNUSED(declined_objects), + task_effect_t * UNUSED(effect)) { lvm_volume_group_t * group = context->container->private_data; storage_object_t * segment; @@ -1789,10 +1796,10 @@ * This is a helper function for lvm_set_option. Since there are no options * for container expansion, this function is mostly a no-op. **/ -void lvm_expand_container_set_option(task_context_t * context, - u_int32_t index, - value_t * value, - task_effect_t * effect) +void lvm_expand_container_set_option(task_context_t * UNUSED(context), + u_int32_t UNUSED(index), + value_t * UNUSED(value), + task_effect_t * UNUSED(effect)) { LOG_ENTRY(); LOG_EXIT_VOID(); @@ -1860,13 +1867,14 @@ * declined_objects. **/ int lvm_shrink_container_set_objects(task_context_t * context, - list_anchor_t declined_objects, - task_effect_t * effect) + list_anchor_t UNUSED(declined_objects), + task_effect_t * UNUSED(effect)) { lvm_volume_group_t * group = context->container->private_data; storage_object_t * segment; list_element_t itr; - int rc, count; + int rc; + uint count; LOG_ENTRY(); @@ -1901,10 +1909,10 @@ * This is a helper function for lvm_set_option. Since there are no options * for container shrink, this function is mostly a no-op. **/ -void lvm_shrink_container_set_option(task_context_t * context, - u_int32_t index, - value_t * value, - task_effect_t * effect) +void lvm_shrink_container_set_option(task_context_t * UNUSED(context), + u_int32_t UNUSED(index), + value_t * UNUSED(value), + task_effect_t * UNUSED(effect)) { LOG_ENTRY(); LOG_EXIT_VOID(); @@ -1958,7 +1966,7 @@ int lvm_set_volume_info_set_option(task_context_t * context, u_int32_t index, value_t * value, - task_effect_t * effect) + task_effect_t * UNUSED(effect)) { option_desc_array_t *od = context->option_descriptors; storage_object_t *region = context->object; @@ -1993,7 +2001,7 @@ * * Parse the option-values from the option-array. **/ -void lvm_set_volume_info_parse_options(lvm_logical_volume_t *volume, +void lvm_set_volume_info_parse_options(lvm_logical_volume_t * UNUSED(volume), option_array_t *options, char **lv_name) { @@ -2091,7 +2099,7 @@ int lvm_set_group_info_set_option(task_context_t * context, u_int32_t index, value_t * value, - task_effect_t * effect) + task_effect_t * UNUSED(effect)) { option_desc_array_t *od = context->option_descriptors; int rc; @@ -2124,7 +2132,7 @@ * * Parse the option-values from the option-array. **/ -void lvm_set_group_info_parse_options(lvm_volume_group_t *group, +void lvm_set_group_info_parse_options(lvm_volume_group_t * UNUSED(group), option_array_t *options, char **vg_name) { @@ -2167,7 +2175,7 @@ * * Verify that these options are valid for setting info for this volume. **/ -int lvm_set_group_info_validate_options(lvm_volume_group_t *group, +int lvm_set_group_info_validate_options(lvm_volume_group_t * UNUSED(group), char *vg_name) { int rc; Index: lvm_groups.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_groups.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- lvm_groups.c 20 Aug 2008 23:51:13 -0000 1.26 +++ lvm_groups.c 16 Jan 2009 15:58:28 -0000 1.27 @@ -387,7 +387,7 @@ pv_entry->segment->geometry.block_size); group->geometry.bytes_per_sector = max(group->geometry.bytes_per_sector, pv_entry->segment->geometry.bytes_per_sector); - + LOG_DETAILS("Added object %s to container %s\n", segment->name, group->container->name); @@ -692,7 +692,7 @@ /* Get a new number for this group. */ vg->vg_number = lvm_find_free_vg_number(); - if (vg->vg_number < 0) { + if ((int) vg->vg_number < 0) { EngFncs->engine_free(vg); vg = NULL; goto out; @@ -711,7 +711,7 @@ vg->vgda = 0; vg->pe_size = pe_size; vg->pe_total = 0; - vg->pe_allocated= 0; + vg->pe_allocated= 0; vg->pvg_total = 0; out: @@ -975,7 +975,7 @@ goto out; } group = container->private_data; - + /* Make sure this PV isn't the last one in the group. To take the last * PV out, use the lvm_destroy_container function. We don't want empty * groups hanging around. Index: lvmregmgr.h =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvmregmgr.h,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- lvmregmgr.h 22 Feb 2006 20:21:25 -0000 1.41 +++ lvmregmgr.h 16 Jan 2009 15:58:28 -0000 1.42 @@ -47,7 +47,7 @@ #endif #define MAX_VG 99 #define MAX_LV 256 -#define MAX_PV 256 +#define MAX_PV 256 #define NAME_LEN 128 #define UUID_LEN 32 #define LVM_BLK_MAJOR 58 @@ -174,7 +174,7 @@ uint32_t pe_size; uint32_t pe_total; uint32_t pe_allocated; - + /* New in struct version 2 */ uint32_t pe_start; /* in sectors */ @@ -190,7 +190,7 @@ uint8_t vg_name[NAME_LEN]; uint32_t lv_access; uint32_t lv_status; - uint32_t lv_open; + uint32_t lv_open; uint32_t lv_dev; uint32_t lv_number; uint32_t lv_mirror_copies; @@ -375,8 +375,8 @@ lvm_logical_volume_t * freespace; geometry_t geometry; u_int32_t move_extents; - int pv_count; - int volume_count; + uint pv_count; + uint volume_count; int flags; } lvm_volume_group_t; Index: lvmregmgr.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvmregmgr.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- lvmregmgr.c 22 Feb 2006 20:21:25 -0000 1.94 +++ lvmregmgr.c 16 Jan 2009 15:58:28 -0000 1.95 @@ -245,7 +245,7 @@ * or a compatibility volume. **/ static int lvm_can_set_volume(storage_object_t * region, - boolean flag) + boolean UNUSED(flag)) { int rc = 0; @@ -435,7 +435,7 @@ * the appropriate freespace region. **/ static int lvm_delete(storage_object_t * region, - list_anchor_t children) + list_anchor_t UNUSED(children)) { lvm_logical_volume_t * volume; lvm_volume_group_t * group; @@ -488,7 +488,7 @@ **/ static int lvm_expand(storage_object_t * region, storage_object_t * expand_object, - list_anchor_t input_objects, + list_anchor_t UNUSED(input_objects), option_array_t * options) { lvm_volume_group_t * group; @@ -590,7 +590,7 @@ **/ static int lvm_shrink(storage_object_t * region, storage_object_t * shrink_object, - list_anchor_t input_objects, + list_anchor_t UNUSED(input_objects), option_array_t * options) { lvm_volume_group_t * group; @@ -674,8 +674,8 @@ /** * lvm_set_volume **/ -static void lvm_set_volume(storage_object_t * region, - boolean flag) +static void lvm_set_volume(storage_object_t * UNUSED(region), + boolean UNUSED(flag)) { LOG_ENTRY(); LOG_DEBUG("That's nice. :)\n"); @@ -735,8 +735,8 @@ * * All commit operations are done in commit_container_changes. **/ -static int lvm_commit_changes(storage_object_t * region, - unsigned int phase) +static int lvm_commit_changes(storage_object_t * UNUSED(region), + unsigned int UNUSED(phase)) { LOG_ENTRY(); LOG_DEBUG("That's nice. :)\n"); @@ -747,7 +747,7 @@ /** * lvm_can_activate **/ -static int lvm_can_activate(storage_object_t * region) +static int lvm_can_activate(storage_object_t * UNUSED(region)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -790,7 +790,7 @@ /** * lvm_can_deactivate **/ -static int lvm_can_deactivate(storage_object_t * region) +static int lvm_can_deactivate(storage_object_t * UNUSED(region)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -927,7 +927,7 @@ rc = EINVAL; break; } - + lvm_expand_container_allocate_option_descriptor(context->option_descriptors); rc = lvm_expand_container_get_acceptable(context->container, context->acceptable_objects); @@ -1178,7 +1178,7 @@ name); rc = EINVAL; } - + LOG_EXIT_INT(rc); return rc; } @@ -1234,7 +1234,7 @@ extended_info_array_t * info = NULL; char buffer[50] = {0}; int i = 0, rc = 0; - + LOG_ENTRY(); if (!name) { @@ -1504,7 +1504,7 @@ **/ static int lvm_region_function(storage_object_t * region, task_action_t action, - list_anchor_t objects, + list_anchor_t UNUSED(objects), option_array_t * options) { lvm_logical_volume_t * volume = region->private_data; @@ -1652,9 +1652,9 @@ * * PVs can expand by any amount. **/ -static int lvm_can_expand_container_by(storage_container_t *container, - storage_object_t *consumed_object, - sector_count_t *delta_size) +static int lvm_can_expand_container_by(storage_container_t * UNUSED(container), + storage_object_t * UNUSED(consumed_object), + sector_count_t * UNUSED(delta_size)) { LOG_ENTRY(); LOG_EXIT_INT(0); @@ -1914,7 +1914,7 @@ **/ static int lvm_add_object(storage_object_t * object, storage_container_t * container, - option_array_t * options) + option_array_t * UNUSED(options)) { lvm_volume_group_t * group = container->private_data; lvm_physical_volume_t * pv_entry; @@ -1941,7 +1941,7 @@ if (rc) { goto out; } - + /* Create a new physical volume for the segment. */ pv_entry = lvm_create_pv_from_segment(object); if (!pv_entry) { Index: lvm_info.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_info.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- lvm_info.c 22 Feb 2006 20:21:25 -0000 1.20 +++ lvm_info.c 16 Jan 2009 15:58:28 -0000 1.21 @@ -126,7 +126,7 @@ info->info[i].value.ui32 = volume->lv->lv_stripesize; i++; } - + if (volume->flags & LVM_LV_FLAG_INCOMPLETE) { info->info[i].name = EngFncs->engine_strdup("Incomplete_LV"); info->info[i].title = EngFncs->engine_strdup(_("INCOMPLETE REGION!!!")); @@ -201,7 +201,7 @@ int printed_dots = FALSE; int consecutive_run = FALSE; int info_line = 0; - int j, i = 0; + uint j, i = 0; LOG_ENTRY(); @@ -627,7 +627,7 @@ * If this is the last PE on the PV, the "next" PE is not consecutive. **/ static inline int is_next_pe_consecutive(lvm_physical_volume_t * pv_entry, - int this_pe) + uint this_pe) { lvm_physical_extent_t * pe_map = pv_entry->pe_map; int rc = TRUE; @@ -664,7 +664,7 @@ int consecutive_run = FALSE; int printed_dots = FALSE; int info_line = 1; - int j, i = 0; + uint j, i = 0; LOG_ENTRY(); Index: lvm_pv.h =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_pv.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- lvm_pv.h 18 Aug 2004 15:47:08 -0000 1.11 +++ lvm_pv.h 16 Jan 2009 15:58:28 -0000 1.12 @@ -3,21 +3,21 @@ * * 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 * * Module: LVM Region Manager * File: evms2/engine/plugins/lvm/lvm_pv.h - */ + */ /* Functions exported from lvm_pv.c */ extern u_int64_t lvm_get_pe_start(lvm_physical_volume_t * pv_entry); @@ -35,7 +35,7 @@ extern int lvm_update_pv_for_group(lvm_physical_volume_t * pv_entry, lvm_volume_group_t * group); extern void lvm_update_pv_for_no_group(lvm_physical_volume_t * pv_entry); -extern int lvm_get_available_stripes(lvm_volume_group_t * group); +extern uint lvm_get_available_stripes(lvm_volume_group_t * group); extern lvm_physical_volume_t * lvm_get_selected_segment(list_anchor_t list); extern inline int lvm_pv_has_available_extents(lvm_physical_volume_t * pv_entry); extern inline int lvm_pv_num_available_extents(lvm_physical_volume_t * pv_entry); Index: lvm_move.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_move.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- lvm_move.c 13 Jan 2005 18:27:02 -0000 1.49 +++ lvm_move.c 16 Jan 2009 15:58:28 -0000 1.50 @@ -356,7 +356,8 @@ int lvm_commit_move_extents(lvm_volume_group_t * group) { lvm_logical_volume_t * volume; - int i, j, rc = 0; + uint i, j; + int rc = 0; LOG_ENTRY(); @@ -572,7 +573,7 @@ u_int32_t * le, u_int32_t * pe) { - int i; + uint i; LOG_ENTRY(); @@ -706,7 +707,8 @@ list_element_t itr, itr2; u_int32_t free_extents_striped[MAX_PV+1] = {0}; u_int32_t extents_per_pv; - int i, j, rc; + uint i, j; + int rc; LOG_ENTRY(); @@ -822,7 +824,8 @@ storage_object_t * region; lvm_logical_volume_t * volume; list_element_t itr; - int rc, i, j = 0; + int rc; + uint i, j = 0; LOG_ENTRY(); @@ -1079,7 +1082,7 @@ * initializing the option-descriptor. **/ int lvm_move_pv_set_objects(task_context_t * context, - list_anchor_t declined_objects, + list_anchor_t UNUSED(declined_objects), task_effect_t * effect) { option_desc_array_t * od = context->option_descriptors; @@ -1147,7 +1150,8 @@ value_list_t * pv_list; char * maintain_stripes_string; int maintain_stripes; - int i, rc; + uint i; + int rc; LOG_ENTRY(); @@ -1226,7 +1230,8 @@ lvm_volume_group_t * group, int * maintain_stripes) { - int i, rc = 0; + uint i; + int rc = 0; LOG_ENTRY(); @@ -1347,7 +1352,7 @@ lvm_physical_volume_t * pv_entry; list_element_t itr, itr2; int extents_per_pv; - int i, j = 0, k = 0; + uint i, j = 0, k = 0; int rc; LOG_ENTRY(); @@ -1534,7 +1539,8 @@ storage_object_t * region; lvm_logical_volume_t * volume; list_element_t itr; - int i, j = 0, k = 0, rc; + uint i, j = 0, k = 0; + int rc; LOG_ENTRY(); Index: lvm_volumes.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_volumes.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- lvm_volumes.c 20 Aug 2008 23:51:13 -0000 1.57 +++ lvm_volumes.c 16 Jan 2009 15:58:28 -0000 1.58 @@ -169,7 +169,7 @@ out2: lvm_deallocate_logical_volume(new_volume); new_volume = NULL; - + out: LOG_EXIT_PTR(new_volume); return new_volume; @@ -409,7 +409,7 @@ lvm_physical_extent_t * pe_map; u_int32_t lv_number, le_number; u_int32_t freespace_current_le = 0; - int i, j; + uint i, j; LOG_ENTRY(); @@ -482,7 +482,7 @@ boolean final_call) { lvm_logical_volume_t * volume; - int i, j, count; + uint i, j, count; LOG_ENTRY(); LOG_DETAILS("Verifying LE maps for container %s.\n", @@ -1169,7 +1169,7 @@ u_int32_t desired_extents, lvm_physical_volume_t * pv_entries[]) { - int available_extents = 0; + uint available_extents = 0; int rc = 0; int i = 0; @@ -1362,7 +1362,8 @@ lvm_volume_group_t * group = volume->group; lvm_physical_volume_t * pv_entry; u_int32_t current_le = 0; - int used_this_pv, i, j, rc = 0; + uint used_this_pv, i, j; + int rc = 0; LOG_ENTRY(); @@ -1422,7 +1423,8 @@ lvm_physical_volume_t * pv_entry; u_int32_t current_le = volume->lv->lv_allocated_le; u_int32_t le_total = current_le + expand_extents; - int used_this_pv, i, j, rc = 0; + uint used_this_pv, i, j; + int rc = 0; LOG_ENTRY(); @@ -1493,7 +1495,8 @@ u_int32_t extents_per_stripe = extents / stripes; u_int32_t stripes_found = 0; u_int32_t current_le = 0; - int i, j, k, rc = 0; + uint i, j, k; + int rc = 0; LOG_ENTRY(); @@ -1555,7 +1558,8 @@ lvm_physical_volume_t * pv_entry; u_int32_t extents_per_stripe = add_extents / volume->lv->lv_stripes; u_int32_t le, new_le; - int i, j, rc = 0; + u_int32_t i, j; + int rc = 0; LOG_ENTRY(); @@ -1661,7 +1665,7 @@ { lvm_physical_volume_t * pv_entry; u_int32_t pe_number; - int i; + uint32_t i; LOG_ENTRY(); @@ -1721,7 +1725,7 @@ **/ void lvm_discard_extents_from_volume(lvm_logical_volume_t * volume) { - int i; + uint32_t i; LOG_ENTRY(); @@ -1750,7 +1754,7 @@ u_int32_t current_extents_per_stripe; u_int32_t new_extents_per_stripe; u_int32_t le, new_le, i; - + LOG_ENTRY(); current_extents_per_stripe = volume->lv->lv_allocated_le / volume->lv->lv_stripes; @@ -1876,7 +1880,8 @@ unsigned long num_le = stripes; dm_target_type type = (stripes==1) ? DM_TARGET_LINEAR : DM_TARGET_STRIPE; - int i, j, k, rc = 0; + unsigned long i, j, k; + int rc = 0; LOG_ENTRY(); @@ -1937,7 +1942,7 @@ **/ inline int lvm_le_is_valid(lvm_logical_volume_t * volume, u_int32_t le) { - return (le >= 0 && le < volume->lv->lv_allocated_le); + return (le < volume->lv->lv_allocated_le); } /** Index: lvm_pv.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_pv.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- lvm_pv.c 22 Feb 2006 20:21:25 -0000 1.22 +++ lvm_pv.c 16 Jan 2009 15:58:28 -0000 1.23 @@ -505,7 +505,7 @@ lvm_check_pe_size(pe_size); rc = ENOSPC; } - + LOG_EXIT_INT(rc); return rc; } @@ -656,9 +656,9 @@ * Return the number of PVs in this group that still have extents which * can be allocated to new LVs. **/ -int lvm_get_available_stripes(lvm_volume_group_t * group) +uint lvm_get_available_stripes(lvm_volume_group_t * group) { - int pvs = 0; + uint pvs = 0; int i; LOG_ENTRY(); @@ -730,7 +730,7 @@ **/ inline int lvm_pe_is_valid(lvm_physical_volume_t * pv_entry, u_int32_t pe) { - return (pe >= 0 && pe < pv_entry->pv->pe_total); + return (pe < pv_entry->pv->pe_total); } /** Index: lvm_io.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/lvm/lvm_io.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- lvm_io.c 13 Jan 2005 18:27:01 -0000 1.16 +++ lvm_io.c 16 Jan 2009 15:58:28 -0000 1.17 @@ -3,16 +3,16 @@ * * 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 * * Module: LVM Region Manager @@ -22,7 +22,7 @@ * the LVM region manager plugin. This file should be the only * location of calls to READ and WRITE (except the lvm_read and * lvm_write API calls). - */ + */ #include <stdlib.h> #include <stdio.h> @@ -95,7 +95,7 @@ rc = ENOMEM; goto out; } - + /* Read the first sector. */ rc = READ(segment, bytes_to_sectors(LVM_PV_DISK_BASE), bytes_to_sectors(LVM_PV_DISK_SIZE), pv_buffer); @@ -349,7 +349,7 @@ LOG_SERIOUS("Error writing VG metadata to object %s\n", segment->name); } - + EngFncs->engine_free(vg_buffer); out: @@ -375,7 +375,8 @@ lvm_volume_group_t * group) { char * uuid_buffer = NULL; - int uuid_sectors, i, rc = 0; + uint uuid_sectors, i; + int rc = 0; LOG_ENTRY(); @@ -450,7 +451,8 @@ storage_object_t * segment = pv_entry->segment; pv_disk_t * pv = pv_entry->pv; char * uuid_buffer; - int uuid_sectors, i, rc; + uint uuid_sectors, i; + int rc; LOG_ENTRY(); @@ -644,7 +646,7 @@ static inline void lvm_endian_convert_pe_map(pe_disk_t * pe_map, u_int32_t pe_total) { - int i; + uint i; LOG_ENTRY(); for (i = 0; i < pe_total; i++) { pe_map[i].lv_num = DISK_TO_CPU16(pe_map[i].lv_num); |
From: Steve D. <ste...@us...> - 2009-01-15 20:38:37
|
Update of /cvsroot/evms/evms2/engine/plugins/jfs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11604 Modified Files: fs_jfs.c fsimjfs.c Log Message: Cleanup compiler warnings. Added bonus: My editor cleans up trailing whitespace. Index: fs_jfs.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/jfs/fs_jfs.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- fs_jfs.c 16 Jun 2005 16:53:48 -0000 1.48 +++ fs_jfs.c 15 Jan 2009 20:38:25 -0000 1.49 @@ -339,11 +339,11 @@ } argv[0] = "mount"; - + new_size_in_blocks = *new_size / (sb_ptr->s_bsize / EVMS_VSECTOR_SIZE); sprintf(mount_opts, "-oremount,resize=%"PRIu64, new_size_in_blocks); argv[1] = mount_opts; - + argv[2] = EngFncs->engine_strdup(volume->mount_point); argv[3] = NULL; @@ -584,9 +584,9 @@ * Shrink the volume to new_size. If the volume is not expanded exactly to * new_size, set new_size to the new_size of the volume. */ -static int fs_shrink( logical_volume_t * volume, - sector_count_t requested_size, - sector_count_t * new_size ) +static int fs_shrink( logical_volume_t * UNUSED(volume), + sector_count_t UNUSED(requested_size), + sector_count_t * UNUSED(new_size) ) { /* unsupported at this time */ int rc = ENOSYS; @@ -601,10 +601,11 @@ * mkfs has been scheduled. Do any setup work such as claiming another * volume for an external log. */ -static int fs_mkfs_setup(logical_volume_t * volume, +static int fs_mkfs_setup(logical_volume_t * UNUSED(volume), option_array_t * options) { - int i, rc = 0; + uint i; + int rc = 0; char * ext_log_vol = NULL; list_anchor_t avail_ext_logs; list_element_t logs_list_iter; @@ -807,7 +808,7 @@ list_anchor_t selected_volumes ) { int rc = 0; - int count, i; + uint count, i; logical_volume_t * vol; list_element_t tmp_list_iter; list_anchor_t tmp_list, selected_tmp_list; @@ -955,7 +956,7 @@ } switch (context->action) { - + case EVMS_Task_mkfs: rc = fs_init_mkfs_acceptable_objects(context); @@ -1186,10 +1187,10 @@ } switch (context->action) { - + case EVMS_Task_mkfs: switch (index) { - + case MKFS_CHECKBB_INDEX: /* 'check for bad blocks' option set? */ context->option_descriptors->option[index].value.b = value->b; @@ -1231,7 +1232,7 @@ case EVMS_Task_fsck: switch (index) { - + case FSCK_FORCE_INDEX: /* 'force check' option set? */ @@ -1343,7 +1344,7 @@ * settings have changed. */ static int fs_set_volumes( task_context_t * context, - list_anchor_t declined_volumes, + list_anchor_t UNUSED(declined_volumes), task_effect_t * effect ) { int rc = 0; @@ -1813,8 +1814,8 @@ /* * How much can file system shrink? */ -static int fs_can_shrink_by(logical_volume_t * volume, - sector_count_t * delta) +static int fs_can_shrink_by(logical_volume_t * UNUSED(volume), + sector_count_t * UNUSED(delta)) { /* unsupported at this time */ int rc = ENOSYS; Index: fsimjfs.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/jfs/fsimjfs.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- fsimjfs.c 9 Aug 2004 16:19:16 -0000 1.14 +++ fsimjfs.c 15 Jan 2009 20:38:25 -0000 1.15 @@ -220,7 +220,7 @@ logical_volume_t * volume, char * logsize ) { - int i, opt_count = 2; + uint i, opt_count = 2; argv[0] = "mkfs.jfs"; @@ -232,7 +232,7 @@ if ( options->option[i].is_number_based ) { switch (options->option[i].number) { - + case MKFS_CHECKBB_INDEX: /* 'check for bad blocks' option */ if ( options->option[i].value.b == TRUE ) { @@ -403,7 +403,7 @@ */ void set_fsck_options( option_array_t * options, char ** argv, logical_volume_t * volume ) { - int i, opt_count = 1; + uint i, opt_count = 1; argv[0] = "fsck.jfs"; @@ -799,7 +799,7 @@ close(fds2[0]); close(fds2[1]); - + return(rc|dev_rc); } |