Skip to content

Commit 6851fe4

Browse files
committed
Fixes warning when building C extensions
1 parent 4b11d76 commit 6851fe4

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

pendulum/_extensions/_helpers.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) {
426426
int separators = 0;
427427
int time = 0;
428428
int has_time = 0;
429-
int has_hour = 0;
430429
int has_offset = 0;
431430
int i;
432431
int j;
@@ -710,7 +709,6 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) {
710709
}
711710

712711
hour = time;
713-
has_hour = 1;
714712
break;
715713
case 4:
716714
// Hours and minutes
@@ -725,7 +723,6 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) {
725723

726724
hour = time / 100;
727725
minute = time % 100;
728-
has_hour = 1;
729726
break;
730727
case 6:
731728
// Hours, minutes and seconds
@@ -740,7 +737,6 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) {
740737
hour = time / 10000;
741738
minute = time / 100 % 100;
742739
second = time % 100;
743-
has_hour = 1;
744740
break;
745741
default:
746742
// Any other case is wrong

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ def get_version():
4242
if with_extensions:
4343
extensions = [
4444
Extension('pendulum._extensions._helpers',
45-
['pendulum/_extensions/_helpers.c'],
46-
extra_compile_args=['-Wno-unused-function']),
45+
['pendulum/_extensions/_helpers.c']),
4746
]
4847

4948
class BuildFailed(Exception):

0 commit comments

Comments
 (0)