|
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; |