From: Michihiro NAKAJIMA Date: Wed, 18 May 2011 09:13:57 +0000 (-0400) Subject: Fix warnings in libarchive/test_*.c on Borland C Compiler. X-Git-Tag: v3.0.0a~324 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05753cec62cd784f4aa802f880365f8d161e503c;p=thirdparty%2Flibarchive.git Fix warnings in libarchive/test_*.c on Borland C Compiler. SVN-Revision: 3363 --- diff --git a/libarchive/test/test_archive_string_conversion.c b/libarchive/test/test_archive_string_conversion.c index 27f889f00..a9f6796eb 100644 --- a/libarchive/test/test_archive_string_conversion.c +++ b/libarchive/test/test_archive_string_conversion.c @@ -128,7 +128,7 @@ scan_unicode_pattern(char *out, const char *pattern, int exclude_mac_nfd) * On other platforms, the characters to be Form C. */ static void -test_archive_string_normalization() +test_archive_string_normalization(void) { struct archive *a; struct archive_entry *ae; diff --git a/libarchive/test/test_gnutar_filename_encoding.c b/libarchive/test/test_gnutar_filename_encoding.c index 12906867e..b22ea4073 100644 --- a/libarchive/test/test_gnutar_filename_encoding.c +++ b/libarchive/test/test_gnutar_filename_encoding.c @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); #include static void -test_gnutar_filename_encoding_UTF8_CP866() +test_gnutar_filename_encoding_UTF8_CP866(void) { struct archive *a; struct archive_entry *entry; @@ -70,7 +70,7 @@ test_gnutar_filename_encoding_UTF8_CP866() } static void -test_gnutar_filename_encoding_KOI8R_UTF8() +test_gnutar_filename_encoding_KOI8R_UTF8(void) { struct archive *a; struct archive_entry *entry; @@ -112,7 +112,7 @@ test_gnutar_filename_encoding_KOI8R_UTF8() } static void -test_gnutar_filename_encoding_KOI8R_CP866() +test_gnutar_filename_encoding_KOI8R_CP866(void) { struct archive *a; struct archive_entry *entry; @@ -154,7 +154,7 @@ test_gnutar_filename_encoding_KOI8R_CP866() } static void -test_gnutar_filename_encoding_CP1251_UTF8() +test_gnutar_filename_encoding_CP1251_UTF8(void) { struct archive *a; struct archive_entry *entry; @@ -200,7 +200,7 @@ test_gnutar_filename_encoding_CP1251_UTF8() * Do not translate CP1251 into CP866 if non Windows platform. */ static void -test_gnutar_filename_encoding_ru_RU_CP1251() +test_gnutar_filename_encoding_ru_RU_CP1251(void) { struct archive *a; struct archive_entry *entry; @@ -241,7 +241,7 @@ test_gnutar_filename_encoding_ru_RU_CP1251() * Test above behavior works well. */ static void -test_gnutar_filename_encoding_Russian_Russia() +test_gnutar_filename_encoding_Russian_Russia(void) { struct archive *a; struct archive_entry *entry; @@ -277,7 +277,7 @@ test_gnutar_filename_encoding_Russian_Russia() } static void -test_gnutar_filename_encoding_EUCJP_UTF8() +test_gnutar_filename_encoding_EUCJP_UTF8(void) { struct archive *a; struct archive_entry *entry; @@ -318,7 +318,7 @@ test_gnutar_filename_encoding_EUCJP_UTF8() } static void -test_gnutar_filename_encoding_EUCJP_CP932() +test_gnutar_filename_encoding_EUCJP_CP932(void) { struct archive *a; struct archive_entry *entry; @@ -359,7 +359,7 @@ test_gnutar_filename_encoding_EUCJP_CP932() } static void -test_gnutar_filename_encoding_CP932_UTF8() +test_gnutar_filename_encoding_CP932_UTF8(void) { struct archive *a; struct archive_entry *entry; diff --git a/libarchive/test/test_open_failure.c b/libarchive/test/test_open_failure.c index cfc3062c8..b825e1d62 100644 --- a/libarchive/test/test_open_failure.c +++ b/libarchive/test/test_open_failure.c @@ -41,6 +41,8 @@ struct my_data { static ssize_t my_read(struct archive *a, void *_private, const void **buff) { + (void)a; /* UNUSED */ + (void)buff; /* UNUSED */ struct my_data *private = (struct my_data *)_private; assertEqualInt(MAGIC, private->magic); ++private->read_called; @@ -50,6 +52,9 @@ my_read(struct archive *a, void *_private, const void **buff) static ssize_t my_write(struct archive *a, void *_private, const void *buff, size_t s) { + (void)a; /* UNUSED */ + (void)buff; /* UNUSED */ + (void)s; /* UNUSED */ struct my_data *private = (struct my_data *)_private; assertEqualInt(MAGIC, private->magic); ++private->write_called; @@ -59,6 +64,7 @@ my_write(struct archive *a, void *_private, const void *buff, size_t s) static int my_open(struct archive *a, void *_private) { + (void)a; /* UNUSED */ struct my_data *private = (struct my_data *)_private; assertEqualInt(MAGIC, private->magic); ++private->open_called; @@ -68,6 +74,7 @@ my_open(struct archive *a, void *_private) static int my_close(struct archive *a, void *_private) { + (void)a; /* UNUSED */ struct my_data *private = (struct my_data *)_private; assertEqualInt(MAGIC, private->magic); ++private->close_called; diff --git a/libarchive/test/test_pax_filename_encoding.c b/libarchive/test/test_pax_filename_encoding.c index b581a7e1b..3a28e2f7d 100644 --- a/libarchive/test/test_pax_filename_encoding.c +++ b/libarchive/test/test_pax_filename_encoding.c @@ -336,7 +336,7 @@ test_pax_filename_encoding_3(void) * Verify that KOI8-R filenames are correctly translated to Unicode and UTF-8. */ static void -test_pax_filename_encoding_KOI8R() +test_pax_filename_encoding_KOI8R(void) { struct archive *a; struct archive_entry *entry; @@ -383,7 +383,7 @@ test_pax_filename_encoding_KOI8R() * Verify that CP1251 filenames are correctly translated to Unicode and UTF-8. */ static void -test_pax_filename_encoding_CP1251() +test_pax_filename_encoding_CP1251(void) { struct archive *a; struct archive_entry *entry; @@ -431,7 +431,7 @@ test_pax_filename_encoding_CP1251() * Verify that EUC-JP filenames are correctly translated to Unicode and UTF-8. */ static void -test_pax_filename_encoding_EUCJP() +test_pax_filename_encoding_EUCJP(void) { struct archive *a; struct archive_entry *entry; @@ -479,7 +479,7 @@ test_pax_filename_encoding_EUCJP() * Verify that CP932/SJIS filenames are correctly translated to Unicode and UTF-8. */ static void -test_pax_filename_encoding_CP932() +test_pax_filename_encoding_CP932(void) { struct archive *a; struct archive_entry *entry; @@ -529,7 +529,7 @@ test_pax_filename_encoding_CP932() * when using hdrcharset=BINARY option. */ static void -test_pax_filename_encoding_KOI8R_BINARY() +test_pax_filename_encoding_KOI8R_BINARY(void) { struct archive *a; struct archive_entry *entry; @@ -569,7 +569,7 @@ test_pax_filename_encoding_KOI8R_BINARY() * If other character-set name is specified, you will get ARCHIVE_FAILED. */ static void -test_pax_filename_encoding_KOI8R_CP1251() +test_pax_filename_encoding_KOI8R_CP1251(void) { struct archive *a; diff --git a/libarchive/test/test_read_disk_directory_traversals.c b/libarchive/test/test_read_disk_directory_traversals.c index a72423aab..ce6d28554 100644 --- a/libarchive/test/test_read_disk_directory_traversals.c +++ b/libarchive/test/test_read_disk_directory_traversals.c @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #endif static void -test_basic() +test_basic(void) { struct archive *a; struct archive_entry *ae; @@ -289,7 +289,7 @@ test_basic() } static void -test_symlink_hybrid() +test_symlink_hybrid(void) { struct archive *a; struct archive_entry *ae; @@ -446,7 +446,7 @@ test_symlink_hybrid() } static void -test_symlink_logical() +test_symlink_logical(void) { struct archive *a; struct archive_entry *ae; @@ -676,7 +676,7 @@ test_symlink_logical() } static void -test_symlink_logical_loop() +test_symlink_logical_loop(void) { struct archive *a; struct archive_entry *ae; @@ -755,7 +755,7 @@ test_symlink_logical_loop() } static void -test_restore_atime() +test_restore_atime(void) { struct archive *a; struct archive_entry *ae; diff --git a/libarchive/test/test_read_format_zip.c b/libarchive/test/test_read_format_zip.c index e25d6e46d..010d15197 100644 --- a/libarchive/test/test_read_format_zip.c +++ b/libarchive/test/test_read_format_zip.c @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_zip.c 189482 2009- */ static void -test_basic() +test_basic(void) { const char *refname = "test_read_format_zip.zip"; struct archive_entry *ae; @@ -92,7 +92,7 @@ finish: * Currently sotres Unix UID/GID up to 32 bits. */ static void -test_info_zip_ux() +test_info_zip_ux(void) { const char *refname = "test_read_format_zip_ux.zip"; struct archive_entry *ae; diff --git a/libarchive/test/test_ustar_filename_encoding.c b/libarchive/test/test_ustar_filename_encoding.c index 1391e3697..17b7e4a22 100644 --- a/libarchive/test/test_ustar_filename_encoding.c +++ b/libarchive/test/test_ustar_filename_encoding.c @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); #include static void -test_ustar_filename_encoding_UTF8_CP866() +test_ustar_filename_encoding_UTF8_CP866(void) { struct archive *a; struct archive_entry *entry; @@ -70,7 +70,7 @@ test_ustar_filename_encoding_UTF8_CP866() } static void -test_ustar_filename_encoding_KOI8R_UTF8() +test_ustar_filename_encoding_KOI8R_UTF8(void) { struct archive *a; struct archive_entry *entry; @@ -112,7 +112,7 @@ test_ustar_filename_encoding_KOI8R_UTF8() } static void -test_ustar_filename_encoding_KOI8R_CP866() +test_ustar_filename_encoding_KOI8R_CP866(void) { struct archive *a; struct archive_entry *entry; @@ -154,7 +154,7 @@ test_ustar_filename_encoding_KOI8R_CP866() } static void -test_ustar_filename_encoding_CP1251_UTF8() +test_ustar_filename_encoding_CP1251_UTF8(void) { struct archive *a; struct archive_entry *entry; @@ -200,7 +200,7 @@ test_ustar_filename_encoding_CP1251_UTF8() * Do not translate CP1251 into CP866 if non Windows platform. */ static void -test_ustar_filename_encoding_ru_RU_CP1251() +test_ustar_filename_encoding_ru_RU_CP1251(void) { struct archive *a; struct archive_entry *entry; @@ -241,7 +241,7 @@ test_ustar_filename_encoding_ru_RU_CP1251() * Test above behavior works well. */ static void -test_ustar_filename_encoding_Russian_Russia() +test_ustar_filename_encoding_Russian_Russia(void) { struct archive *a; struct archive_entry *entry; @@ -277,7 +277,7 @@ test_ustar_filename_encoding_Russian_Russia() } static void -test_ustar_filename_encoding_EUCJP_UTF8() +test_ustar_filename_encoding_EUCJP_UTF8(void) { struct archive *a; struct archive_entry *entry; @@ -318,7 +318,7 @@ test_ustar_filename_encoding_EUCJP_UTF8() } static void -test_ustar_filename_encoding_EUCJP_CP932() +test_ustar_filename_encoding_EUCJP_CP932(void) { struct archive *a; struct archive_entry *entry; @@ -359,7 +359,7 @@ test_ustar_filename_encoding_EUCJP_CP932() } static void -test_ustar_filename_encoding_CP932_UTF8() +test_ustar_filename_encoding_CP932_UTF8(void) { struct archive *a; struct archive_entry *entry; diff --git a/libarchive/test/test_zip_filename_encoding.c b/libarchive/test/test_zip_filename_encoding.c index 30b42e59c..d2a815418 100644 --- a/libarchive/test/test_zip_filename_encoding.c +++ b/libarchive/test/test_zip_filename_encoding.c @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); #include static void -test_zip_filename_encoding_UTF8() +test_zip_filename_encoding_UTF8(void) { struct archive *a; struct archive_entry *entry; @@ -117,7 +117,7 @@ test_zip_filename_encoding_UTF8() } static void -test_zip_filename_encoding_KOI8R() +test_zip_filename_encoding_KOI8R(void) { struct archive *a; struct archive_entry *entry; @@ -218,7 +218,7 @@ test_zip_filename_encoding_KOI8R() * Do not translate CP1251 into CP866 if non Windows platform. */ static void -test_zip_filename_encoding_ru_RU_CP1251() +test_zip_filename_encoding_ru_RU_CP1251(void) { struct archive *a; struct archive_entry *entry; @@ -262,7 +262,7 @@ test_zip_filename_encoding_ru_RU_CP1251() * Test above behavior works well. */ static void -test_zip_filename_encoding_Russian_Russia() +test_zip_filename_encoding_Russian_Russia(void) { struct archive *a; struct archive_entry *entry; @@ -332,7 +332,7 @@ test_zip_filename_encoding_Russian_Russia() } static void -test_zip_filename_encoding_EUCJP() +test_zip_filename_encoding_EUCJP(void) { struct archive *a; struct archive_entry *entry; @@ -432,7 +432,7 @@ test_zip_filename_encoding_EUCJP() } static void -test_zip_filename_encoding_CP932() +test_zip_filename_encoding_CP932(void) { struct archive *a; struct archive_entry *entry;