mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-30 15:32:37 +08:00
[svn-r16829] Bug fix.
In Up (AIX system), the insert_libhdf5_settings() infinite looped because it never found EOF. Man getc in another system said: "If the integer value returned by getc() is stored into a variable of type char and then compared against the integer constant EOF, the com- parison may never succeed, because sign-extension of a variable of type char on widening to integer is implementation-defined." Solution: Changed inchar from type char to int fixed the problem. Morale of the story: RTFM or HTCW (heed the compiler warnings). Tested: Up (AIX 5.3).
This commit is contained in:
parent
7d55aa03a2
commit
37906de73c
@ -522,7 +522,7 @@ static void
|
||||
insert_libhdf5_settings(void)
|
||||
{
|
||||
FILE *fsettings;
|
||||
char inchar;
|
||||
int inchar;
|
||||
int bol=0; /* indicates the beginning of a new line */
|
||||
|
||||
if (NULL==(fsettings=HDfopen(LIBSETTINGSFNAME, "r"))){
|
||||
|
Loading…
Reference in New Issue
Block a user