Permalink
Browse files

STY: special: clean up compiler warnings in faddeeva

  • Loading branch information...
1 parent 121f4f5 commit 6bfcfd039990c55e56b72c1e95890ad4a42ac8cd @pv committed Oct 6, 2012
Showing with 6 additions and 10 deletions.
  1. +6 −7 scipy/special/_faddeeva.cxx
  2. +0 −3 scipy/special/faddeeva_w.cxx
@@ -1,12 +1,11 @@
#include <complex>
+#include <Python.h>
+#include <math.h>
extern std::complex<double> Faddeeva_w(std::complex<double> z, double relerr);
extern "C" {
-#include <Python.h>
-#include <math.h>
-
#include "numpy/npy_math.h"
#include "numpy/ndarraytypes.h"
#include "numpy/ufuncobject.h"
@@ -56,11 +55,11 @@ static void _init_funcs(PyObject *m)
d = PyModule_GetDict(m);
f = PyUFunc_FromFuncAndData(wofz_funcs, data, types, 3, 1, 1,
- PyUFunc_None, "wofz", NULL , 0);
+ PyUFunc_None, (char*)"wofz", NULL , 0);
PyDict_SetItemString(d, "wofz", f);
Py_DECREF(f);
}
-
+
#if PY_VERSION_HEX >= 0x03000000
static PyModuleDef moduledef = {
@@ -78,7 +77,7 @@ static PyModuleDef moduledef = {
PyMODINIT_FUNC
PyInit__faddeeva()
{
- PyObject *m, *f, *d;
+ PyObject *m;
m = PyModule_Create(&moduledef);
if (!m) {
return NULL;
@@ -94,7 +93,7 @@ PyInit__faddeeva()
PyMODINIT_FUNC
init_faddeeva()
{
- PyObject *m, *f, *d;
+ PyObject *m;
m = Py_InitModule("_faddeeva", module_methods);
if (m == NULL) {
return;
@@ -292,7 +292,6 @@ static double dcsevl_(double x, const double *cs, int n)
double b0, b1, b2;
int ni;
double twox;
- double onepl;
/* DESCRIPTION */
/* Evaluate the N-term Chebyshev series CS at X. Adapted from */
@@ -327,8 +326,6 @@ static double dcsevl_(double x, const double *cs, int n)
/* Function Body */
/* FIRST EXECUTABLE STATEMENT DCSEVL */
- onepl = 1. + DBL_EPSILON;
-
b1 = 0.;
b0 = 0.;
twox = x * 2.;

0 comments on commit 6bfcfd0

Please sign in to comment.