On Saturday 03 May 2008 19:00, Sam Clemens wrote:
...
endptr is uninitialized, so it's pointing at some random memory location.
While it's true that the declaration of endptr leaves it uninitialized, that is not the problem. Strtof's second argument is **char. Strtof stores into this pointer (to a pointer to char) the pointer to the first character that was not used in translating the string into a float value. Calling strtof() with &endptr as its second argument is correct. Thus this is not the source of the problem. It is rather, as Anders states, that the compiler had not been told anything about strtof(), and called in the old, old C default way (as if it returns an int ... what else?).
...
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org