Re: git: 24d6c5b19f8d - 2023Q2 - deskutils/xcalendar: Fix LLVM15 build

From: Alexey Dokuchaev <danfe_at_freebsd.org>
Date: Mon, 15 May 2023 10:42:20 UTC
On Sun, May 14, 2023 at 05:25:32AM +0000, Cy Schubert wrote:
> commit 24d6c5b19f8df4220d03f7cdd8f99071bcde7360
> 
>   deskutils/xcalendar: Fix LLVM15 build
> 
>   At a minimum fix an incompatible pointer to integer conversion flagged
>   by LLVM15. While at it include stdlib.h in preparation for additional
> ...
>  +    if (sizeof(buf) == len) {
>  +      buf = XtRealloc(buf, len + 1);
>  +    }
> -+    buf[len] = NULL;
> ++    buf[len] = 0;
>  +

Since buf is `char *', I guess '\0' would look better here.

>       start = buf;
> 
> --- a/deskutils/xcalendar/files/patch-xcalendar.h
> +++ b/deskutils/xcalendar/files/patch-xcalendar.h
> @@ -1,5 +1,5 @@
> ---- xcalendar.h.orig	Sun Oct  1 12:21:42 1995
> -+++ xcalendar.h	Mon Mar 12 20:54:02 2001
> +--- xcalendar.h.orig	1995-09-30 20:21:42.000000000 -0700
> ++++ xcalendar.h	2023-04-30 21:02:14.402254000 -0700

We try not to embed nanosecond precision and timezone in patches, ``make
makepatch'' generates correct patch headers for you.

./danfe