Re: Question about hexToInt()

2010-12-23 Thread Stephan Witt
Am 22.12.2010 um 21:44 schrieb Bernhard Roider: > But if you want to avoid the warning you can use an unsigned for scanf and do > a type cast to int Yes, one can do that. The problem I have with it isn't the warning. The compiler warning was a hint to think about that piece of code. The only

Re: Question about hexToInt()

2010-12-22 Thread Bernhard Roider
But if you want to avoid the warning you can use an unsigned for scanf and do a type cast to int

Re: Question about hexToInt()

2010-12-21 Thread Stephan Witt
Am 22.12.2010 um 01:59 schrieb Pavel Sanda: > Stephan Witt wrote: >> When in pedantic mode the compiler issues a warning for hexToInt() in >> src/support/lstrings.cpp. >> It doesn't like passing an integer to sscanf when format is "%x" - this is >> for conversion of a pointer. > > unless it fix

Re: Question about hexToInt()

2010-12-21 Thread Pavel Sanda
Stephan Witt wrote: > When in pedantic mode the compiler issues a warning for hexToInt() in > src/support/lstrings.cpp. > It doesn't like passing an integer to sscanf when format is "%x" - this is > for conversion of a pointer. unless it fixes some particular bug, another 2.1 candidate... > The

Re: Question about hexToInt()

2010-12-21 Thread Stephan Witt
Am 21.12.2010 um 18:00 schrieb Bernhard Roider: > Just a guess: Does unsignd int work with scanf? Yes, of course. % man sscanf ... The following conversions are available: ... x, X Matches an optionally signed hexadecimal integer; the next pointer must be a pointer to unsigned int. .

Re: Question about hexToInt()

2010-12-21 Thread Bernhard Roider
Just a guess: Does unsignd int work with scanf?