Skip to content

Commit a940911

Browse files
committed
Initialize the err SEXP
This generates warnings on some compilers otherwise. It also seems safer
1 parent 894f410 commit a940911

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

inst/include/cpp11/declarations.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ T& unmove(T&& t) {
2727
} while (false);
2828
#endif
2929

30-
#define BEGIN_CPP11 \
31-
SEXP err; \
32-
char buf[8192]; \
33-
buf[0] = '\0'; \
30+
#define BEGIN_CPP11 \
31+
SEXP err = R_NilValue; \
32+
char buf[8192]; \
33+
buf[0] = '\0'; \
3434
try {
3535
#define END_CPP11 \
3636
} \

0 commit comments

Comments
 (0)