Hello Olivier, hello Dominik, hello all, > Olivier Mascia <o...@integral.be> has written on 8 February 2018 at 12:51: > > > PdfString::ConvertUTF8toUTF16 has this sequence of code with a comment > from 'RG' about compiler complaining about unreachable code: > > } else if (ch > UNI_MAX_UTF16) { > if (eConversion == ePdfStringConversion_Strict) { > PODOFO_RAISE_ERROR( ePdfError_InvalidDataType ); > > //RG: TODO My compiler says that this is unreachable code! > > source -= (extraBytesToRead+1); /* return to the start */ > break; /* Bail out; shouldn't continue */ > } else { > *target++ = UNI_REPLACEMENT_CHAR; > } > } else { > > It only is because PODOFO_RAISE_ERROR is actually "throw ::PoDoFo::PdfError". > The code after that is actually unreachable, because of the throw. I haven't > yet get deeper to understand what was the real intent here. If someone is > familiar with that method implementation, he/she'll know what to do right.
this code is AFAIK to be removed because of a copyright problem (it's license seems non-free, of course IANAL), in svn trunk there is replacement code for the case libunistring is available, for testing. If it tests out well, it can replace the old code AIUI for the 0.9.6 release and beyond. I'm thankful to the project leader Dominik Seichter for having implemented the replacement. > > -- > Best Regards, Meilleures salutations, Met vriendelijke groeten, > Olivier Mascia Best regards, mabri ------------------------------------------------------------------------------ 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