File 0002-Fix-invalid-pointer-cast-by-adding-unused-args-argum.patch of Package pothos
From 5ae94e2357959c30f6f56e1ef6fe8696bfc95bf6 Mon Sep 17 00:00:00 2001
From: Nicholas Corgan <n.corgan@gmail.com>
Date: Fri, 4 Sep 2020 18:41:48 -0500
Subject: [PATCH 2/2] Fix invalid pointer cast by adding unused args argument
to some functions
---
Pothos/ProxyEnvironmentType.cpp | 3 ++-
Pothos/ProxyType.cpp | 7 ++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/python/Pothos/ProxyEnvironmentType.cpp b/python/Pothos/ProxyEnvironmentType.cpp
index c1ee0d4..1425029 100644
--- a/python/Pothos/ProxyEnvironmentType.cpp
+++ b/python/Pothos/ProxyEnvironmentType.cpp
@@ -1,4 +1,5 @@
// Copyright (c) 2014-2014 Josh Blum
+// 2020 Nicholas Corgan
// SPDX-License-Identifier: BSL-1.0
#include "PothosModule.hpp"
@@ -78,7 +79,7 @@ static PyObject *ProxyEnvironment_findProxy(ProxyEnvironmentObject *self, PyObje
}
}
-static PyObject *ProxyEnvironment_getName(ProxyEnvironmentObject *self)
+static PyObject *ProxyEnvironment_getName(ProxyEnvironmentObject *self, PyObject *)
{
const auto name = (*self->env)->getName();
auto proxy = getPythonProxyEnv()->makeProxy(name);
diff --git a/Pothos/ProxyType.cpp b/Pothos/ProxyType.cpp
index 6c036f4..e3c7589 100644
--- a/python/Pothos/ProxyType.cpp
+++ b/python/Pothos/ProxyType.cpp
@@ -1,4 +1,5 @@
// Copyright (c) 2014-2016 Josh Blum
+// 2020 Nicholas Corgan
// SPDX-License-Identifier: BSL-1.0
#include "PothosModule.hpp"
@@ -95,7 +96,7 @@ int Proxy_setattr(PyObject *self, PyObject *attr_name, PyObject *v)
return 0;
}
-static PyObject *Proxy_convert(ProxyObject *self)
+static PyObject *Proxy_convert(ProxyObject *self, PyObject *)
{
try
{
@@ -180,12 +181,12 @@ static int Proxy_bool(ProxyObject *self)
return bool(*self->proxy)? 1 : 0;
}
-static PyObject *Proxy_getEnvironment(ProxyObject *self)
+static PyObject *Proxy_getEnvironment(ProxyObject *self, PyObject *)
{
return makeProxyEnvironmentObject(self->proxy->getEnvironment());
}
-static PyObject *Proxy_getClassName(ProxyObject *self)
+static PyObject *Proxy_getClassName(ProxyObject *self, PyObject *)
{
const auto name = self->proxy->getClassName();
auto proxy = getPythonProxyEnv()->makeProxy(name);
--
2.28.0