I don't know who introduced these, but I assume it was either Ben or
Andy or Katsumi.
/xemacs/ws/dev/src/emacs.c: In function `assert_failed':
/xemacs/ws/dev/src/emacs.c:3072: warning: function declared `noreturn' has a `return' statement
/xemacs/ws/dev/src/emacs.c:3118: warning: `noreturn' function does return
/xemacs/ws/dev/src/redisplay-tty.c: In function `reset_tty_modes':
/xemacs/ws/dev/src/redisplay-tty.c:890: warning: passing arg 1 of `tty_frame_output_end' from incompatible pointer type
/xemacs/ws/dev/src/redisplay-tty.c: In function `tty_redisplay_shutdown':
/xemacs/ws/dev/src/redisplay-tty.c:917: warning: passing arg 1 of `tty_frame_output_end' from incompatible pointer type
The above looks like a crasher. Katsumi, this looks like a type error
in your patch... Please help.
/xemacs/ws/dev/src/glyphs-x.c: In function `x_finalize_image_instance':
/xemacs/ws/dev/src/glyphs-x.c:415: warning: implicit declaration of function `ungcpro_popup_callbacks'
"/net/lasker/xemacs/ws/dev/src/glyphs.c", line 1955: warning: initializer does not fit or is out of range: -1
"/net/lasker/xemacs/ws/dev/src/glyphs.c", line 1956: warning: initializer does not fit or is out of range: -1
Regarding the above, note that an unsigned int is being assigned ~0,
which will change its value. Then it might be compared with ~0, which
might not give you what you want, depending on promotion rules and
such. I strongly suggest making IMAGE_UNSPECIFIED_GEOMETRY below a
small non-negative integer. What's the justification for making it
~0???
enum image_instance_geometry
{
IMAGE_GEOMETRY,
IMAGE_DESIRED_GEOMETRY,
IMAGE_MIN_GEOMETRY,
IMAGE_MAX_GEOMETRY,
IMAGE_UNSPECIFIED_GEOMETRY = ~0
};
I further suggest that in the code that triggers this warning in glyphs.c
unsigned int dwidth = IMAGE_UNSPECIFIED_GEOMETRY,
dheight = IMAGE_UNSPECIFIED_GEOMETRY;
that this should read something like this:
enum image_instance_geometry dwidth = IMAGE_UNSPECIFIED_GEOMETRY;
enum image_instance_geometry dheight = IMAGE_UNSPECIFIED_GEOMETRY;
for type correctness. There are probably more places in the code
where such changes should be considered. grep for IMAGE_.[A-Z_]+GEOMETRY.
Martin