Description: Fix FTBFS with GCC-15
Author: Lance Lin <lq27267@gmail.com>
Last-Update: 2025-03-27
Forwarded: not-needed

--- a/src/HMMer2/gnuregex.c
+++ b/src/HMMer2/gnuregex.c
@@ -824,13 +824,6 @@
     "Unmatched ) or \\)",			/* REG_ERPAREN */
   };
 
-/* Subroutine declarations and macros for regex_compile.  */
-
-static void store_op1 (), store_op2 ();
-static void insert_op1 (), insert_op2 ();
-static boolean at_begline_loc_p (), at_endline_loc_p ();
-static boolean group_in_compile_stack ();
-static reg_errcode_t compile_range ();
 
 /* Fetch the next character in the uncompiled pattern---translating it 
    if necessary.  Also cast from a signed character in the constant
@@ -984,6 +977,14 @@
   unsigned avail;			/* Offset of next open position.  */
 } compile_stack_type;
 
+/* Subroutine declarations and macros for regex_compile.  */
+
+static void store_op1 (re_opcode_t, unsigned char *, int), store_op2 (re_opcode_t, unsigned char *,int, int);
+static void insert_op1 (re_opcode_t, unsigned char *, int, unsigned char *), insert_op2 (re_opcode_t, unsigned char *, int, int, unsigned char *);
+static boolean at_begline_loc_p (char *, char *, reg_syntax_t), at_endline_loc_p (char *, char *, int);
+static boolean group_in_compile_stack (compile_stack_type, regnum_t);
+static reg_errcode_t compile_range (char **, char *, char *, reg_syntax_t, unsigned char *);
+
 
 #define INIT_COMPILE_STACK_SIZE 32
 
@@ -2976,12 +2977,6 @@
   return -1;
 } /* re_search_2 */
 
-/* Declarations and macros for re_match_2.  */
-
-static int bcmp_translate ();
-static boolean alt_match_null_string_p (),
-               common_op_match_null_string_p (),
-               group_match_null_string_p ();
 
 /* Structure for per-register (a.k.a. per-group) information.
    This must not be longer than one word, because we push this value
@@ -3009,6 +3004,14 @@
   } bits;
 } register_info_type;
 
+/* Declarations and macros for re_match_2.  */
+
+static int bcmp_translate (unsigned char *, unsigned char *, register int, char *);
+static boolean alt_match_null_string_p (unsigned char *, unsigned char *, register_info_type *),
+               common_op_match_null_string_p (unsigned char **, unsigned char *, register_info_type *),
+               group_match_null_string_p (unsigned char **, unsigned char *, register_info_type *);
+
+
 #define REG_MATCH_NULL_STRING_P(R)  ((R).bits.match_null_string_p)
 #define IS_ACTIVE(R)  ((R).bits.is_active)
 #define MATCHED_SOMETHING(R)  ((R).bits.matched_something)
--- a/src/dnaindex/kmer_assembly_error.dy
+++ b/src/dnaindex/kmer_assembly_error.dy
@@ -13,9 +13,9 @@
 
 boolean lift_indel_error_KmerAssembly(KmerAssemblyIndex * kai,KmerAssemblyPath * real,KmerAssemblyPath * error,long int * start_labels,int label_len,int error_position,int error_len)
 {
-  int i,j,k,true;
+  int i,j,k,true_int;
 
-  for(i=0,true=0;i<error->stack_len && true<real->stack_len;i++,true++) {
+  for(i=0,true_int=0;i<error->stack_len && true_int<real->stack_len;i++,true_int++) {
     if( i == error_position ) {
       if( error_len > 0 ) {
 	for(j=0;j<error_len;) {
@@ -25,7 +25,7 @@
       } else {
 	error_len = abs(error_len);
 	for(j=0;j<error_len;) {
-	  true++;
+	  true_int++;
 	  j++;
 	}
       }
@@ -39,10 +39,10 @@
 	remove_sequence_label_KmerAssemblyLink(error->stack[i],start_labels[k]+i);
       }
 
-      if( real->stack[true] == NULL ) {
+      if( real->stack[true_int] == NULL ) {
 	fprintf(stderr,"issue - true path is missing a link!");
       } else {
-	add_sequence_label_KmerAssemblyLink(real->stack[true],start_labels[k]+i);
+	add_sequence_label_KmerAssemblyLink(real->stack[true_int],start_labels[k]+i);
       }
       if( error->stack[i] != NULL && error->stack[i]->sequence_label_len == 0 ) {
 	detach_KmerAssemblyLink(kai,error->stack[i]);
@@ -415,7 +415,7 @@
 
 
     /* recursively call for each possible path: if any return
-       true, return TRUE */
+       true_int, return TRUE */
 
     /*    fprintf(stderr,"paths are branching, real with %d, error with %d\n",real->next->next_len,error->next->next_len);*/
 
@@ -542,7 +542,7 @@
 
 
     /* recursively call for each possible path: if any return
-       true, return TRUE */
+       true_int, return TRUE */
 
     /*    fprintf(stderr,"paths are branching, real with %d, error with %d\n",real->next->next_len,error->next->next_len);*/
 
--- a/src/models/genewisehsp.h
+++ b/src/models/genewisehsp.h
@@ -270,7 +270,7 @@
 #define show_help_GeneWiseRunPara Wise2_show_help_GeneWiseRunPara
 DPEnvelope * Wise2_DPEnvelope_from_protein_gen(Sequence * prot,Sequence * dna,CompMat * mat,CodonTable * ct,GeneWiseRunPara *p);
 #define DPEnvelope_from_protein_gen Wise2_DPEnvelope_from_protein_gen
-int Wise2_consistent_GeneWiseHSP(GeneWiseHSP * true,GeneWiseHSP * proposed);
+int Wise2_consistent_GeneWiseHSP(GeneWiseHSP * true_val,GeneWiseHSP * proposed);
 #define consistent_GeneWiseHSP Wise2_consistent_GeneWiseHSP
 int Wise2_compare_GeneWiseHSP_start(GeneWiseHSP * one,GeneWiseHSP * two);
 #define compare_GeneWiseHSP_start Wise2_compare_GeneWiseHSP_start
--- a/src/models/genewisehsp.dy
+++ b/src/models/genewisehsp.dy
@@ -288,30 +288,30 @@
 
 
 
-int consistent_GeneWiseHSP(GeneWiseHSP * true,GeneWiseHSP * proposed)
+int consistent_GeneWiseHSP(GeneWiseHSP * true_val,GeneWiseHSP * proposed)
 {
   int query_centre;
   int target_centre;
 
-  assert(true);
+  assert(true_val);
   assert(proposed);
   /* is this left or right of the true HSP */
   query_centre = (proposed->query_start + proposed->query_end) / 2;
   target_centre = (proposed->target_start + proposed->target_end) / 2;
   
   /* overlap criteria first */
-  if( query_centre >= true->query_start && query_centre <= true->query_end ) {
+  if( query_centre >= true_val->query_start && query_centre <= true_val->query_end ) {
     return 0;
   }
   
   /* left or right */
-  if( query_centre > true->query_end ) {
-    if( target_centre < true->target_end ) {
+  if( query_centre > true_val->query_end ) {
+    if( target_centre < true_val->target_end ) {
       /* no - inconsistent */
       return 0;
     }
   } else {
-    if( target_centre > true->target_start ) {
+    if( target_centre > true_val->target_start ) {
       return 0;
     }
   }
@@ -319,7 +319,7 @@
 
   /* overlap */
 
-  if( target_centre >= true->target_start && target_centre <= true->target_end ) {
+  if( target_centre >= true_val->target_start && target_centre <= true_val->target_end ) {
     return 0;
   }
 
