From 833a05018485ed566754a6fba6bed31c396289d8 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Thu, 6 Jun 2024 12:05:05 +0200 Subject: [PATCH] Fix bogus invocation of _pyReturnError() in __dmidecode_xml_getsection() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the following error: src/dmidecodemodule.c: In function ‘__dmidecode_xml_getsection’: src/dmidecodemodule.c:482:90: error: passing argument 3 of ‘_pyReturnError’ makes integer from pointer without a cast [-Wint-conversion] 482 | _pyReturnError(PyExc_RuntimeError, "Invalid type id '%s' -- %s", typeid, err); | ^~~~~~ | | | --- src/dmidecodemodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dmidecodemodule.c b/src/dmidecodemodule.c index efa730b..3cdbe8e 100644 --- a/src/dmidecodemodule.c +++ b/src/dmidecodemodule.c @@ -479,7 +479,7 @@ xmlNode *__dmidecode_xml_getsection(options *opt, const char *section) { if(opt->type == -1) { char *err = log_retrieve(opt->logdata, LOG_ERR); log_clear_partial(opt->logdata, LOG_ERR, 0); - _pyReturnError(PyExc_RuntimeError, "Invalid type id '%s' -- %s", typeid, err); + _pyReturnError(PyExc_RuntimeError, NULL, 0, "Invalid type id '%s' -- %s", typeid, err); free(err); return NULL; }