File: gcc14.patch

package info (click to toggle)
paml 4.9j%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,300 kB
  • sloc: ansic: 27,009; xml: 4,486; sh: 77; makefile: 57
file content (81 lines) | stat: -rw-r--r-- 4,145 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Description: fix incompatible pointer types with gcc 14.
 This patch fixes a number of build failures caused by incompatible
 pointer types, now fatal with gcc 14.  Typical symptom looks like:
 .
  In file included from baseml.c:131:
  treesub.c: In function ‘IdenticalSeqs’:
  In file included from codeml.c:238:
  treesub.c: In function ‘IdenticalSeqs’:
  treesub.c:1310:33: error: passing argument 3 of ‘printSeqs’ from incompatible pointer type [-Wincompatible-pointer-types]
   1310 |       printSeqs(ftmp, com.z, com.spname, com.ns, com.ls, com.npatt, com.fpatt, NULL, keep, 1);
        |                              ~~~^~~~~~~
        |                                 |
        |                                 char **
  In file included from baseml.c:11:
  paml.h:150:63: note: expected ‘unsigned char **’ but argument is of type ‘char **’
    150 | void printSeqs(FILE *fout, unsigned char *z[], unsigned char *spnames[], int ns, int ls, int npatt, double fpatt[], int *pose, char keep[], int format);
        |                                                ~~~~~~~~~~~~~~~^~~~~~~~~
  treesub.c:1310:33: error: passing argument 3 of ‘printSeqs’ from incompatible pointer type [-Wincompatible-pointer-types]
   1310 |       printSeqs(ftmp, com.z, com.spname, com.ns, com.ls, com.npatt, com.fpatt, NULL, keep, 1);
        |                              ~~~^~~~~~~
        |                                 |
        |                                 char **
 .
 Every time when a change was needed, the plain "char" type was favored
 over the "unsigned char" type.  This is to allow the compiler to set
 the optimum char signature depending on the target CPU architecture
 (e.g. signed char for x86_64, unsigned char for Aarch64).

Author: Étienne Mollier <emollier@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1075359
Forwarded: no
Last-Update: 2024-07-15
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- paml.orig/src/paml.h
+++ paml/src/paml.h
@@ -147,7 +147,7 @@
 int PickExtreme (FILE *fout, char z[], int ls, int iring, int lfrag, int ffrag[]);
 
 int print1seq (FILE*fout, unsigned char *z, int ls, int pose[]);
-void printSeqs(FILE *fout, unsigned char *z[], unsigned char *spnames[], int ns, int ls, int npatt, double fpatt[], int *pose, char keep[], int format);
+void printSeqs(FILE *fout, unsigned char *z[], char *spnames[], int ns, int ls, int npatt, double fpatt[], int *pose, char keep[], int format);
 int printPatterns(FILE *fout);
 void printSeqsMgenes (void);
 int printsma (FILE*fout, char*spname[], unsigned char*z[], int ns, int l, int lline, int gap, int seqtype, 
--- paml.orig/src/basemlg.c
+++ paml/src/basemlg.c
@@ -40,7 +40,9 @@
 int lfunG_dd (double x[], double *lnL, double dl[], double ddl[], int np);
 
 struct CommonInfo {
-   unsigned char *z[NS], *spname[NS], seqf[2048],outf[2048],treef[2048];
+   unsigned char *z[NS];
+   char *spname[NS];
+   unsigned char seqf[2048],outf[2048],treef[2048];
    int  seqtype, ns, ls, ngene, posG[NGENE+1],lgene[NGENE],*pose,npatt, readpattern;
    int  clock,fix_alpha,fix_kappa,fix_rgene,Malpha,print,verbose;
    int  model, runmode, cleandata, ndata;
--- paml.orig/src/treesub.c
+++ paml/src/treesub.c
@@ -1881,7 +1881,7 @@
    return(0);
 }
 
-void printSeqs(FILE *fout, unsigned char *z[], unsigned char *spnames[], int ns, int ls, int npatt, double fpatt[], int *pose, char keep[], int format)
+void printSeqs(FILE *fout, unsigned char *z[], char *spnames[], int ns, int ls, int npatt, double fpatt[], int *pose, char keep[], int format)
 {
    /* Print sequences into fout, using paml (format=0 or 1) or NEXUS (format=2)
       formats.
--- paml.orig/src/evolver.c
+++ paml/src/evolver.c
@@ -36,7 +36,8 @@
 
 struct CommonInfo {
    unsigned char *z[2 * NS - 1];
-   unsigned char *spname[NS], daafile[512], cleandata, readpattern;
+   char *spname[NS];
+   unsigned char daafile[512], cleandata, readpattern;
    int ns, ls, npatt, np, ntime, ncode, clock, rooted, model, icode;
    int seqtype, *pose, ncatG, NSsites;
    int ngene, lgene[1], posG[1 + 1];  /* not used */