Skip to content

Commit

Permalink
Fix invalid pointer cast by adding unused args argument to some funct…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
ncorgan committed Sep 4, 2020
1 parent 42fbce1 commit 5ae94e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Pothos/ProxyEnvironmentType.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) 2014-2014 Josh Blum
// 2020 Nicholas Corgan
// SPDX-License-Identifier: BSL-1.0

#include "PothosModule.hpp"
Expand Down Expand Up @@ -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);
Expand Down
7 changes: 4 additions & 3 deletions Pothos/ProxyType.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) 2014-2016 Josh Blum
// 2020 Nicholas Corgan
// SPDX-License-Identifier: BSL-1.0

#include "PothosModule.hpp"
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5ae94e2

Please sign in to comment.