Hi,

On Mon, Mar 27, 2017 at 11:40:49PM +0200, David Sommerseth wrote:
> > 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.

Yeah, you're right.  I confused this discussion with our standard
"char vs. signed char vs. unsigned char" warning.

(See how dangerous "fixing compiler warnings" is?  :-) )

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             g...@greenie.muc.de
fax: +49-89-35655025                        g...@net.informatik.tu-muenchen.de

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