Download raw body.
[llvm22] databases/pgtcl: add missing casts
Committed, thanks!
I see what you mean about "follow the style". :)
Stu
On Tue, 16 Jun 2026, Christian Weisgerber wrote:
> The diff below fixes the build of databases/pgtcl with LLVM 22.
> Add casts to the argument of a free()-style function that takes a
> char* argument; follow the style of the respective source file.
>
> No bump as I don't see how this would change the generated code.
>
> OK?
>
> -----------------------------------------------
> commit 7104d224f0aa2d78078d2c6e1fe38eba5c132c20 (mystuff)
> from: Christian Weisgerber <naddy@mips.inka.de>
> date: Tue Jun 16 21:36:54 2026 UTC
>
> databases/pgtcl: add missing casts pointed out by llvm22
>
> diff 7d1c16abdddd8658456f0ce5d5db313ba8439d59 7104d224f0aa2d78078d2c6e1fe38eba5c132c20
> commit - 7d1c16abdddd8658456f0ce5d5db313ba8439d59
> commit + 7104d224f0aa2d78078d2c6e1fe38eba5c132c20
> blob - /dev/null
> blob + 6c526ab7897acaf04e9059389f6d4799ebedf9ad (mode 644)
> --- /dev/null
> +++ databases/pgtcl/patches/patch-generic_pgtclCmds_c
> @@ -0,0 +1,14 @@
> +Index: generic/pgtclCmds.c
> +--- generic/pgtclCmds.c.orig
> ++++ generic/pgtclCmds.c
> +@@ -572,8 +572,8 @@ int build_param_array(Tcl_Interp *interp, int nParams,
> + }
> +
> + if (array_to_utf8(interp, paramValues, paramLengths, nParams, bufferPtr) != TCL_OK) {
> +- ckfree(paramValues);
> +- ckfree(paramLengths);
> ++ ckfree((void *)paramValues);
> ++ ckfree((void *)paramLengths);
> + return TCL_ERROR;
> + }
> +
> blob - /dev/null
> blob + 4c6378434563cc755a298603b3a5584ffe602233 (mode 644)
> --- /dev/null
> +++ databases/pgtcl/patches/patch-generic_tokenize_c
> @@ -0,0 +1,12 @@
> +Index: generic/tokenize.c
> +--- generic/tokenize.c.orig
> ++++ generic/tokenize.c
> +@@ -533,7 +533,7 @@ int handle_substitutions(Tcl_Interp *interp, const cha
> + result = array_to_utf8(interp, replacementArray, lengthArray, nextVarIndex, bufferPtr);
> +
> + cleanup_and_exit:
> +- if(lengthArray) ckfree(lengthArray);
> ++ if(lengthArray) ckfree((char *)lengthArray);
> +
> + if(result == TCL_OK) {
> + *newSqlPtr = newSql;
>
> --
> Christian "naddy" Weisgerber naddy@mips.inka.de
>
>
[llvm22] databases/pgtcl: add missing casts