[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Final" version of tty child frames
From: |
Po Lu |
Subject: |
Re: "Final" version of tty child frames |
Date: |
Tue, 22 Oct 2024 19:43:27 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> martin rudalics <rudalics@gmx.at> writes:
>
>> Building complains here as
>>
>> In file included from ../../src/term.c:30:
>> ../../src/lisp.h: In function ‘Ftty_display_pixel_height’:
>> ../../src/lisp.h:406:24: warning: ‘height’ may be used uninitialized
>> [-Wmaybe-uninitialized]
>> 406 | XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0))
>> | ^
>> ../../src/term.c:4907:14: note: ‘height’ was declared here
>> 4907 | int width, height;
>> | ^~~~~~
>> ../../src/lisp.h: In function ‘Ftty_display_pixel_width’:
>> ../../src/lisp.h:406:24: warning: ‘width’ may be used uninitialized
>> [-Wmaybe-uninitialized]
>> 406 | XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0))
>> | ^
>> ../../src/term.c:4896:7: note: ‘width’ was declared here
>> 4896 | int width, height;
>> | ^~~~~
>
> That's code like this:
>
> {
> int width, height;
> tty_display_dimension (display, &width, &height);
> return make_fixnum (height);
> }
>
> So width and height are returned by the call to tty_display_dimension.
> TBH, I can't make sense of the warning. FWIW, clang doesn't complain.
> Don't know what's the usual way is to placate GCC here. What version is
> that BTW?
Insert UNINIT after the declaration of the variable affected by these
warnings. E.g.,
int height UNINIT ...
Re: "Final" version of tty child frames, Jared Finder, 2024/10/28
Re: "Final" version of tty child frames, Dr. Arne Babenhauserheide, 2024/10/22
Re: "Final" version of tty child frames, Eli Zaretskii, 2024/10/22