Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeRDP-2.11.6 fails to compile with GCC-14: incompatible pointer types in unicode.c #10177

Open
NHOrus opened this issue May 10, 2024 · 2 comments

Comments

@NHOrus
Copy link

NHOrus commented May 10, 2024

Error:

/var/tmp/portage/net-misc/freerdp-2.11.6/work/freerdp-2.11.6/winpr/libwinpr/crt/unicode.c: In function ‘MultiByteToWideChar’:
/var/tmp/portage/net-misc/freerdp-2.11.6/work/freerdp-2.11.6/winpr/libwinpr/crt/unicode.c:218:63: error: passing argument 3 of ‘ucnv_convert’ from incompatible pointer type [-Wincompatible-pointer-types]
  218 |                             ucnv_convert("UTF-16LE", "UTF-8", targetStart, targetCapacity * sizeof(WCHAR),
      |                                                               ^~~~~~~~~~~
      |                                                               |
      |                                                               LPWSTR {aka short unsigned int *}
In file included from /var/tmp/portage/net-misc/freerdp-2.11.6/work/freerdp-2.11.6/winpr/libwinpr/crt/unicode.c:34:
/usr/include/unicode/ucnv.h:1581:20: note: expected ‘char *’ but argument is of type ‘LPWSTR’ {aka ‘short unsigned int *’}
 1581 |              char *target,
      |              ~~~~~~^~~~~~
/var/tmp/portage/net-misc/freerdp-2.11.6/work/freerdp-2.11.6/winpr/libwinpr/crt/unicode.c: In function ‘WideCharToMultiByte’:
/var/tmp/portage/net-misc/freerdp-2.11.6/work/freerdp-2.11.6/winpr/libwinpr/crt/unicode.c:356:83: error: passing argument 5 of ‘ucnv_convert’ from incompatible pointer type [-Wincompatible-pointer-types]
  356 |                         targetLength = ucnv_convert("UTF-8", "UTF-16LE", NULL, 0, lpWideCharStr,
      |                                                                                   ^~~~~~~~~~~~~
      |                                                                                   |
      |                                                                                   LPCWSTR {aka const short unsigned int *}
/usr/include/unicode/ucnv.h:1583:26: note: expected ‘const char *’ but argument is of type ‘LPCWSTR’ {aka ‘const short unsigned int *’}
 1583 |              const char *source,
      |              ~~~~~~~~~~~~^~~~~~
/var/tmp/portage/net-misc/freerdp-2.11.6/work/freerdp-2.11.6/winpr/libwinpr/crt/unicode.c:363:53: error: passing argument 5 of ‘ucnv_convert’ from incompatible pointer type [-Wincompatible-pointer-types]
  363 |                                                     lpWideCharStr, cchWideChar * sizeof(WCHAR), &error);
      |                                                     ^~~~~~~~~~~~~
      |                                                     |
      |                                                     LPCWSTR {aka const short unsigned int *}
/usr/include/unicode/ucnv.h:1583:26: note: expected ‘const char *’ but argument is of type ‘LPCWSTR’ {aka ‘const short unsigned int *’}
 1583 |              const char *source,
      |              ~~~~~~~~~~~~^~~~~~

Environment (please complete the following information):

@akallabeth
Copy link
Member

pull requests welcome, but we only fix security issues on oldstable ourselves.

@akallabeth akallabeth added this to the oldstable-2.0-next milestone May 11, 2024
@floppym
Copy link
Contributor

floppym commented May 22, 2024

Gentoo is working around this for now by passing -Wno-error=incompatible-pointer-types via CFLAGS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants