[gnutls-devel] Building a MinGW port of GnuTLS 3.4.15
Eli Zaretskii
eliz at gnu.org
Wed Oct 5 09:34:07 CEST 2016
> From: Nikos Mavrogiannopoulos <nmav at gnutls.org>
> Date: Wed, 5 Oct 2016 08:50:19 +0200
> Cc: GnuTLS development list <gnutls-devel at lists.gnutls.org>
>
> > . mismatch in signedness between prototype and actual arguments
>
> If that's on the main library code, I'd appreciate pointing them.
Here's the full list of these warnings for files under lib/
misc.c:170:24: warning: pointer targets in passing argument 2 of 'GetTempPathA' differ in signedness [-Wpointer-sign]
if (!GetTempPath(464, buf))
^
In file included from d:\usr\include\windows.h:50:0,
from d:\usr\include\winsock2.h:22,
from d:\usr\include\ws2tcpip.h:19,
from ./../gnutls_int.h:57,
from ./opencdk.h:27,
from misc.c:31:
d:\usr\include\winbase.h:1748:25: note: expected 'LPSTR {aka char *}' but argument is of type 'unsigned char *'
WINBASEAPI DWORD WINAPI GetTempPathA(DWORD,LPSTR);
^
misc.c:172:18: warning: pointer targets in passing argument 1 of '_gnutls_str_cat' differ in signedness [-Wpointer-sign]
_gnutls_str_cat(buf, sizeof(buf), "_cdk_");
^
In file included from ./../gnutls_int.h:242:0,
from ./opencdk.h:27,
from misc.c:31:
./../gnutls_str.h:42:6: note: expected 'char *' but argument is of type 'unsigned char *'
void _gnutls_str_cat(char *dest, size_t dest_tot_size, const char *src);
^
misc.c:173:18: warning: pointer targets in passing argument 1 of '_gnutls_str_cat' differ in signedness [-Wpointer-sign]
_gnutls_str_cat(buf, sizeof(buf), rnd);
^
In file included from ./../gnutls_int.h:242:0,
from ./opencdk.h:27,
from misc.c:31:
./../gnutls_str.h:42:6: note: expected 'char *' but argument is of type 'unsigned char *'
void _gnutls_str_cat(char *dest, size_t dest_tot_size, const char *src);
^
misc.c:173:36: warning: pointer targets in passing argument 3 of '_gnutls_str_cat' differ in signedness [-Wpointer-sign]
_gnutls_str_cat(buf, sizeof(buf), rnd);
^
^
In file included from ./../gnutls_int.h:242:0,
from ./opencdk.h:27,
from misc.c:31:
./../gnutls_str.h:42:6: note: expected 'const char *' but argument is of type 'unsigned char *'
void _gnutls_str_cat(char *dest, size_t dest_tot_size, const char *src);
^
misc.c:176:13: warning: pointer targets in passing argument 1 of '_open' differ in signedness [-Wpointer-sign]
fd = _open(buf, _O_CREAT | _O_EXCL | _O_TEMPORARY |
^
In file included from ./../../gl/sys/stat.h:373:0,
from misc.c:29:
d:\usr\include\io.h:365:37: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP int __cdecl __MINGW_NOTHROW _open (const char*, int, ...);
^
I fixed the above by declaring buf[] and dst[] 'char', not 'unsigned char'.
CC system.lo
system.c:664:15: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
output->data = dst;
^
I fixed this by a type cast.
More information about the Gnutls-devel
mailing list