Skip to content

Commit 5c8db6b

Browse files
committed
Fix #67 and fix compiler warnings.
1 parent dabffc6 commit 5c8db6b

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ nosetests.xml
2828

2929
# Translations
3030
*.mo
31+
32+
# Annoying MacOSX files.
33+
.DS_Store
34+
._.DS_Store

source/c_pwm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ int pwm_start(const char *key, float duty, float freq, int polarity)
201201
}
202202

203203
strncpy(new_pwm->key, key, KEYLEN); /* can leave string unterminated */
204-
new_pwm->key[KEYLEN+1] = '\0'; /* terminate string */
204+
new_pwm->key[KEYLEN] = '\0'; /* terminate string */
205205
new_pwm->period_fd = period_fd;
206206
new_pwm->duty_fd = duty_fd;
207207
new_pwm->polarity_fd = polarity_fd;

source/py_adc.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@ SOFTWARE.
2626
#include "common.h"
2727
#include "c_adc.h"
2828

29+
// Cleanup function commented out because it is currently disabled and this
30+
// generates unused method warnings. See adc_methods[] definition further
31+
// below for reason for disabling the cleanup function.
2932
// python function cleanup()
30-
static PyObject *py_cleanup(PyObject *self, PyObject *args)
31-
{
32-
// unexport the ADC
33-
adc_cleanup();
34-
35-
Py_RETURN_NONE;
36-
}
33+
//static PyObject *py_cleanup(PyObject *self, PyObject *args)
34+
//{
35+
// // unexport the ADC
36+
// adc_cleanup();
37+
//
38+
// Py_RETURN_NONE;
39+
//}
3740

3841
// python function setup()
3942
static PyObject *py_setup_adc(PyObject *self, PyObject *args)

source/py_gpio.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ SOFTWARE.
3333
#include "common.h"
3434
#include "event_gpio.h"
3535

36-
static PyObject *bb_revision;
3736
static int gpio_warnings = 1;
3837

3938
struct py_callback

0 commit comments

Comments
 (0)