[Forensics-changes] [afflib] 01/02: Imported Debian patch 3.7.7-4

Joao Eriberto Mota Filho eriberto at moszumanska.debian.org
Tue May 3 00:42:19 UTC 2016


This is an automated email from the git hooks/post-receive script.

eriberto pushed a commit to branch debian
in repository afflib.

commit b7dadb4181098e84e41721cc96547c7be9adced2
Author: Joao Eriberto Mota Filho <eriberto at debian.org>
Date:   Sat Apr 30 15:08:34 2016 -0300

    Imported Debian patch 3.7.7-4
---
 debian/changelog                                   |  23 +
 debian/control                                     |  14 +-
 debian/copyright                                   |   2 +-
 debian/libafflib0v5.symbols                        |   5 -
 .../10_fix_spelling_errors_in_source_code.patch    |  29 +
 debian/patches/20_fix_spelling_in_manpage.patch    |  16 +
 .../30_fix_gcc_warnings_literal-suffix.patch       | 823 +++++++++++++++++++++
 ...0_fix_gcc_warnings_misleading-indentation.patch |  49 ++
 debian/patches/series                              |   4 +
 debian/watch                                       |   2 +-
 10 files changed, 953 insertions(+), 14 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 644510c..24a6fb6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,26 @@
+afflib (3.7.7-4) experimental; urgency=medium
+
+  * debian/control:
+      - Bumped Standards-Version to 3.9.8.
+      - Changed from cgit to git in Vcs-Browser field.
+      - Fixed a spelling error in long description.
+      - Updated the Vcs-* fields to use https instead of http and git.
+  * debian/copyright: updated the packaging copyright years.
+  * debian/patches/:
+      - Added two patches to fix spelling errors. They are
+        10_fix_spelling_errors_in_source_code.patch and
+        20_fix_spelling_in_manpage.patch.
+      - 30_fix_gcc_warnings_literal-suffix.patch: added to fix some
+        specific GCC warnings.
+      - 40_fix_gcc_warnings_misleading-indentation.patch: added to fix
+        some specific GCC warnings.
+  * debian/libafflib0v5.symbols: removed some symbols to be compliant
+      with GCC 6. Thanks to Martin Michlmayr <tbm at hpe.com>.
+      (Closes: #811966)
+  * debian/watch: bumped to version 4.
+
+ -- Joao Eriberto Mota Filho <eriberto at debian.org>  Sat, 30 Apr 2016 15:08:34 -0300
+
 afflib (3.7.7-3) unstable; urgency=medium
 
   * Upload to unstable. (Closes: #803695)
diff --git a/debian/control b/debian/control
index 29330bb..99fbbe4 100644
--- a/debian/control
+++ b/debian/control
@@ -11,10 +11,10 @@ Build-Depends: debhelper (>= 9),
                libfuse-dev [!hurd-i386],
                libssl-dev,
                zlib1g-dev
-Standards-Version: 3.9.6
+Standards-Version: 3.9.8
 Homepage: https://github.com/sshock/AFFLIBv3
-Vcs-Browser: https://anonscm.debian.org/cgit/forensics/afflib.git
-Vcs-Git: git://anonscm.debian.org/forensics/afflib.git
+Vcs-Browser: https://anonscm.debian.org/git/forensics/afflib.git
+Vcs-Git: https://anonscm.debian.org/git/forensics/afflib.git
 
 Package: libafflib0v5
 Architecture: any
@@ -27,7 +27,7 @@ Description: Advanced Forensics Format Library
  .
   - AFF allows you to store both computer forensic data and associated
     metadata in one or more files.
-  - AFF allows files to be digital singed, to provide for
+  - AFF allows files to be digital signed, to provide for
     chain-of-custody and long-term file integrity.
   - AFF allows for forensic disk images to stored encrypted and
     decrypted on-the-fly for processing. This allows disk images
@@ -44,7 +44,7 @@ Description: Advanced Forensics Format Library (development files)
  .
   - AFF allows you to store both computer forensic data and associated
     metadata in one or more files.
-  - AFF allows files to be digital singed, to provide for
+  - AFF allows files to be digital signed, to provide for
     chain-of-custody and long-term file integrity.
   - AFF allows for forensic disk images to stored encrypted and
     decrypted on-the-fly for processing. This allows disk images
@@ -66,7 +66,7 @@ Description: Advanced Forensics Format Library (debug version)
  .
   - AFF allows you to store both computer forensic data and associated
     metadata in one or more files.
-  - AFF allows files to be digital singed, to provide for
+  - AFF allows files to be digital signed, to provide for
     chain-of-custody and long-term file integrity.
   - AFF allows for forensic disk images to stored encrypted and
     decrypted on-the-fly for processing. This allows disk images
@@ -85,7 +85,7 @@ Description: Advanced Forensics Format Library (utilities)
  .
   - AFF allows you to store both computer forensic data and associated
     metadata in one or more files.
-  - AFF allows files to be digital singed, to provide for
+  - AFF allows files to be digital signed, to provide for
     chain-of-custody and long-term file integrity.
   - AFF allows for forensic disk images to stored encrypted and
     decrypted on-the-fly for processing. This allows disk images
diff --git a/debian/copyright b/debian/copyright
index 9a0fa0b..9e5189b 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -151,7 +151,7 @@ Copyright: 2009      Daniel Baumann <mail at daniel-baumann.ch>
            2010      Cristian Greco <cristian at debian.org>
            2011      Luk Claes <luk at debian.org>
            2012      Julien Valroff <julien at debian.org>
-           2014-2015 Joao Eriberto Mota Filho <eriberto at debian.org>
+           2014-2016 Joao Eriberto Mota Filho <eriberto at debian.org>
            2015      Julien Cristau <jcristau at debian.org>
 License: BSD-3-clause
 
diff --git a/debian/libafflib0v5.symbols b/debian/libafflib0v5.symbols
index 99a533f..db3a677 100644
--- a/debian/libafflib0v5.symbols
+++ b/debian/libafflib0v5.symbols
@@ -56,8 +56,6 @@ libafflib.so.0 libafflib0v5 #MINVER#
  _ZN10COutBuffer6CreateEj at Base 3.7.6
  _ZN10COutBuffer9FlushPartEv at Base 3.7.6
  _ZN10COutBuffer9SetStreamEP20ISequentialOutStream at Base 3.7.6
- _ZN10COutBufferD1Ev at Base 3.7.6
- _ZN10COutBufferD2Ev at Base 3.7.6
  _ZN11CLZInWindow4FreeEv at Base 3.7.6
  _ZN11CLZInWindow4InitEv at Base 3.7.6
  _ZN11CLZInWindow6CreateEjjj at Base 3.7.6
@@ -332,9 +330,6 @@ libafflib.so.0 libafflib0v5 #MINVER#
  _ZNK11CStringBaseIwE3MidEii at Base 3.7.6
  _ZNK9NCompress5NLZMA16CLiteralEncoder28GetPriceEbhh at Base 3.7.6
  _ZNK9NCompress5NLZMA7NLength8CEncoder9SetPricesEjjPj at Base 3.7.6
- _ZNSt6vectorIN3aff7seginfoESaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_ at Base 3.7.6
- _ZNSt6vectorIPN2s36BucketESaIS2_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS2_S4_EERKS2_ at Base 3.7.6
- _ZNSt6vectorIPN2s38ContentsESaIS2_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS2_S4_EERKS2_ at Base 3.7.6
  _ZTI11CLZInWindow at Base 3.7.6
  _ZTI12CInStreamRam at Base 3.7.6
  _ZTI12IMatchFinder at Base 3.7.6
diff --git a/debian/patches/10_fix_spelling_errors_in_source_code.patch b/debian/patches/10_fix_spelling_errors_in_source_code.patch
new file mode 100644
index 0000000..84428eb
--- /dev/null
+++ b/debian/patches/10_fix_spelling_errors_in_source_code.patch
@@ -0,0 +1,29 @@
+Description: fix some spelling errors in source code.
+Author: Joao Eriberto Mota Filho <eriberto at debian.org>
+Last-Update: 2016-04-29
+Index: afflib-3.7.7/tools/affcat.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affcat.cpp
++++ afflib-3.7.7/tools/affcat.cpp
+@@ -117,7 +117,7 @@ int output_page(AFFILE *af,FILE *outfile
+ 	}
+     }
+ 
+-    if(opt_debug) fprintf(stderr,"  outputing %d bytes\n",bytes);
++    if(opt_debug) fprintf(stderr,"  outputting %d bytes\n",bytes);
+     int count = fwrite(buf,1,bytes,outfile);	// send to the output
+     if(count!=bytes) fprintf(stderr,"fwrite(buf,1,%d,outfile) only wrote %d bytes\n",bytes,count);
+     free(buf);
+Index: afflib-3.7.7/tools/affconvert.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affconvert.cpp
++++ afflib-3.7.7/tools/affconvert.cpp
+@@ -448,7 +448,7 @@ int convert(const char *infile,char *out
+ 	/* Go back and update the image size (necessary since I have been writing page-by-page) */
+ 	if(af_update_segq(a_out,AF_IMAGESIZE,last_byte_in_image)
+ 	   && errno!=ENOTSUP){
+-	    err(1,"Could not upate AF_IMAGESIZE");
++	    err(1,"Could not update AF_IMAGESIZE");
+ 	}
+     } else {
+ 	/* No page support; Copy from beginning to end */
diff --git a/debian/patches/20_fix_spelling_in_manpage.patch b/debian/patches/20_fix_spelling_in_manpage.patch
new file mode 100644
index 0000000..4c01d3f
--- /dev/null
+++ b/debian/patches/20_fix_spelling_in_manpage.patch
@@ -0,0 +1,16 @@
+Description: fix a spelling error in affcat manpage.
+Author: Joao Eriberto Mota Filho <eriberto at debian.org>
+Last-Update: 2016-04-29
+Index: afflib-3.7.7/man/affcat.1
+===================================================================
+--- afflib-3.7.7.orig/man/affcat.1
++++ afflib-3.7.7/man/affcat.1
+@@ -28,7 +28,7 @@ Quiet mode. Don't print to STDERR if a p
+ .IP "-n"
+ Noisy mode. Tell when pages are skipped.
+ .IP "-l" 
+-List all the segment names, rather than outputing data.
++List all the segment names, rather than outputting data.
+ .IP "-L"
+ List Long. Prints segment names, lengths, and args.
+ .IP "-d" 
diff --git a/debian/patches/30_fix_gcc_warnings_literal-suffix.patch b/debian/patches/30_fix_gcc_warnings_literal-suffix.patch
new file mode 100644
index 0000000..16477cb
--- /dev/null
+++ b/debian/patches/30_fix_gcc_warnings_literal-suffix.patch
@@ -0,0 +1,823 @@
+Description: fix some GCC warnings. (warning: invalid suffix on literal;
+             C++11 requires a space between literal and string macro
+             [-Wliteral-suffix])
+Author: Joao Eriberto Mota Filho <eriberto at debian.org>
+Last-Update: 2016-04-29
+Index: afflib-3.7.7/tools/affdiskprint.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affdiskprint.cpp
++++ afflib-3.7.7/tools/affdiskprint.cpp
+@@ -97,7 +97,7 @@ uint64_t random64()
+ uint64_t atoi64(const char *buf)
+ {
+     uint64_t ret=0;
+-    sscanf(buf,"%"PRIu64,&ret);
++    sscanf(buf,"%" PRIu64,&ret);
+     return ret;
+ }
+ 
+@@ -201,7 +201,7 @@ int diskprint(const char *infile)
+     int64_t imagesize = af_get_imagesize(af);
+     if(imagesize>0){
+ 	char buf[32];
+-	snprintf(buf,sizeof(buf),"%"PRIu64,imagesize);
++	snprintf(buf,sizeof(buf),"%" PRIu64,imagesize);
+ 	out_xmlstr(cout,2,AF_IMAGESIZE,buf);
+ 	cout << "\n";
+     }
+@@ -212,7 +212,7 @@ int diskprint(const char *infile)
+     int64_t sectors = imagesize/sectorsize;
+     if(sectors>0){
+ 	char buf[32];
+-	snprintf(buf,sizeof(buf),"%"PRIu32"",sectorsize);
++	snprintf(buf,sizeof(buf),"%" PRIu32"",sectorsize);
+ 	out_xmlstr(cout,2,AF_SECTORSIZE,buf);
+ 	cout << "\n";
+     }
+Index: afflib-3.7.7/lib/afflib.h
+===================================================================
+--- afflib-3.7.7.orig/lib/afflib.h
++++ afflib-3.7.7/lib/afflib.h
+@@ -406,7 +406,7 @@ int af_hash_verify_seg2(AFFILE *af,const
+ #define AF_SECTORSIZE	"sectorsize"	// in bytes, stored in arg
+ #define AF_DEVICE_SECTORS "devicesectors"// stored as a 64-bit number
+ #define AF_BADFLAG      "badflag"	// data used to mark a bad sector
+-#define AF_PAGE		"page%"I64d	// segment flag indicates compression (replaces seg%d)
++#define AF_PAGE		"page%" I64d	// segment flag indicates compression (replaces seg%d)
+ #define AF_PAGE_MD5	AF_PAGE"_md5"	// md5 hash of page
+ #define AF_PAGE_SHA1	AF_PAGE"_sha1"	// sha1 hash of page
+ #define AF_PAGE_SHA256	AF_PAGE"_sha256"// sha256 hash of page
+@@ -428,7 +428,7 @@ int af_hash_verify_seg2(AFFILE *af,const
+ #define AF_BOM_SEG "affbom%d"
+ 
+ /* Deprecated terminology; pages were originally called data segments */
+-#define AF_SEG_D        "seg%"I64d	// segment flag indicates compression (deprecated)
++#define AF_SEG_D        "seg%" I64d	// segment flag indicates compression (deprecated)
+ #define AF_SEGSIZE_D	"segsize"	// segment data size (deprecated)
+ 
+ /* Bill of Materials */
+Index: afflib-3.7.7/tools/affxml.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affxml.cpp
++++ afflib-3.7.7/tools/affxml.cpp
+@@ -135,7 +135,7 @@ bool is_blank(const u_char *buf,size_t l
+ 
+ void print_xml64(const char *name,int64_t val)
+ {
+-    printf("   <%s coding='base10'>%"I64d"</%s>\n\n",name,val,name);
++    printf("   <%s coding='base10'>%" I64d"</%s>\n\n",name,val,name);
+ }
+ 
+ int xml_info(const char *infile)
+@@ -191,7 +191,7 @@ int xml_info(const char *infile)
+ 	    size_t pagesize = af_page_size(af);
+ 	    size_t sectorsize = af_get_sectorsize(af);
+ 	    if(af_get_page(af,*it,data,&pagesize)){
+-		err(1,"Can't read page %"PRId64,*it);
++		err(1,"Can't read page %" PRId64,*it);
+ 	    }
+ 	    psb.pages++;
+ 	    bool allblank = true;
+@@ -250,14 +250,14 @@ int xml_info(const char *infile)
+ 	     * The strcmp is there because early AF_IMAGESIZE segs didn't set
+ 	     * AF_SEG_QUADWORD...
+ 	     */
+-	    printf("    <%s coding='base10'>%"I64d"</%s>\n",segname,af_decode_q(data),segname);
++	    printf("    <%s coding='base10'>%" I64d"</%s>\n",segname,af_decode_q(data),segname);
+ 	    free(data);
+ 	    continue;
+ 	}
+ 
+ 	/* If datalen==0, just print the arg as an unsigned number */
+ 	if(datalen==0){
+-	    printf("    <%s coding='base10'>%"PRIu32"</%s>\n",segname,arg,segname);
++	    printf("    <%s coding='base10'>%" PRIu32"</%s>\n",segname,arg,segname);
+ 	    free(data);
+ 	    continue;
+ 	}
+@@ -265,7 +265,7 @@ int xml_info(const char *infile)
+ 	/* Just handle it as binhex ... */
+ 	printf("    <%s",segname);
+ 	if(datalen==0){
+-	    printf(" arg='%"PRIu32"' />\n",arg);
++	    printf(" arg='%" PRIu32"' />\n",arg);
+ 	    free(data);
+ 	    continue;
+ 	}
+Index: afflib-3.7.7/tools/affinfo.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affinfo.cpp
++++ afflib-3.7.7/tools/affinfo.cpp
+@@ -179,7 +179,7 @@ AFFILE *af=0;
+ void sig_info(int arg)
+ {
+     if(af==0) return;
+-    printf("Validating %"I64d" of %"I64d"\n", af->pos,af->image_size);
++    printf("Validating %" I64d" of %" I64d"\n", af->pos,af->image_size);
+ }
+ 
+ 
+@@ -417,7 +417,7 @@ void print_info(AFFILE *af,const char *s
+     memset(output_line,0,sizeof(output_line));
+ 
+     /* Now append the arg and the data len */
+-    sprintf(output_line,"%-24s %8"PRIu32"   %8d   ",segname,arg,(int)data_len);
++    sprintf(output_line,"%-24s %8" PRIu32"   %8d   ",segname,arg,(int)data_len);
+ 
+     if(opt_no_preview){
+ 	printf("%s\n",output_line);
+@@ -447,7 +447,7 @@ void print_info(AFFILE *af,const char *s
+ 	 */
+ 	switch(data_len){
+ 	case 8:
+-	    printf("%s= %"I64d" (64-bit value)\n",
++	    printf("%s= %" I64d" (64-bit value)\n",
+ 		   output_line,af_decode_q(data));
+ 	    break;
+ 	case 0:
+@@ -673,22 +673,22 @@ int info_file(const char *infile)
+ 
+ 
+     printf("\n");
+-    printf("Total segments:        %8"PRIu32"   (%"PRIu32" real)\n", total_segs,(total_segs-total_nulls));
++    printf("Total segments:        %8" PRIu32"   (%" PRIu32" real)\n", total_segs,(total_segs-total_nulls));
+     if(aes_segs){
+ 	printf("  Encrypted segments:  %8u\n",aes_segs);
+     }
+-    printf("  Page  segments:      %8"PRIu32"\n",total_pages);
+-    printf("  Hash  segments:      %8"PRIu32"\n",total_hashes);
+-    printf("  Signature segments:  %8"PRIu32"\n",total_signatures);
+-    printf("  Null segments:       %8"PRIu32"\n",total_nulls);
++    printf("  Page  segments:      %8" PRIu32"\n",total_pages);
++    printf("  Hash  segments:      %8" PRIu32"\n",total_hashes);
++    printf("  Signature segments:  %8" PRIu32"\n",total_signatures);
++    printf("  Null segments:       %8" PRIu32"\n",total_nulls);
+     if(opt_all){
+-	printf("  Empty segments:      %8"PRIu32"\n",total_nulls);
++	printf("  Empty segments:      %8" PRIu32"\n",total_nulls);
+ 	printf("\n");
+-	printf("Total data bytes in segments: %"I64d"\n",total_datalen);
++	printf("Total data bytes in segments: %" I64d"\n",total_datalen);
+ 
+ 	printf("Total space in file dedicated to segment names: %zd\n",
+ 	       total_segname_len);
+-	printf("Total overhead for %"PRIu32" segments: %zd bytes (%"PRIu32"*(%zd+%zd))\n",
++	printf("Total overhead for %" PRIu32" segments: %zd bytes (%" PRIu32"*(%zd+%zd))\n",
+ 	       total_segs,
+ 	       (size_t) total_segs*(sizeof(struct af_segment_head) +sizeof(struct af_segment_tail)),
+ 	       total_segs,
+@@ -720,7 +720,7 @@ int info_file(const char *infile)
+ 	//printf("device_bytes=%"I64d"\n",device_bytes);
+ 	//printf("device_pages=%"I64d"\n",device_pages);
+ 	if(missing_pages!=0){
+-	    printf("Missing page segments: %8"I64u"\n",missing_pages);
++	    printf("Missing page segments: %8" I64u"\n",missing_pages);
+ 	}
+ 	else {
+ 	    some_missing_pages=0;
+@@ -735,7 +735,7 @@ int info_file(const char *infile)
+ 
+     if(some_missing_pages && opt_debug){
+ 	printf("Cannot calculate missing pages\n");
+-	printf("  device_sectors=%"I64d" image_pagesize=%"PRIu32" sectorsize=%"PRIu32"\n",
++	printf("  device_sectors=%" I64d" image_pagesize=%" PRIu32" sectorsize=%" PRIu32"\n",
+ 	       device_sectors,af->image_pagesize,af->image_sectorsize);
+     }
+     af_close(af);
+@@ -756,8 +756,8 @@ void figure_media(const char *fn)
+     printf("<!DOCTYPE Server >\n");
+     printf("<device name='%s'>\n",fn);
+     printf("   <sector_size>%d</sector_size>\n",afb.sector_size);
+-    printf("   <total_sectors>%"PRId64"</total_sectors>\n",afb.total_sectors);
+-    printf("   <max_read_blocks>%"PRIu64"</max_read_blocks>\n",afb.max_read_blocks);
++    printf("   <total_sectors>%" PRId64"</total_sectors>\n",afb.total_sectors);
++    printf("   <max_read_blocks>%" PRIu64"</max_read_blocks>\n",afb.max_read_blocks);
+     printf("</device>\n");
+     close(fd);
+ }
+Index: afflib-3.7.7/tools/affsegment.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affsegment.cpp
++++ afflib-3.7.7/tools/affsegment.cpp
+@@ -230,19 +230,19 @@ void process(const char *fn)
+ 		free(buf);
+ 		continue;
+ 	    }
+-	    if(opt_debug) fprintf(stderr," arg=%"PRIu32" len=%zd\n",arg,len);
++	    if(opt_debug) fprintf(stderr," arg=%" PRIu32" len=%zd\n",arg,len);
+ 	    int p = 1;
+ 	    
+ 	    if(filecount>1) printf("%s:",fn);
+ 	    if(print_segs.size()>1) printf("%s=",segname);
+ 	    if(opt_quad && len==8){
+ 		uint64_t quad = af_decode_q(buf);
+-		printf("%"I64u"\n",quad);
++		printf("%" I64u"\n",quad);
+ 		p = 0;
+ 	    }
+ 	    
+ 	    if(opt_arg){
+-		printf("%"PRIu32"\n",arg);
++		printf("%" PRIu32"\n",arg);
+ 		p = 0;
+ 	    }
+ 	    
+Index: afflib-3.7.7/tools/affstats.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affstats.cpp
++++ afflib-3.7.7/tools/affstats.cpp
+@@ -98,7 +98,7 @@ void print_size(uint64_t s)
+ 	printf("%u",(unsigned int)(s/(1024*1024)));
+ 	return;
+     }
+-    printf("%"I64u,s);    
++    printf("%" I64u,s);    
+ }
+ 
+ void affstats_title()
+@@ -150,7 +150,7 @@ void affstats(const char *fname)
+     print_size(compressed_bytes);
+     printf("\t");
+     print_size(uncompressed_bytes);
+-    printf(" %"I64d" %"I64d,blanksectors,badsectors);
++    printf(" %" I64d" %" I64d,blanksectors,badsectors);
+     putchar('\n');
+     
+     
+Index: afflib-3.7.7/tools/affverify.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affverify.cpp
++++ afflib-3.7.7/tools/affverify.cpp
+@@ -451,7 +451,7 @@ int hash_verify(AFFILE *af)
+     printf("\n");
+     do {
+ 	double frac = (double)total_read / af_get_imagesize(af);
+-	printf("  Read %14zd/%14"PRId64" bytes; done in %s\n",
++	printf("  Read %14zd/%14" PRId64" bytes; done in %s\n",
+ 	       total_read,
+ 	       af_get_imagesize(af),
+ 	       t.eta_text(frac).c_str());
+Index: afflib-3.7.7/tools/affcat.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affcat.cpp
++++ afflib-3.7.7/tools/affcat.cpp
+@@ -61,7 +61,7 @@ void sig_info(int arg)
+ {
+     fprintf(stderr,"affcat ");
+     if(current_fname) fprintf(stderr,"%s: ",current_fname);
+-    if(current_page>=0) fprintf(stderr,"[%"PRId64"] ",current_page);
++    if(current_page>=0) fprintf(stderr,"[%" PRId64"] ",current_page);
+     fflush(stderr);
+ }
+ 
+@@ -99,12 +99,12 @@ int output_page(AFFILE *af,FILE *outfile
+     int bytes = af_read(af,buf,af->image_pagesize); // read what we can
+ 
+     if(bytes<0){
+-	if(opt_debug) fprintf(stderr,"affcat: cannot read page %"I64d"\n",pagenum);
++	if(opt_debug) fprintf(stderr,"affcat: cannot read page %" I64d"\n",pagenum);
+ 	return -1;
+     }
+ 
+     if(opt_debug){
+-	fprintf(stderr,"affcat: page:%"I64d" bytes: %d offset:%"I64d"\n",
++	fprintf(stderr,"affcat: page:%" I64d" bytes: %d offset:%" I64d"\n",
+ 		pagenum, bytes,offset);
+     }
+ 
+@@ -196,7 +196,7 @@ int affcat(AFFILE *af)
+ 	    const char *opt = opts.c_str();
+ 	    uint64_t offset=0;
+ 	    int count=0;
+-	    if(sscanf(opt,"%"I64u":%d",&offset,&count)!=2){
++	    if(sscanf(opt,"%" I64u":%d",&offset,&count)!=2){
+ 		err(1,"Cannot decode '%s'\n",opt);
+ 	    }
+ 	    af_seek(af,offset,SEEK_SET);
+@@ -227,7 +227,7 @@ int affcat(AFFILE *af)
+ 	if(opt_list){
+ 	    printf("%s",segname);
+ 	    if(opt_list_long){
+-		printf("\targ:%"PRIu32"\tlen:%d",arg,(int)datalen);
++		printf("\targ:%" PRIu32"\tlen:%d",arg,(int)datalen);
+ 	    }
+ 	    putchar('\n');
+ 	}
+@@ -270,7 +270,7 @@ int affcat(AFFILE *af)
+ 
+ 	//fprintf(stderr,"bytes written=%qd imagesize=%qd\n",total_bytes_written,imagesize);
+ 	if((total_bytes_written > imagesize) && (imagesize>0)){
+-	    err(1,"affcat internal error. bytes written=%"I64d" imagesize=%" I64d,
++	    err(1,"affcat internal error. bytes written=%" I64d" imagesize=%" I64d,
+ 		(int64_t)total_bytes_written,
+ 		(int64_t)imagesize);
+ 	    return -1;
+@@ -284,7 +284,7 @@ int64_t atoi64(const char *buf)
+ {
+     int64_t r=0;
+     char ch;
+-    if(sscanf(buf,"%"I64d"%c",&r,&ch)==1) return r;
++    if(sscanf(buf,"%" I64d"%c",&r,&ch)==1) return r;
+     fprintf(stderr,"Cannot parse '%s'\n",buf);
+     exit(0);
+ }
+Index: afflib-3.7.7/tools/affcompare.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affcompare.cpp
++++ afflib-3.7.7/tools/affcompare.cpp
+@@ -153,10 +153,10 @@ void print_sector(AFFILE *af,unsigned ch
+ void print_info(char dir,const char *segname,uint32_t arg,size_t len,
+ 		unsigned char *data,int mcr)
+ {
+-    printf("    %c %s arg=%"PRIu32" len=%d\n",dir,segname,arg,(int)len);
++    printf("    %c %s arg=%" PRIu32" len=%d\n",dir,segname,arg,(int)len);
+     printf("          ");
+     if((arg == AF_SEG_QUADWORD) && (len==8)){
+-	printf("data=%"I64d" as a 64-bit value\n",af_decode_q(data));
++	printf("data=%" I64d" as a 64-bit value\n",af_decode_q(data));
+ 	return;
+     }
+     /* Otherwise, just print some stuff... */
+@@ -290,17 +290,17 @@ int  compare_aff_data_segments(char *tit
+ 
+     /* Find the size of each page, then get the page */
+     if(af_get_page(af1,pagenum,0,&data1_len)<0)
+-	err(1,"Cannot read page %"I64d" size from %s\n",pagenum,af_filename(af1));
++	err(1,"Cannot read page %" I64d" size from %s\n",pagenum,af_filename(af1));
+     if(af_get_page(af1,pagenum,data1,&data1_len)<0)
+-	err(1,"Cannot read page %"I64d" from %s",pagenum,af_filename(af1));
++	err(1,"Cannot read page %" I64d" from %s",pagenum,af_filename(af1));
+ 
+     if(af_get_page(af2,pagenum,0,&data2_len)<0)
+-	err(1,"Cannot read page %"I64d" size from %s\n",pagenum,af_filename(af2));
++	err(1,"Cannot read page %" I64d" size from %s\n",pagenum,af_filename(af2));
+     if(af_get_page(af2,pagenum,data2,&data2_len)<0)
+-	err(1,"Cannot read page %"I64d" from %s",pagenum,af_filename(af2));
++	err(1,"Cannot read page %" I64d" from %s",pagenum,af_filename(af2));
+ 
+     if(data1_len != data2_len){
+-	printf("page %"I64d" size %d != size %d\n",pagenum,(int)data1_len,(int)data2_len);
++	printf("page %" I64d" size %d != size %d\n",pagenum,(int)data1_len,(int)data2_len);
+ 	return 1;
+     }
+ 
+@@ -341,7 +341,7 @@ int  compare_aff_data_segments(char *tit
+     outline[0] = 0;
+     if(opt_all || (no_match>0) || af1_bad || af2_bad){
+ 	snprintf(outline,sizeof(outline),
+-		"   page%"I64d" sectors:%4d  matching: %3d  different:%3d",
++		"   page%" I64d" sectors:%4d  matching: %3d  different:%3d",
+ 		pagenum,total_sectors,matching_sectors,no_match);
+     }
+     if(af1_bad){
+@@ -373,7 +373,7 @@ int  compare_aff_data_segments(char *tit
+ 	    if(i==0){
+ 		printf("\n   ");
+ 	    }
+-	    printf(" %"I64d,*j);
++	    printf(" %" I64d,*j);
+ 	    i = (i+1) % 10;
+ 	}
+ 	putchar('\n');
+@@ -391,7 +391,7 @@ int  compare_aff_data_segments(char *tit
+ 	    memcpy(b2,data1+offset,16);
+ 	    b2[15]=0;
+ 
+-	    printf("===  sector %"I64d" (offset=%d) ===\n",*j,offset);
++	    printf("===  sector %" I64d" (offset=%d) ===\n",*j,offset);
+ 	    printf("   %s:\n",af_filename(af1));
+ 	    print_sector(af1,data1+offset);
+ 	    printf("-------------------------------------\n");
+@@ -429,10 +429,10 @@ int compare_preen(AFFILE *af1,AFFILE *af
+ 	size_t len1,len2;
+ 
+ 	if(af_get_page_raw(af1,*i,&arg1,0,&len1)){
+-	    err(1,"Could not read page %"I64d" in file %s\n",*i,af_filename(af1));
++	    err(1,"Could not read page %" I64d" in file %s\n",*i,af_filename(af1));
+ 	}
+ 	if(af_get_page_raw(af2,*i,&arg2,0,&len2)){
+-	    err(1,"Page %"I64d" is in file %s but not in %s\n",*i,af_filename(af1),
++	    err(1,"Page %" I64d" is in file %s but not in %s\n",*i,af_filename(af1),
+ 		af_filename(af2));
+ 	}
+ 	if(arg1==arg2 && len1==len2){
+@@ -450,7 +450,7 @@ int compare_preen(AFFILE *af1,AFFILE *af
+ 	    continue;
+ 	}
+     }
+-    printf("%s -> %s Nochg: %d  NUL: %d  LZMA: %d  old: %"I64d" new: %"I64d" LZred: %6.2f%%\n",
++    printf("%s -> %s Nochg: %d  NUL: %d  LZMA: %d  old: %" I64d" new: %" I64d" LZred: %6.2f%%\n",
+ 	   af_filename(af1),
+ 	   af_filename(af2),
+ 	   comp_unchanged,comp_zero,comp_lzma,bytes_old,bytes_new,(bytes_old-bytes_new)*100.0/bytes_old);
+@@ -492,8 +492,8 @@ int compare_aff_aff(const char *file1,co
+     if(af1->image_pagesize != af2->image_pagesize){
+ 	fprintf(stderr,"Currently, %s requires that both images have the "
+ 		"same image datsegsize.\n"
+-		"  pagesize(%s)=%"PRIu32"\n"
+-		"  pagesize(%s)=%"PRIu32"\n",
++		"  pagesize(%s)=%" PRIu32"\n"
++		"  pagesize(%s)=%" PRIu32"\n",
+ 		progname,file1,af1->image_pagesize, file2,af2->image_pagesize);
+ 	fprintf(stderr,"Data segments will be ignored.\n");
+ 	no_data_segments = true;
+@@ -502,8 +502,8 @@ int compare_aff_aff(const char *file1,co
+     if(af1->image_sectorsize != af2->image_sectorsize){
+ 	fprintf(stderr,"Currently, %s requires that both images have the "
+ 		"same image sectorsize.\n"
+-		"  sectorsize(%s)=%"PRIu32"\n"
+-		"  sectorsize(%s)=%"PRIu32"\n",
++		"  sectorsize(%s)=%" PRIu32"\n"
++		"  sectorsize(%s)=%" PRIu32"\n",
+ 		progname,file1,af1->image_sectorsize, file2,af2->image_sectorsize);
+ 	fprintf(stderr,"Data segments will be ignored.\n");
+ 	no_data_segments = true;
+Index: afflib-3.7.7/tools/affconvert.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affconvert.cpp
++++ afflib-3.7.7/tools/affconvert.cpp
+@@ -423,15 +423,15 @@ int convert(const char *infile,char *out
+ 	    
+ 	    int64_t pagenum = *i;
+ 	    
+-	    if(!opt_quiet) printf("Converting page %"I64d" of %"I64d"\r",pagenum,highest_pagenum);fflush(stdout);
++	    if(!opt_quiet) printf("Converting page %" I64d" of %" I64d"\r",pagenum,highest_pagenum);fflush(stdout);
+ 	    
+ 	    size_t data_len = image_pagesize;
+ 	    if(af_get_page(a_in,pagenum,data,&data_len)){
+-		err(1,"af_get_page(file=%s,page=%"I64d")",
++		err(1,"af_get_page(file=%s,page=%" I64d")",
+ 		    af_filename(a_in),pagenum);
+ 	    }
+ 	    if(af_update_page(a_out,pagenum,data,data_len)){
+-		err(1,"af_update_page(file=%s,page=%"I64d")",
++		err(1,"af_update_page(file=%s,page=%" I64d")",
+ 		    af_filename(a_out),pagenum);
+ 	    }
+ 	    
+@@ -499,10 +499,10 @@ int convert(const char *infile,char *out
+ 
+     /* Finish the hash calculations and write to the db */
+     if(!opt_quiet){
+-	printf("bytes converted: %"I64d" \n",total_bytes_converted);
++	printf("bytes converted: %" I64d" \n",total_bytes_converted);
+ 	/* If the vnode implementation tracked segments written, report it. */
+ 	if(a_out->pages_written || a_out->pages_compressed){
+-	    printf("Total pages: %"I64u"  (%"I64u" compressed)\n",
++	    printf("Total pages: %" I64u"  (%" I64u" compressed)\n",
+ 		   a_out->pages_written,a_out->pages_compressed);
+ 	}
+     }
+@@ -552,7 +552,7 @@ int convert(const char *infile,char *out
+ int64_t atoi64(const char *buf)
+ {
+     int64_t r=0;
+-    sscanf(buf,"%"I64d,&r);
++    sscanf(buf,"%" I64d,&r);
+     return r;
+ }
+ 
+Index: afflib-3.7.7/tools/affix.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affix.cpp
++++ afflib-3.7.7/tools/affix.cpp
+@@ -93,7 +93,7 @@ int fix(const char *infile)
+     r = (*af->v->open)(af);
+     /* See if we can build a TOC */
+     if(r<0){
+-	printf("AFF file corrupt at %"I64d" out of %"I64d" (%"I64d" bytes from end)\n",
++	printf("AFF file corrupt at %" I64d" out of %" I64d" (%" I64d" bytes from end)\n",
+ 	       ftello(af->aseg),(int64_t)len,len-ftello(af->aseg));
+ 	if(opt_fix){
+ 	    printf("Truncating... %d \n",fileno(af->aseg));
+Index: afflib-3.7.7/lib/vnode_aff.cpp
+===================================================================
+--- afflib-3.7.7.orig/lib/vnode_aff.cpp
++++ afflib-3.7.7/lib/vnode_aff.cpp
+@@ -111,7 +111,7 @@ static int aff_write_ignore(AFFILE *af,s
+ 
+ int aff_write_seg(AFFILE *af, const char *segname,uint32_t arg,const u_char *data,size_t datalen)
+ {
+-    if(af_trace) fprintf(af_trace,"aff_write_seg(%p,%s,%"PRIu32",%p,len=%u)\n",
++    if(af_trace) fprintf(af_trace,"aff_write_seg(%p,%s,%" PRIu32",%p,len=%u)\n",
+ 			 af,segname,arg,data,(int)datalen);
+ 
+     struct af_segment_head segh;
+@@ -141,7 +141,7 @@ int aff_write_seg(AFFILE *af, const char
+     aff_toc_update(af,segname,ftello(af->aseg),datalen);
+ 
+ 
+-    if(af_trace) fprintf(af_trace,"aff_write_seg: putting segment %s (datalen=%d) offset=%"PRId64"\n",
++    if(af_trace) fprintf(af_trace,"aff_write_seg: putting segment %s (datalen=%d) offset=%" PRId64"\n",
+ 			 segname,(int)datalen,ftello(af->aseg));
+ 
+     if(fwrite(&segh,sizeof(segh),1,af->aseg)!=1) return -10;
+@@ -307,7 +307,7 @@ static int aff_get_next_seg(AFFILE *af,c
+ 	return AF_ERROR_TAIL;
+     }
+     if(stl != calculated_segment_len){
+-	snprintf(af->error_str,sizeof(af->error_str),"af_get_next_segv: AF file corrupt (%"PRIu32"!=%"PRIu32")/!",
++	snprintf(af->error_str,sizeof(af->error_str),"af_get_next_segv: AF file corrupt (%" PRIu32"!=%" PRIu32")/!",
+ 		 stl,calculated_segment_len);
+ 	fseeko(af->aseg,start,SEEK_SET); // go back to last good position
+ 	return AF_ERROR_TAIL;
+@@ -363,7 +363,7 @@ static int aff_update_seg(AFFILE *af, co
+     size_t size_needed = vallen+aff_segment_overhead(name);
+     struct aff_toc_mem *adm = aff_toc(af,name);
+ 
+-    if(af_trace) fprintf(af_trace,"aff_update_seg(name=%s,arg=%"PRIu32",vallen=%u)\n",name,arg,vallen);
++    if(af_trace) fprintf(af_trace,"aff_update_seg(name=%s,arg=%" PRIu32",vallen=%u)\n",name,arg,vallen);
+ 
+     if(adm)
+     {
+Index: afflib-3.7.7/lib/vnode_afm.cpp
+===================================================================
+--- afflib-3.7.7.orig/lib/vnode_afm.cpp
++++ afflib-3.7.7/lib/vnode_afm.cpp
+@@ -187,7 +187,7 @@ static int afm_split_raw_setup(AFFILE *a
+ 	    return -1;
+ 	}
+ 	if (af->maxsize % af->image_pagesize) {
+-	    (*af->error_reporter)("afm_split_raw_setup: maxsize (%"I64d") "
++	    (*af->error_reporter)("afm_split_raw_setup: maxsize (%" I64d") "
+ 				  "not a multiple of image_pagesize (%d)\n",
+ 				  af->maxsize,af->image_pagesize);
+ 	    return -1;
+@@ -212,7 +212,7 @@ static int afm_split_raw_setup(AFFILE *a
+      */
+     if (ap->aff->image_size && ap->aff->image_size != ap->sr->image_size) {
+ 	(*af->error_reporter)("afm_split_raw_setup: internal error. "
+-			      "AFF image_size %"I64d" != SR image_size %"I64d"\n",
++			      "AFF image_size %" I64d" != SR image_size %" I64d"\n",
+ 			      ap->aff->image_size,ap->sr->image_size);
+ 	return -1;
+     }
+@@ -225,7 +225,7 @@ static int afm_split_raw_setup(AFFILE *a
+     /* Verify that the parameters make sense */
+     if (ap->sr->maxsize != (pages_per_file * af->image_pagesize) && pages_per_file>0) {
+ 	(*af->error_reporter)("afm_split_raw_setup: %s: per size indicated by metadata (%d * %d) "
+-			      "doesn't match maxsize (%"I64d")\n",
++			      "doesn't match maxsize (%" I64d")\n",
+ 			      af_filename(af),pages_per_file,af->image_pagesize,ap->sr->maxsize);
+ 	return -1;
+     }
+Index: afflib-3.7.7/tools/affcopy.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affcopy.cpp
++++ afflib-3.7.7/tools/affcopy.cpp
+@@ -469,7 +469,7 @@ int affcopy(char *infile,vector<string>
+ 	AFFILE *af = afouts.begin()->af;
+ 	uint64_t w = af->bytes_written;
+ 	double sec = ((t1.tv_sec-t0.tv_sec)+(t1.tv_usec-t0.tv_usec)/1000000.0);
+-	printf("%s: %"I64d" bytes transferred in %.2f seconds. xfer rate: %.2f MBytes/sec\n",
++	printf("%s: %" I64d" bytes transferred in %.2f seconds. xfer rate: %.2f MBytes/sec\n",
+ 	       af_filename(af),w,sec,(w/1000000.0) / sec);
+     }
+ 	
+Index: afflib-3.7.7/lib/aff_db.cpp
+===================================================================
+--- afflib-3.7.7.orig/lib/aff_db.cpp
++++ afflib-3.7.7/lib/aff_db.cpp
+@@ -50,7 +50,7 @@ int af_probe_next_seg(AFFILE *af,
+     uint32_t name_len = ntohl(segh.name_len);
+     uint32_t datasize = ntohl(segh.data_len);
+     if(name_len>AF_MAX_NAME_LEN){
+-	snprintf(af->error_str,sizeof(af->error_str),"afflib: name_len=%"PRIu32" (an outrageous value)",name_len);
++	snprintf(af->error_str,sizeof(af->error_str),"afflib: name_len=%" PRIu32" (an outrageous value)",name_len);
+ 	return AF_ERROR_NAME;
+     }
+ 
+Index: afflib-3.7.7/lib/aff_toc.cpp
+===================================================================
+--- afflib-3.7.7.orig/lib/aff_toc.cpp
++++ afflib-3.7.7/lib/aff_toc.cpp
+@@ -29,7 +29,7 @@ void	aff_toc_print(AFFILE *af)
+     printf("AF DIRECTORY:\n");
+     for(int i=0;i<af->toc_count;i++){
+ 	if(af->toc[i].name){
+-	    printf("%-32s @%"I64u" len: %"I64u" \n",af->toc[i].name, af->toc[i].offset,af->toc[i].segment_len);
++	    printf("%-32s @%" I64u" len: %" I64u" \n",af->toc[i].name, af->toc[i].offset,af->toc[i].segment_len);
+ 	}
+     }
+ }
+Index: afflib-3.7.7/lib/afflib.cpp
+===================================================================
+--- afflib-3.7.7.orig/lib/afflib.cpp
++++ afflib-3.7.7/lib/afflib.cpp
+@@ -455,7 +455,7 @@ int af_close(AFFILE *af)
+ uint64_t af_seek(AFFILE *af,int64_t pos,int whence)
+ {
+     AF_WRLOCK(af);
+-    if(af_trace) fprintf(af_trace,"af_seek(%p,%"I64d",%d)\n",af,pos,whence);
++    if(af_trace) fprintf(af_trace,"af_seek(%p,%" I64d",%d)\n",af,pos,whence);
+     uint64_t new_pos=0;
+     switch(whence){
+     case SEEK_SET:
+@@ -788,7 +788,7 @@ int af_rewind_seg(AFFILE *af)
+ int af_update_segf(AFFILE *af, const char *segname,
+ 		  uint32_t arg,const u_char *data,uint32_t datalen,uint32_t flag)
+ {
+-    if(af_trace) fprintf(af_trace,"af_update_segf(%p,segname=%s,arg=%"PRIu32",datalen=%d)\n",
++    if(af_trace) fprintf(af_trace,"af_update_segf(%p,segname=%s,arg=%" PRIu32",datalen=%d)\n",
+ 			 af,segname,arg,datalen);
+     AF_WRLOCK(af);
+     if(af->v->update_seg==0){
+@@ -954,13 +954,13 @@ void af_stats(AFFILE *af,FILE *f)
+ {
+     AF_READLOCK(af);
+     fprintf(f,"AFSTATS for %s\n",af_filename(af));
+-    fprintf(f,"Pages read: %"I64u"\n",af->pages_read);
+-    fprintf(f,"Pages written: %"I64u"\n",af->pages_written);
+-    fprintf(f,"Pages compressed: %"I64u"\n",af->pages_compressed);
+-    fprintf(f,"Pages decompressed: %"I64u"\n",af->pages_decompressed);
+-    fprintf(f,"Cache hits: %"I64u"\n",af->cache_hits);
+-    fprintf(f,"Cache misses: %"I64u"\n",af->cache_misses);
+-    fprintf(f,"Bytes copied: %"I64u"\n",af->bytes_memcpy);
++    fprintf(f,"Pages read: %" I64u"\n",af->pages_read);
++    fprintf(f,"Pages written: %" I64u"\n",af->pages_written);
++    fprintf(f,"Pages compressed: %" I64u"\n",af->pages_compressed);
++    fprintf(f,"Pages decompressed: %" I64u"\n",af->pages_decompressed);
++    fprintf(f,"Cache hits: %" I64u"\n",af->cache_hits);
++    fprintf(f,"Cache misses: %" I64u"\n",af->cache_misses);
++    fprintf(f,"Bytes copied: %" I64u"\n",af->bytes_memcpy);
+     AF_UNLOCK(af);
+ }
+ 
+Index: afflib-3.7.7/lib/afflib_pages.cpp
+===================================================================
+--- afflib-3.7.7.orig/lib/afflib_pages.cpp
++++ afflib-3.7.7/lib/afflib_pages.cpp
+@@ -168,7 +168,7 @@ int af_get_page(AFFILE *af,int64_t pagen
+     size_t page_len=0;
+ 
+     if (af_trace){
+-	fprintf(af_trace,"af_get_page(%p,pagenum=%"I64d",buf=%p,bytes=%u)\n",af,pagenum,data,(int)*bytes);
++	fprintf(af_trace,"af_get_page(%p,pagenum=%" I64d",buf=%p,bytes=%u)\n",af,pagenum,data,(int)*bytes);
+     }
+ 
+     /* Find out the size of the segment and if it is compressed or not.
+@@ -247,17 +247,17 @@ int af_get_page(AFFILE *af,int64_t pagen
+ 	    case Z_OK:
+ 		break;
+ 	    case Z_ERRNO:
+-		(*af->error_reporter)("Z_ERRNOR decompressing segment %"I64d,pagenum);
++		(*af->error_reporter)("Z_ERRNOR decompressing segment %" I64d,pagenum);
+ 	    case Z_STREAM_ERROR:
+-		(*af->error_reporter)("Z_STREAM_ERROR decompressing segment %"I64d,pagenum);
++		(*af->error_reporter)("Z_STREAM_ERROR decompressing segment %" I64d,pagenum);
+ 	    case Z_DATA_ERROR:
+-		(*af->error_reporter)("Z_DATA_ERROR decompressing segment %"I64d,pagenum);
++		(*af->error_reporter)("Z_DATA_ERROR decompressing segment %" I64d,pagenum);
+ 	    case Z_MEM_ERROR:
+-		(*af->error_reporter)("Z_MEM_ERROR decompressing segment %"I64d,pagenum);
++		(*af->error_reporter)("Z_MEM_ERROR decompressing segment %" I64d,pagenum);
+ 	    case Z_BUF_ERROR:
+-		(*af->error_reporter)("Z_BUF_ERROR decompressing segment %"I64d,pagenum);
++		(*af->error_reporter)("Z_BUF_ERROR decompressing segment %" I64d,pagenum);
+ 	    case Z_VERSION_ERROR:
+-		(*af->error_reporter)("Z_VERSION_ERROR decompressing segment %"I64d,pagenum);
++		(*af->error_reporter)("Z_VERSION_ERROR decompressing segment %" I64d,pagenum);
+ 	    default:
+ 		(*af->error_reporter)("uncompress returned an invalid value in get_segment");
+ 	    }
+@@ -266,13 +266,13 @@ int af_get_page(AFFILE *af,int64_t pagen
+ #ifdef USE_LZMA
+ 	case AF_PAGE_COMP_ALG_LZMA:
+ 	    res = lzma_uncompress(data,bytes,compressed_data,compressed_data_len);
+-	    if (af_trace) fprintf(af_trace,"   LZMA decompressed page %"I64d". %d bytes => %u bytes\n",
++	    if (af_trace) fprintf(af_trace,"   LZMA decompressed page %" I64d". %d bytes => %u bytes\n",
+ 				  pagenum,(int)compressed_data_len,(int)*bytes);
+ 	    switch(res){
+ 	    case 0:break;		// OK
+-	    case 1:(*af->error_reporter)("LZMA header error decompressing segment %"I64d"\n",pagenum);
++	    case 1:(*af->error_reporter)("LZMA header error decompressing segment %" I64d"\n",pagenum);
+ 		break;
+-	    case 2:(*af->error_reporter)("LZMA memory error decompressing segment %"I64d"\n",pagenum);
++	    case 2:(*af->error_reporter)("LZMA memory error decompressing segment %" I64d"\n",pagenum);
+ 		break;
+ 	    }
+ 	    break;
+@@ -553,7 +553,7 @@ int af_cache_flush(AFFILE *af)
+ 		ret = -1;		// got an error; keep going, though
+ 	    }
+ 	    p->pagebuf_dirty = 0;
+-	    if(af_trace) fprintf(af_trace,"af_cache_flush: slot %d page %"PRIu64" flushed.\n",i,p->pagenum);
++	    if(af_trace) fprintf(af_trace,"af_cache_flush: slot %d page %" PRIu64" flushed.\n",i,p->pagenum);
+ 	}
+     }
+     return ret;				// now return the error that I might have gotten
+@@ -570,7 +570,7 @@ void af_cache_writethrough(AFFILE *af,in
+ 	struct aff_pagebuf *p = &af->pbcache[i];
+ 	if(p->pagenum_valid && p->pagenum == pagenum){
+ 	    if(p->pagebuf_dirty){
+-		(*af->error_reporter)("af_cache_writethrough: overwriting page %"I64u".\n",pagenum);
++		(*af->error_reporter)("af_cache_writethrough: overwriting page %" I64u".\n",pagenum);
+ 		exit(-1);		// this shouldn't happen
+ 	    }
+ 	    memcpy(p->pagebuf,buf,bufflen);
+@@ -593,7 +593,7 @@ void af_cache_writethrough(AFFILE *af,in
+ 
+ struct aff_pagebuf *af_cache_alloc(AFFILE *af,int64_t pagenum)
+ {
+-    if(af_trace) fprintf(af_trace,"af_cache_alloc(%p,%"I64d")\n",af,pagenum);
++    if(af_trace) fprintf(af_trace,"af_cache_alloc(%p,%" I64d")\n",af,pagenum);
+ 
+     /* Make sure nothing in the cache is dirty */
+     if(af_cache_flush(af) < 0)
+@@ -604,7 +604,7 @@ struct aff_pagebuf *af_cache_alloc(AFFIL
+ 	struct aff_pagebuf *p = &af->pbcache[i];
+ 	if(p->pagenum_valid && p->pagenum==pagenum){
+ 	    af->cache_hits++;
+-	    if(af_trace) fprintf(af_trace,"  page %"I64d" satisfied fromcache\n",pagenum);
++	    if(af_trace) fprintf(af_trace,"  page %" I64d" satisfied fromcache\n",pagenum);
+ 	    p->last = cachetime++;
+ 	    return p;
+ 	}
+@@ -617,7 +617,7 @@ struct aff_pagebuf *af_cache_alloc(AFFIL
+ 	struct aff_pagebuf *p = &af->pbcache[i];
+ 	if(p->pagenum_valid==0){
+ 	    slot = i;
+-	    if(af_trace) fprintf(af_trace,"  slot %d given to page %"I64d"\n",slot,pagenum);
++	    if(af_trace) fprintf(af_trace,"  slot %d given to page %" I64d"\n",slot,pagenum);
+ 	    break;
+ 	}
+     }
+@@ -632,7 +632,7 @@ struct aff_pagebuf *af_cache_alloc(AFFIL
+ 	    }
+ 	}
+ 	slot = oldest_i;
+-	if(af_trace) fprintf(af_trace,"  slot %d assigned to page %"I64d"\n",slot,pagenum);
++	if(af_trace) fprintf(af_trace,"  slot %d assigned to page %" I64d"\n",slot,pagenum);
+     }
+     /* take over this slot */
+     struct aff_pagebuf *p = &af->pbcache[slot];
+@@ -656,7 +656,7 @@ struct aff_pagebuf *af_cache_alloc(AFFIL
+     if(af_trace){
+ 	fprintf(af_trace,"   current pages in cache: ");
+ 	for(int i=0;i<af->num_pbufs;i++){
+-	    fprintf(af_trace," %"I64d,af->pbcache[i].pagenum);
++	    fprintf(af_trace," %" I64d,af->pbcache[i].pagenum);
+ 	}
+ 	fprintf(af_trace,"\n");
+     }
+Index: afflib-3.7.7/lib/afflib_stream.cpp
+===================================================================
+--- afflib-3.7.7.orig/lib/afflib_stream.cpp
++++ afflib-3.7.7/lib/afflib_stream.cpp
+@@ -29,14 +29,14 @@ int af_set_maxsize(AFFILE *af,int64_t ma
+ {
+     AF_WRLOCK(af);
+     if(af->image_size>0){
+-	(*af->error_reporter)("Cannot set maxsize as imagesize is already set (%"I64d")",af->image_size);
++	(*af->error_reporter)("Cannot set maxsize as imagesize is already set (%" I64d")",af->image_size);
+ 	AF_UNLOCK(af);
+ 	return -1;	// now allowed to set if imagesize is bigger than 0
+     }
+     if((af->image_pagesize!=0)
+        && (af->v->type & AF_VNODE_MAXSIZE_MULTIPLE)
+        && (maxsize % af->image_pagesize != 0)){
+-	(*af->error_reporter)("Cannot set maxsize to %"I64d" --- not multiple of pagesize=%d\n",
++	(*af->error_reporter)("Cannot set maxsize to %" I64d" --- not multiple of pagesize=%d\n",
+ 			      maxsize,af->image_pagesize);
+ 	AF_UNLOCK(af);
+ 	return -1;
+@@ -83,7 +83,7 @@ extern "C" ASIZE af_read(AFFILE *af,unsi
+     int total = 0;
+ 
+     AF_WRLOCK(af);			// wrlock because cache may change
+-    if (af_trace) fprintf(af_trace,"af_read(%p,%p,%d) (pos=%"I64d")\n",af,buf,(int)count,af->pos);
++    if (af_trace) fprintf(af_trace,"af_read(%p,%p,%d) (pos=%" I64d")\n",af,buf,(int)count,af->pos);
+     if (af->v->read){			// check for bypass
+ 	int r = (af->v->read)(af, buf, af->pos, count);
+ 	if(r>0) af->pos += r;
+@@ -162,7 +162,7 @@ int af_write(AFFILE *af,unsigned char *b
+ {
+     AF_WRLOCK(af);
+     if (af_trace){
+-	fprintf(af_trace,"af_write(af=%p,buf=%p,count=%d) pos=%"I64d"\n", af,buf,(int)count,af->pos);
++	fprintf(af_trace,"af_write(af=%p,buf=%p,count=%d) pos=%" I64d"\n", af,buf,(int)count,af->pos);
+     }
+     /* Invalidate caches */
+     af_invalidate_vni_cache(af);
+Index: afflib-3.7.7/lib/vnode_split_raw.cpp
+===================================================================
+--- afflib-3.7.7.orig/lib/vnode_split_raw.cpp
++++ afflib-3.7.7/lib/vnode_split_raw.cpp
+@@ -169,7 +169,7 @@ void srp_dump(AFFILE *af)
+ {
+     struct split_raw_private *srp = SPLIT_RAW_PRIVATE(af);
+     for(uint32_t i=0;i<srp->num_raw_files;i++){
+-	fprintf(stderr,"   fds[%d]=%d   pos[%d]=%"I64d"\n",i,srp->fds[i],i,srp->pos[i]);
++	fprintf(stderr,"   fds[%d]=%d   pos[%d]=%" I64d"\n",i,srp->fds[i],i,srp->pos[i]);
+     }
+     srp_validate(af);
+     fprintf(stderr,"===================\n");
+@@ -287,7 +287,7 @@ static int split_raw_open(AFFILE *af)
+ 	af->image_pagesize *= 2;
+ 
+     if ((ret == 0) && (af->maxsize % af->image_pagesize!=0)) {
+-	(*af->error_reporter)("split_raw_open: %s: raw_file_size (%"I64d" not a multiple of pagesize %lu\n",
++	(*af->error_reporter)("split_raw_open: %s: raw_file_size (%" I64d" not a multiple of pagesize %lu\n",
+ 			      af->fname, af->maxsize,af->image_pagesize);
+ 	split_raw_close (af);
+ 	return -1;
diff --git a/debian/patches/40_fix_gcc_warnings_misleading-indentation.patch b/debian/patches/40_fix_gcc_warnings_misleading-indentation.patch
new file mode 100644
index 0000000..e7ebb4f
--- /dev/null
+++ b/debian/patches/40_fix_gcc_warnings_misleading-indentation.patch
@@ -0,0 +1,49 @@
+Description: fix some GCC warnings. (warning: this clause does not guard...
+             [-Wmisleading-indentation])
+Author: Joao Eriberto Mota Filho <eriberto at debian.org>
+Last-Update: 2016-04-30
+Index: afflib-3.7.7/lzma443/C/Common/Vector.h
+===================================================================
+--- afflib-3.7.7.orig/lzma443/C/Common/Vector.h
++++ afflib-3.7.7/lzma443/C/Common/Vector.h
+@@ -176,9 +176,9 @@ public:
+   int Find(const T& item) const
+   {
+     for(int i = 0; i < Size(); i++)
+-      if (item == (*this)[i])
++      if (item == (*this)[i]){
+         return i;
+-      return -1;
++      return -1;}
+   }
+   int FindInSorted(const T& item) const
+   {
+Index: afflib-3.7.7/tools/affconvert.cpp
+===================================================================
+--- afflib-3.7.7.orig/tools/affconvert.cpp
++++ afflib-3.7.7/tools/affconvert.cpp
+@@ -423,7 +423,7 @@ int convert(const char *infile,char *out
+ 	    
+ 	    int64_t pagenum = *i;
+ 	    
+-	    if(!opt_quiet) printf("Converting page %" I64d" of %" I64d"\r",pagenum,highest_pagenum);fflush(stdout);
++	    if(!opt_quiet){ printf("Converting page %" I64d" of %" I64d"\r",pagenum,highest_pagenum);fflush(stdout); }
+ 	    
+ 	    size_t data_len = image_pagesize;
+ 	    if(af_get_page(a_in,pagenum,data,&data_len)){
+Index: afflib-3.7.7/lzma443/C/Common/String.h
+===================================================================
+--- afflib-3.7.7.orig/lzma443/C/Common/String.h
++++ afflib-3.7.7/lzma443/C/Common/String.h
+@@ -415,9 +415,9 @@ public:
+   int FindOneOf(const CStringBase &s) const
+   {
+     for(int i = 0; i < _length; i++)
+-      if (s.Find(_chars[i]) >= 0)
++      if (s.Find(_chars[i]) >= 0){
+         return i;
+-      return -1;
++      return -1;}
+   }
+ 
+   void TrimLeft(T c)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3c14a20
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+10_fix_spelling_errors_in_source_code.patch
+20_fix_spelling_in_manpage.patch
+30_fix_gcc_warnings_literal-suffix.patch
+40_fix_gcc_warnings_misleading-indentation.patch
diff --git a/debian/watch b/debian/watch
index f94f6ed..5497013 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,2 @@
-version=3
+version=4
 https://github.com/sshock/AFFLIBv3/releases .*/archive/v?(\d\S+)\.tar\.(?:bz2|gz|xz)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/afflib.git



More information about the forensics-changes mailing list