fix: should now compile with gcc
ci/woodpecker/pr/lint Pipeline was successful
Details
ci/woodpecker/pr/docs Pipeline was successful
Details
ci/woodpecker/pr/build Pipeline was successful
Details
ci/woodpecker/pr/docker Pipeline was successful
Details
ci/woodpecker/pr/man Pipeline was successful
Details
ci/woodpecker/pr/test Pipeline was successful
Details
ci/woodpecker/pr/lint Pipeline was successful
Details
ci/woodpecker/pr/docs Pipeline was successful
Details
ci/woodpecker/pr/build Pipeline was successful
Details
ci/woodpecker/pr/docker Pipeline was successful
Details
ci/woodpecker/pr/man Pipeline was successful
Details
ci/woodpecker/pr/test Pipeline was successful
Details
parent
433184877c
commit
58b58806f3
5
Makefile
5
Makefile
|
@ -1,6 +1,9 @@
|
|||
# =====CONFIG=====
|
||||
SRC_DIR := src
|
||||
SOURCES != find '$(SRC_DIR)' -\( -iname '*.v' -or -iname '*.h' -or -iname '*.c' -\)
|
||||
SRCS_C != find '$(SRC_DIR)' -iname '*.c'
|
||||
SRCS_H != find '$(SRC_DIR)' -iname '*.h'
|
||||
SRCS_V != find '$(SRC_DIR)' -iname '*.v'
|
||||
SOURCES := $(SRCS_C) $(SRCS_H) $(SRCS_V)
|
||||
|
||||
V_PATH ?= v
|
||||
V := $(V_PATH) -showcc -gc boehm -W -d use_openssl -skip-unused
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "expression.h"
|
||||
|
||||
const uint8_t month_days[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
|
||||
// This prefix is needed to properly compile
|
||||
const uint8_t parse_month_days[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
|
||||
|
||||
// Allowed value ranges for the minute, hour, day and month field
|
||||
const uint8_t min[4] = {0, 0, 1, 1};
|
||||
|
@ -245,7 +246,7 @@ enum cron_parse_error ce_parse_expression(cron_expression *out, char *s) {
|
|||
uint8_t max_day_value = 0;
|
||||
|
||||
for (uint8_t i = 0; i < out->month_count; i++) {
|
||||
max_day_value = MAX(max_day_value, month_days[out->months[i] - 1]);
|
||||
max_day_value = MAX(max_day_value, parse_month_days[out->months[i] - 1]);
|
||||
}
|
||||
|
||||
// Days
|
||||
|
|
Loading…
Reference in New Issue