emacs-devel
[Top][All Lists]
Advanced

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

Re: ./configure --enable-check-lisp-object-type


From: Lars Ingebrigtsen
Subject: Re: ./configure --enable-check-lisp-object-type
Date: Tue, 12 Apr 2022 20:27:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> That zero corresponds to the 'Lisp_Object command_modes' member of
> Aligned_Lisp_Subr, and in a build with --enable-check-lisp-object-type
> a Lisp_Object is a struct, so it must be initialized with {0}, not
> just a scalar zero.

I can confirm that adding braces around the zero makes these warnings go
away.

There's similar warnings in alloc:

alloc.c: In function 'syms_of_alloc':
alloc.c:7838:6: warning: missing braces around initializer [-Wmissing-braces]
 7838 |      {{{ PSEUDOVECTOR_FLAG | (PVEC_SUBR << PSEUDOVECTOR_AREA_BITS) },
      |      ^
 7839 |        { .a4 = watch_gc_cons_threshold },
 7840 |        4, 4, "watch_gc_cons_threshold", {0}, 0}};
      |                                              {}

And adding braces around the zero does the trick there, too.

There's still a number of other warnings which may or may not be valid
(I haven't actually looked at them):

In file included from dbusbind.c:26:
dbusbind.c: In function 'xd_signature':
lisp.h:409:38: warning: potential null pointer dereference [-Wnull-dereference]
  409 | #define lisp_h_XCAR(c) XCONS (c)->u.s.car
      |                        ~~~~~~~~~~~~~~^~~~
lisp.h:1498:10: note: in expansion of macro 'lisp_h_XCAR'
 1498 |   return lisp_h_XCAR (c);
      |          ^~~~~~~~~~~
lisp.h:409:38: warning: potential null pointer dereference [-Wnull-dereference]
  409 | #define lisp_h_XCAR(c) XCONS (c)->u.s.car
      |                        ~~~~~~~~~~~~~~^~~~

And a some other warnings, too -- about half a dozen, I'd say.

Is the --enable-check-lisp-object-type build supposed to be without
warnings, or has that never been the ambition?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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