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