From e510c6ce0f05c3e06469e672a3f255d9eae9ed23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig=20=28Debian/GNU=29?= Date: Sat, 16 Mar 2024 23:32:06 +0100 Subject: Patch to use pd_error() instead of error() Closes: #1066530 --- debian/patches/error.patch | 96 ++++++++++++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 97 insertions(+) create mode 100644 debian/patches/error.patch diff --git a/debian/patches/error.patch b/debian/patches/error.patch new file mode 100644 index 0000000..ff9f601 --- /dev/null +++ b/debian/patches/error.patch @@ -0,0 +1,96 @@ +Description: replace error() with pd_error() + error() has been removed and -Werror=implicit-function-declaration leads to + FTBFS +Author: IOhannes m zmölnig +Origin: upstream +Applied-Upstream: cbddc9a4c9018a1e853dd6b116ebdd0339fcdd30 +Last-Update: 2024-03-16 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- pd-tclpd.orig/tcl_class.c ++++ pd-tclpd/tcl_class.c +@@ -105,13 +105,13 @@ + qlass = class_table_get(name); + } + if(!qlass) { +- error("tclpd: class not found: %s", name); ++ pd_error(0, "tclpd: class not found: %s", name); + return NULL; + } + + t_tcl *x = (t_tcl *)pd_new(qlass); + if(!x) { +- error("tclpd: failed to create object of class %s", name); ++ pd_error(x, "tclpd: failed to create object of class %s", name); + return NULL; + } + +--- pd-tclpd.orig/tcl_loader.c ++++ pd-tclpd/tcl_loader.c +@@ -77,7 +77,7 @@ + source_table_add(classname, filename); + verbose(0, "tclpd loader: loaded %s", filename); + } else { +- error("tclpd loader: error trying to load %s", filename); ++ pd_error(0, "tclpd loader: error trying to load %s", filename); + tclpd_interp_error(NULL, result); + return 0; + } +@@ -92,7 +92,7 @@ + result = Tcl_Eval(tclpd_interp, cmd); + if(result == TCL_OK) { + } else { +- error("tclpd loader: error in %s %s::setup", filename, classname); ++ pd_error(0, "tclpd loader: error in %s %s::setup", filename, classname); + tclpd_interp_error(NULL, result); + return 0; + } +--- pd-tclpd.orig/tcl_proxyinlet.c ++++ pd-tclpd/tcl_proxyinlet.c +@@ -23,7 +23,7 @@ + + if(!(x->argv = (t_atom *)getbytes((argc+PROXYINLET_SEL_TO_LIST) * sizeof(*x->argv)))) { + x->argc = 0; +- error("proxyinlet: getbytes: out of memory"); ++ pd_error(x, "proxyinlet: getbytes: out of memory"); + return; + } + +@@ -56,7 +56,7 @@ + y->argc = x->argc; + if(!(y->argv = (t_atom *)getbytes(y->argc * sizeof(*y->argv)))) { + y->argc = 0; +- error("proxyinlet: getbytes: out of memory"); ++ pd_error(x, "proxyinlet: getbytes: out of memory"); + return; + } + +--- pd-tclpd.orig/tclpd.c ++++ pd-tclpd/tclpd.c +@@ -29,14 +29,14 @@ + int result = Tcl_EvalFile(tclpd_interp, buf); + switch(result) { + case TCL_ERROR: +- error("tclpd: error loading %s", buf); ++ pd_error(0, "tclpd: error loading %s", buf); + break; + case TCL_RETURN: +- error("tclpd: warning: %s exited with code return", buf); ++ pd_error(0, "tclpd: warning: %s exited with code return", buf); + break; + case TCL_BREAK: + case TCL_CONTINUE: +- error("tclpd: warning: %s exited with code break/continue", buf); ++ pd_error(0, "tclpd: warning: %s exited with code break/continue", buf); + break; + } + verbose(-1, "tclpd: loaded %s", buf); +@@ -45,7 +45,7 @@ + } + + void tclpd_interp_error(t_tcl *x, int result) { +- error("tclpd error: %s", Tcl_GetStringResult(tclpd_interp)); ++ pd_error(x, "tclpd error: %s", Tcl_GetStringResult(tclpd_interp)); + + logpost(x, 3, "------------------- Tcl error: -------------------"); + diff --git a/debian/patches/series b/debian/patches/series index 60cea02..d076a3c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ +error.patch crossbuild.patch -- cgit v1.2.3