[libgxps] lib: Ignore a warning about a deprecated libarchive function
- From: Philip Withnall <pwithnall src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [libgxps] lib: Ignore a warning about a deprecated libarchive function
 
- Date: Thu, 22 Dec 2016 14:53:49 +0000 (UTC)
 
commit b8d9bf2735861e4577a07c0da4acdab466cf99c1
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Dec 20 19:49:05 2016 +0000
    lib: Ignore a warning about a deprecated libarchive function
    
    archive_read_finish() is deprecated in favour of archive_read_free() in
    libarchive version 3.0; but was not deprecated in version 2.0, which we
    need to continue to support.
    
    See http://manpages.org/archive_read_finish/3
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776323
 libgxps/gxps-archive.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libgxps/gxps-archive.c b/libgxps/gxps-archive.c
index 8ca668d..d2ece45 100644
--- a/libgxps/gxps-archive.c
+++ b/libgxps/gxps-archive.c
@@ -167,7 +167,12 @@ gxps_zip_archive_iter_next (ZipArchive            *zip,
 static void
 gxps_zip_archive_destroy (ZipArchive *zip)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+       /* This is a deprecated synonym for archive_read_free() in libarchive
+        * 3.0; but is not deprecated in libarchive 2.0, which we continue to
+        * support. */
        archive_read_finish (zip->archive);
+G_GNUC_END_IGNORE_DEPRECATIONS
        g_slice_free (ZipArchive, zip);
 }
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]