[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] Type42 + gcc3.x: operation may be undefind
From: |
Sebastien BARRE |
Subject: |
[Devel] Type42 + gcc3.x: operation may be undefind |
Date: |
Thu, 20 Jun 2002 13:01:26 -0400 |
Hi
Here is a warning I get while compiling Freetype with gcc 3.x:
/mnt/home/mpiuser/vtknew/Utilities/freetype/src/type42/t42parse.c: In
function `t42_parse_sfnts':
/mnt/home/mpiuser/vtknew/Utilities/freetype/src/type42/t42parse.c:632:
warning: operation on `cur' may be undefined
Line 632 is:
v = (FT_Byte)( 16 * t42_hexval( *cur++ ) + t42_hexval( *cur++ ) );
We suspect that it occurs because of two cur++ on the same line/statement.
Therefore, the execution order might be undefined.
The fix is:
v = (FT_Byte)( 16 * t42_hexval( *cur ) + t42_hexval( *(cur+1) ) );
cur += 2;
provided of course that the first cur++ was the first to be executed.
Hope this helps
- [Devel] strange cmap syntax, Werner LEMBERG, 2002/06/18
- [Devel] Re: strange cmap syntax, Ken Lunde, 2002/06/18
- [Devel] Re: strange cmap syntax, Werner LEMBERG, 2002/06/18
- Re: [Devel] Re: strange cmap syntax, Anthony Fok, 2002/06/19
- Re: [Devel] Re: strange cmap syntax, Ken Lunde, 2002/06/19
- Re: [Devel] Re: strange cmap syntax, Anthony Fok, 2002/06/20
- Re: [Devel] Re: strange cmap syntax, Ken Lunde, 2002/06/20
- [Devel] Type42 + gcc3.x: operation may be undefind,
Sebastien BARRE <=
- Re: [Devel] Type42 + gcc3.x: operation may be undefind, Werner LEMBERG, 2002/06/20
- Re: [Devel] Type42 + gcc3.x: operation may be undefind, Sven Neumann, 2002/06/20
Re: [Devel] Re: strange cmap syntax, 山内 英敏, 2002/06/19