On Mon, Mar 27, 2017 at 11:40:49PM +0200, David Sommerseth wrote:
> On 25/03/17 14:17, Gert Doering wrote:
>> Hi,
>>
>> On Sat, Mar 25, 2017 at 05:21:18PM +0500, Ilya Shipitsin wrote:
>>> [src/openvpn/options.c:1163]: (warning) %x in format string (no. 1) 
>>> requires 'unsigned int *' but the argument type is 'signed int *'.
>>
>> Please use "uint8_t" then, and also adapt the "ret[i] = (uint8_t)byte"
>> line - the cast would then be obsolete.
>
> I would normally agree to use uint8_t ... but the man page for sscanf()
> on Linux says:
>
>    "Matches an unsigned hexadecimal integer; the next pointer must be a
>     pointer to unsigned int."
>
> And stdint.h declares: typedef unsigned char           uint8_t;
>
> AFAIR, char is defined as 8 bits (hence uint*8*), while unsigned int are
> 32 bits on my system.

man inttypes.h yields the necessary constant for uint8_t : SCNu8

Regards
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to