Bug#811591: Fixed FTBFS
tags 811591 patch
thanks
I've reproduced the bug by following tbm's indication, and fixed it
with the attached patch.
Greetings,
Miry
diff -ruN -x rules ifhp-3.5.20.orig/debian/changelog ifhp-3.5.20/debian/changelog
--- ifhp-3.5.20.orig/debian/changelog 2014-05-09 12:44:38.000000000 +0000
+++ ifhp-3.5.20/debian/changelog 2016-02-21 12:04:38.000000000 +0000
@@ -1,3 +1,9 @@
+ifhp (3.5.20-14) UNRELEASED; urgency=medium
+
+ * Added patch to make it buildable with GCC 6. Closes: #811591
+
+ -- Miriam Ruiz <miriam@debian.org> Sun, 21 Feb 2016 12:03:07 +0000
+
ifhp (3.5.20-13) unstable; urgency=medium
[HIGUCHI Daisuke (VDR dai)]
diff -ruN -x rules ifhp-3.5.20.orig/debian/patches/70-fix-ftbfs-gcc6.patch ifhp-3.5.20/debian/patches/70-fix-ftbfs-gcc6.patch
--- ifhp-3.5.20.orig/debian/patches/70-fix-ftbfs-gcc6.patch 1970-01-01 00:00:00.000000000 +0000
+++ ifhp-3.5.20/debian/patches/70-fix-ftbfs-gcc6.patch 2016-02-21 11:56:41.000000000 +0000
@@ -0,0 +1,128 @@
+Index: ifhp-3.5.20/src/ifhp.c
+===================================================================
+--- ifhp-3.5.20.orig/src/ifhp.c
++++ ifhp-3.5.20/src/ifhp.c
+@@ -1345,7 +1345,8 @@ void Process_job( int do_pagecount, int
+ Errorcode = JFAIL;
+ LOGERR_DIE(LOGINFO) _("Process_job: outfd dup2(%d,1) failed"), out_fd );
+ }
+- if( tempfd > 0 ) close(tempfd); tempfd = -1;
++ if( tempfd > 0 ) close(tempfd);
++ tempfd = -1;
+ close(in_fd);
+ close(out_fd);
+ End_of_job(&startpagecounter, do_pagecount, pagecount_ps,
+@@ -3379,7 +3380,8 @@ int Pjl_setvar(char *prefix, char*id, ch
+ LOGMSG(LOG_INFO)_("Pjl_setvar: WARNING - unknown type for PJL variable '%s' = '%s', %s"),
+ id, value, type_name );
+ }
+- if( working ) free( working ); working = 0;
++ if( working ) free( working );
++ working = 0;
+ } else {
+ /* we do not have constraint */
+ /* convert to ON/OFF if numerical value */
+@@ -3674,7 +3676,8 @@ void Do_sync( int sync_timeout, int sync
+ Errorcode = JFAIL;
+ FATAL(LOGINFO)"Do_sync: no sync response from printer" );
+ }
+- if( use_prog ) free( use_prog ); use_prog = 0;
++ if( use_prog ) free( use_prog );
++ use_prog = 0;
+ LOGMSG(LOG_INFO)_("Do_sync: sync done"));
+ }
+
+@@ -4000,7 +4003,8 @@ void Do_waitend( int waitend_timeout, in
+ if( Errorcode == 0 ) Errorcode = JFAIL;
+ FATAL(LOGINFO)_("Do_waitend: no end response from printer, timeout %d"), waitend_timeout );
+ }
+- if( use_prog ) free( use_prog ); use_prog = 0;
++ if( use_prog ) free( use_prog );
++ use_prog = 0;
+ LOGMSG(LOG_INFO)_("Do_waitend: %s detected %s END"), banner?_("BANNER PAGE"):_("JOB"), waitend );
+ }
+
+@@ -4654,7 +4658,8 @@ void Send_job()
+ Errorcode = JABORT;
+ LOGERR_DIE(LOGINFO) _("Make_stdin_file: dup2 failed") );
+ }
+- if( tempfd != 0 ) close(tempfd); tempfd = -1;
++ if( tempfd != 0 ) close(tempfd);
++ tempfd = -1;
+ language = 0;
+ /* if you did filtering, then reopen for the job */
+ goto again;
+@@ -5095,7 +5100,8 @@ void Make_stdin_file()
+ Errorcode = JABORT;
+ LOGERR_DIE(LOGINFO) _("Make_stdin_file: dup2 failed") );
+ }
+- if( fd != 0 ) close(fd); fd = -1;
++ if( fd != 0 ) close(fd);
++ fd = -1;
+ }
+ if( lseek(0,0,SEEK_SET) == -1 ){
+ Errorcode = JABORT;
+@@ -5761,7 +5767,8 @@ void Select_model_info( OBJ *model, OBJ
+ SNPRINTF(msg,sizeof(msg)) "Select_model_info: for '%s'", id );
+ SHORT_DUMP_OBJ(msg, model );
+ }
+- if( hash ) FREE_OBJ( hash ); hash = 0;
++ if( hash ) FREE_OBJ( hash );
++ hash = 0;
+ }
+
+ /*
+Index: ifhp-3.5.20/src/accounting.c
+===================================================================
+--- ifhp-3.5.20.orig/src/accounting.c
++++ ifhp-3.5.20/src/accounting.c
+@@ -116,7 +116,9 @@ void Do_accounting(int start, int elapse
+ Errorcode = n;
+ FATAL(LOG_INFO)_("Do_accounting: script '%s' failed"), Accounting_script);
+ }
+- if( s ) free(s); s = 0;
++ if( s ) free(s);
++ s = 0;
+ }
+- if( list ) free(list); list = 0;
++ if( list ) free(list);
++ list = 0;
+ }
+Index: ifhp-3.5.20/src/open_device.c
+===================================================================
+--- ifhp-3.5.20.orig/src/open_device.c
++++ ifhp-3.5.20/src/open_device.c
+@@ -158,7 +158,8 @@ int Link_open( char * device )
+ }
+ if( fd >= 0 ) break;
+ }
+- if( dcopy ) free(dcopy); dcopy = 0;
++ if( dcopy ) free(dcopy);
++ dcopy = 0;
+ return(fd);
+ }
+
+Index: ifhp-3.5.20/src/perlobj.c
+===================================================================
+--- ifhp-3.5.20.orig/src/perlobj.c
++++ ifhp-3.5.20/src/perlobj.c
+@@ -193,7 +193,8 @@ OBJ *Clear_OBJ( OBJ *p )
+ case OBJ_T_LIST:
+ list = p->info.array.value;
+ for( i = 0; i < p->info.array.len; ++i ){
+- if( list[i] ) safefree(list[i], MEMINFO); list[i] = 0;
++ if( list[i] ) safefree(list[i], MEMINFO);
++ list[i] = 0;
+ }
+ safefree( p->info.array.value, MEMINFO );
+ break;
+@@ -2989,7 +2990,8 @@ int Parse_obj_obj_str( OBJ **objp )
+ c = Get_parse_token(name);
+ }
+ }
+- if( name ) FREE_OBJ(name); name = 0;
++ if( name ) FREE_OBJ(name);
++ name = 0;
+ DEBUGFC(DUTILS1){SHORT_DUMP_OBJ("Parse_obj_obj_str: out", *objp ); }
+ DEBUGF(DUTILS1)("Parse_obj_obj_str: return token %s",Parse_token_to_str(c) );
+ return( c );
diff -ruN -x rules ifhp-3.5.20.orig/debian/patches/series ifhp-3.5.20/debian/patches/series
--- ifhp-3.5.20.orig/debian/patches/series 2014-05-09 12:38:15.000000000 +0000
+++ ifhp-3.5.20/debian/patches/series 2016-02-21 11:44:30.000000000 +0000
@@ -6,3 +6,4 @@
debian-changes-3.5.20-12.1
60-fix_memset_arguments.patch
61-replace_plain_write.patch
+70-fix-ftbfs-gcc6.patch
Reply to: