Skip to content

SetFontPath: if ndirs is 0, skip work to make a list of directories

Alan Coopersmith requested to merge alanc/libx11:SetFPath into master

Clears warning from gcc 14.1:

SetFPath.c: In function ‘XSetFontPath’:
../include/X11/Xlibint.h:463:24: warning: argument 1 value is zero [-Walloc-zero]
  463 | # define Xmalloc(size) malloc((size_t)(size))
      |                        ^~~~~~~~~~~~~~~~~~~~~~
SetFPath.c:61:18: note: in expansion of macro ‘Xmalloc’
   61 |         if ((p = Xmalloc (nbytes))) {
      |                  ^~~~~~~

Signed-off-by: Alan Coopersmith

Merge request reports

Loading