Skip to content

Commit d9159a5

Browse files
committed
fix compiler notes
1 parent 75d8fd3 commit d9159a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/frollR.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ SEXP frollfunR(SEXP fun, SEXP xobj, SEXP kobj, SEXP fill, SEXP algo, SEXP align,
150150
dx[i] = REAL(VECTOR_ELT(x, i)); // assign source columns to C pointers
151151
}
152152

153-
rollfun_t rfun; // adding fun needs to be here and data.table.h
153+
rollfun_t rfun = MEAN; // adding fun needs to be here and data.table.h, initialize to keep compiler happy
154154
if (!strcmp(CHAR(STRING_ELT(fun, 0)), "mean")) {
155155
rfun = MEAN;
156156
} else if (!strcmp(CHAR(STRING_ELT(fun, 0)), "sum")) {

0 commit comments

Comments
 (0)