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