Skip to content

Commit 5ae94e2

Browse files
committed
Fix invalid pointer cast by adding unused args argument to some functions
1 parent 42fbce1 commit 5ae94e2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Pothos/ProxyEnvironmentType.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright (c) 2014-2014 Josh Blum
2+
// 2020 Nicholas Corgan
23
// SPDX-License-Identifier: BSL-1.0
34

45
#include "PothosModule.hpp"
@@ -78,7 +79,7 @@ static PyObject *ProxyEnvironment_findProxy(ProxyEnvironmentObject *self, PyObje
7879
}
7980
}
8081

81-
static PyObject *ProxyEnvironment_getName(ProxyEnvironmentObject *self)
82+
static PyObject *ProxyEnvironment_getName(ProxyEnvironmentObject *self, PyObject *)
8283
{
8384
const auto name = (*self->env)->getName();
8485
auto proxy = getPythonProxyEnv()->makeProxy(name);

Pothos/ProxyType.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright (c) 2014-2016 Josh Blum
2+
// 2020 Nicholas Corgan
23
// SPDX-License-Identifier: BSL-1.0
34

45
#include "PothosModule.hpp"
@@ -95,7 +96,7 @@ int Proxy_setattr(PyObject *self, PyObject *attr_name, PyObject *v)
9596
return 0;
9697
}
9798

98-
static PyObject *Proxy_convert(ProxyObject *self)
99+
static PyObject *Proxy_convert(ProxyObject *self, PyObject *)
99100
{
100101
try
101102
{
@@ -180,12 +181,12 @@ static int Proxy_bool(ProxyObject *self)
180181
return bool(*self->proxy)? 1 : 0;
181182
}
182183

183-
static PyObject *Proxy_getEnvironment(ProxyObject *self)
184+
static PyObject *Proxy_getEnvironment(ProxyObject *self, PyObject *)
184185
{
185186
return makeProxyEnvironmentObject(self->proxy->getEnvironment());
186187
}
187188

188-
static PyObject *Proxy_getClassName(ProxyObject *self)
189+
static PyObject *Proxy_getClassName(ProxyObject *self, PyObject *)
189190
{
190191
const auto name = self->proxy->getClassName();
191192
auto proxy = getPythonProxyEnv()->makeProxy(name);

0 commit comments

Comments
 (0)