emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replace XChar2b with unsigned in all font backends


From: Andy Moreton
Subject: Re: Replace XChar2b with unsigned in all font backends
Date: Mon, 20 May 2019 13:05:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.50 (windows-nt)

On Mon 20 May 2019, martin rudalics wrote:

> After this commit, building master on Windows here produces
>
>   CC       w32term.o
> ../../src/w32font.c: In function 'w32font_draw':
> ../../src/w32font.c:708:25: warning: passing argument 6 of 'ExtTextOutW' from 
> incompatible pointer type [-Wincompatible-pointer-types]
>         s->char2b + from + i, 1, NULL);
>         ~~~~~~~~~~~~~~~~~^~~
> In file included from 
> C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:71,
>                  from ../../src/w32font.c:20:
> C:/msys64/mingw64/x86_64-w64-mingw32/include/wingdi.h:3347:100: note: 
> expected 'LPCWSTR' {aka 'const short unsigned int *'} but argument is of type 
> 'unsigned int *'
>    WINGDIAPI WINBOOL WINAPI ExtTextOutW(HDC hdc,int x,int y,UINT 
> options,CONST RECT *lprect,LPCWSTR lpString,UINT c,CONST INT *lpDx);
>                                                                               
>               ~~~~~~~~^~~~~~~~
> ../../src/w32font.c:711:57: warning: passing argument 6 of 'ExtTextOutW' from 
> incompatible pointer type [-Wincompatible-pointer-types]
>      ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, len, NULL);
>                                                ~~~~~~~~~~^~~~~~
> In file included from 
> C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:71,
>                  from ../../src/w32font.c:20:
> C:/msys64/mingw64/x86_64-w64-mingw32/include/wingdi.h:3347:100: note: 
> expected 'LPCWSTR' {aka 'const short unsigned int *'} but argument is of type 
> 'unsigned int *'
>    WINGDIAPI WINBOOL WINAPI ExtTextOutW(HDC hdc,int x,int y,UINT 
> options,CONST RECT *lprect,LPCWSTR lpString,UINT c,CONST INT *lpDx);
>                                                                               
>               ~~~~~~~~^~~~~~~~
>   CC       w32xfns.o
>
> and the resulting build is not usable.
>
> martin

Confirmed. This patch replaces use of XChar2b (a 16bit type) with
unsigned (usually 32bit) which seems wrong.

    AndyM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]