Index: ifhp-3.5.20/src/ifhp.c Description: fix ftbfs with gcc6 Forwarded: no upstream exists anylonger =================================================================== --- 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 );