]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix warnings in libarchive/test_*.c on Borland C Compiler.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 18 May 2011 09:13:57 +0000 (05:13 -0400)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 18 May 2011 09:13:57 +0000 (05:13 -0400)
SVN-Revision: 3363

libarchive/test/test_archive_string_conversion.c
libarchive/test/test_gnutar_filename_encoding.c
libarchive/test/test_open_failure.c
libarchive/test/test_pax_filename_encoding.c
libarchive/test/test_read_disk_directory_traversals.c
libarchive/test/test_read_format_zip.c
libarchive/test/test_ustar_filename_encoding.c
libarchive/test/test_zip_filename_encoding.c

index 27f889f000226dd30b00dc2d81ae8c1238e47981..a9f6796eb4673fce96e7300b83e5a290c6817330 100644 (file)
@@ -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;
index 12906867e184a3dfec4a5c480eae862f73d2d05a..b22ea407374a7c6d599272122efc5d3b9f846a62 100644 (file)
@@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$");
 #include <locale.h>
 
 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;
index cfc3062c86bf66197fe23146b37a376a2c804ddd..b825e1d62b56485663fe13bedfcaf1a3beabaaeb 100644 (file)
@@ -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;
index b581a7e1b8466446bf4e395072354bd43be97065..3a28e2f7dda219cf2a6928bdbaabfdf1212263dc 100644 (file)
@@ -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;
 
index a72423aab0b0661b4efc66b0022a75f6628808dc..ce6d285541016476c14e05cea79a02d9c05ac03b 100644 (file)
@@ -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;
index e25d6e46def5ff7025b44ab0c3801e2a6271c800..010d15197dbd5a4e49c9e78796bfcaa8fe65be10 100644 (file)
@@ -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;
index 1391e3697c1e91197e5c58f5efe7b0efce8f385f..17b7e4a22764ec87b8f6b1a76b99a83d01f230d0 100644 (file)
@@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$");
 #include <locale.h>
 
 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;
index 30b42e59cbe92f7fbd64ce36b57982b07bcbc678..d2a81541879db101ccf3439ace7917d05f090e3d 100644 (file)
@@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$");
 #include <locale.h>
 
 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;