[BiO BB] scan_for_matches

Dmitri I GOULIAEV dig at bioinformatics.org
Tue Sep 21 08:59:49 EDT 2004

Hi, Stefanie!

On Tue, Sep 21, 2004 at 10:38:28AM +0000, Stefanie Lager wrote:

> I have problems to compile the scan_for_matches pattern searching
> program on Linux (gcc 3.4.0). When I try to compile it with
> "gcc -O -o scan_for_matches  ggpunit.c scan_for_matches.c", I get
> "error:conflicting types for 'malloc'" line 17 in scan_for_matches.c and
> line 235 in ggpunit.c . Does anyone have a compiled version of
> scan_for_matches for Linux, or know how to fix the "malloc" problem?

To fix it, you will need to change the line 235 in ggpunit.c:

old: char *malloc(int ln);
new: extern void *malloc (size_t ln);

And rerun the compiler.

Hope this help,

DIG (Dmitri I GOULIAEV)            http://bioinformatics.org/~dig/
1024D/63A6C649: 26A0 E4D5 AB3F C2D4 0112  66CD 4343 C0AF 63A6 C649
-------------- next part --------------
diff -ruN ScanForMatches.O/ggpunit.c ScanForMatches.N/ggpunit.c
--- ScanForMatches.O/ggpunit.c	1997-02-20 11:10:25.000000000 -0600
+++ ScanForMatches.N/ggpunit.c	2004-09-21 07:51:15.000000000 -0500
@@ -232,7 +232,7 @@
 int cont_match PROTO((char *hits[]));
 int pattern_match PROTO((punit_t *pu,char *start,char *end,char *hits[],int first, punit_t **BR1));
 int collect_hits PROTO((struct punit *pu,char **revhits));
-char *malloc(int ln);
+extern void *malloc (size_t ln);
 /* ============================================================= */
 struct state *get_state()

More information about the BBB mailing list