Hi,

Perl and Python outputs are still wrong - in another way. This time, it
repeats the "def" string (" => " in Perl) each time a line is indented:

raph@arche:~$ lsdvd -Op Star\ Trek\ TOS\ S1D1.iso
our %lsdvd = (
   => device => 'Star Trek TOS S1D1.iso',
 =>    => title => 'EU_109920',
 =>    => vmg_id => 'DVDVIDEO-VMG',
 =>    => provider_id => 'EU_109920',
 =>    => track => [
   =>    => {
 =>    =>    =>    => ix => 1,
 =>    =>    =>    => length => 2903.640,
 =>    =>    =>    => vts_id => 'DVDVIDEO-VTS',
 =>    =>    => },
 =>    =>    => {
 =>    =>    =>    => ix => 2,

etc, etc.

Python output has the same problem. XML output is fine.

Attached is a patch that completely replaces the old
fix_printf_FTBFS.patch found in debian/patches.

Regards,

-- 
Raphaël HALIMI
Description: add format definitions to printf's
 gcc is strict since upstream release, doesn't allow printf's without the
 format string.
Author: Laszlo Boszormenyi (GCS) <g...@debian.org>
Last-Update: 2014-04-28

---

--- a/ocode.c
+++ b/ocode.c
@@ -3,7 +3,7 @@
 /*
    Simple helper macros for generating Perl structures
 */
-#define INDENT  { int i; for(i=0; i<_lvl; i++) printf(syntax->indent); }
+#define INDENT  { int i; for(i=0; i<_lvl; i++) printf("%s", syntax->indent); }
 #define DEF DEF_
 #define ADEF ADEF_
 #define HASH HASH_
@@ -96,7 +96,7 @@
         va_start(argp, format);
         vprintf(format, argp);
         va_end(argp);
-        printf(syntax->def_sep);
+        printf("%s", syntax->def_sep);
 }
 
 static void HASH_(char *name) {
@@ -104,7 +104,7 @@
         if (name) {
                 printf((_lvl ? syntax->hash_inner : syntax->hash_outer), name);
         } else {
-                printf(syntax->hash_anon);
+                printf("%s", syntax->hash_anon);
         }
         _lvl_return[_lvl] = _lvl ? syntax->return_hash_inner : syntax->return_hash_outer;
         ++_lvl;
@@ -127,13 +127,13 @@
         va_start(argp, format);
         vprintf(format, argp);
         va_end(argp);
-        printf(syntax->adef_sep);
+        printf("%s", syntax->adef_sep);
 }
 
 static void RETURN_()  {
         _lvl--;
         INDENT;
-        printf(_lvl_return[_lvl]);
+        printf("%s", _lvl_return[_lvl]);
 }
 
 static void START_() {

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to