Skip to content

Commit 40af94a

Browse files
committed
Fix unused-but-set-variable warnings in timelib
1 parent 6b160e7 commit 40af94a

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

ext/date/lib/parse_date.c

-2
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,6 @@ static timelib_sll timelib_get_frac_nr(const char **ptr)
522522
const char *begin, *end;
523523
char *str;
524524
double tmp_nr = TIMELIB_UNSET;
525-
int len = 0;
526525

527526
while ((**ptr != '.') && (**ptr != ':') && ((**ptr < '0') || (**ptr > '9'))) {
528527
if (**ptr == '\0') {
@@ -533,7 +532,6 @@ static timelib_sll timelib_get_frac_nr(const char **ptr)
533532
begin = *ptr;
534533
while ((**ptr == '.') || (**ptr == ':') || ((**ptr >= '0') && (**ptr <= '9'))) {
535534
++*ptr;
536-
++len;
537535
}
538536
end = *ptr;
539537
str = timelib_calloc(1, end - begin);

ext/date/lib/parse_date.re

-2
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,6 @@ static timelib_sll timelib_get_frac_nr(const char **ptr)
520520
const char *begin, *end;
521521
char *str;
522522
double tmp_nr = TIMELIB_UNSET;
523-
int len = 0;
524523

525524
while ((**ptr != '.') && (**ptr != ':') && ((**ptr < '0') || (**ptr > '9'))) {
526525
if (**ptr == '\0') {
@@ -531,7 +530,6 @@ static timelib_sll timelib_get_frac_nr(const char **ptr)
531530
begin = *ptr;
532531
while ((**ptr == '.') || (**ptr == ':') || ((**ptr >= '0') && (**ptr <= '9'))) {
533532
++*ptr;
534-
++len;
535533
}
536534
end = *ptr;
537535
str = timelib_calloc(1, end - begin);

0 commit comments

Comments
 (0)