Hi!

Running the build on 32 bit architecutures with tests enabled (i.e.,
libcppunit available) leads to a build failure:

|/«PKGBUILDDIR»/test/unit/EncryptTest.cpp:213:76: error: invalid initialization 
of non-const reference of type 'PoDoFo::pdf_long& {aka int&}' from an rvalue of 
type 'PoDoFo::pdf_long {aka int}'
|         pEncrypt->Decrypt( pEncryptedBuffer, nOutputLen, pDecryptedBuffer, 
m_lLen );
|                                                                            
^~~~~~
|In file included from /«PKGBUILDDIR»/src/podofo-base.h:52:0,
|                 from /«PKGBUILDDIR»/src/podofo.h:47,
|                 from /«PKGBUILDDIR»/test/unit/EncryptTest.h:24,
|                 from /«PKGBUILDDIR»/test/unit/EncryptTest.cpp:21:
|/«PKGBUILDDIR»/src/base/PdfEncrypt.h:378:18: note:   initializing argument 4 
of 'virtual void PoDoFo::PdfEncrypt::Decrypt(const unsigned char*, 
PoDoFo::pdf_long, unsigned char*, PoDoFo::pdf_long&) const'
|virtual void Decrypt(const unsigned char* inStr, pdf_long inLen,
|                  ^~~~~~~
|test/unit/CMakeFiles/podofo-test.dir/build.make:185: recipe for target 
'test/unit/CMakeFiles/podofo-test.dir/EncryptTest.cpp.o' failed
|make[3]: *** [test/unit/CMakeFiles/podofo-test.dir/EncryptTest.cpp.o] Error 1

Full log:
https://buildd.debian.org/status/fetch.php?pkg=libpodofo&arch=i386&ver=0.9.5-1&stamp=1486631394&raw=0

The fix to me is pretty simple:

--- a/test/unit/EncryptTest.h
+++ b/test/unit/EncryptTest.h
@@ -87,7 +87,7 @@
 
  private:
   char* m_pEncBuffer;
-  long  m_lLen;
+  PoDoFo::pdf_long m_lLen;
   int   m_protection;
   
 };

(also attached for convenience)

Thank you!

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
Description: use the correct type for m_lLen
 pdf_long happens to be compatible with long on 64 bit architectures, but
 clashes on 32 bits.  Given that m_lLen is only used in place where pdf_long
 should be used instead, let's change the definition.
Author: Mattia Rizzolo <mat...@debian.org>
Forwarded: no
Last-Update: 2017-02-15

--- a/test/unit/EncryptTest.h
+++ b/test/unit/EncryptTest.h
@@ -87,7 +87,7 @@
 
  private:
   char* m_pEncBuffer;
-  long  m_lLen;
+  PoDoFo::pdf_long m_lLen;
   int   m_protection;
   
 };

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to