#22 plfreetype.c line 964 and IRIX "cc"

closed-out-of-date
nobody
None
5
2009-01-27
2004-08-04
Anonymous
No

Trying to build plfreetype.c on an SGI IRIX system
(Origin 3800, MIPSPro "cc" Version 7.30 for
IRIX 6.4:1275524910 built 04/21/99 at
alliant:/comp2/mtibuild/v73/waroot), I get the following:

cc -DHAVE_CONFIG_H -I. -I. -I.. -I../include
-I../include -I/usr/local/include/freetype2
-I../libltdl -I /usr/local/include -n32 -align64 -O2 -c
plfreetype.c -Wp,-MDupdate,.deps/plfreetype.TPlo -DPIC
-o .libs/plfreetype.o
cc-1515 cc: ERROR File = plfreetype.c, Line = 964
A value of type "int" cannot be assigned to an entity
of type "char *".

if
((FT->text_cache=(realloc(FT->text_cache,(size_t)
(FT_TEXT_CACHESZ+FT->mem_allocated)))==NULL))

Looking at the meaning of this line, I think there is a
logic
error (or a parenthesis-palcement error, which amounts
to the same thing: NULL should be compared against the
result of the realloc(), but it isn't.

I think the code at line 964 _should_ be (more readably):

if (
NULL==(FT->text_cache=(realloc(FT->text_cache,(size_t)
(FT_TEXT_CACHESZ+FT->mem_allocated) ) ) ) )
{

Carlie J. Coats, Jr. carlie.coats@baronams.com

carlie_coats@ncsu.edu
Chief Systems Architect
Environmental Modeling Center phone:
(919)515-7076
Baron Advanced Meteorological Systems fax: (919)515-7802

c/o North Carolina State University
Marine, Earth and Atmospheric Sciences Department
1125 Jordan Hall Campus Box 8208
Raleigh, NC 27695

http://www.baronams.com/staff/coats/index.html

^

Discussion

  • Andrew Ross

    Andrew Ross - 2009-01-27
    • status: open --> closed-out-of-date
     
  • Andrew Ross

    Andrew Ross - 2009-01-27

    Source code now significant changed so this particular line of code no longer exists.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks