Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3e11a1f

Browse filesBrowse files
committed
silence compiler warnings
1 parent 10817ac commit 3e11a1f
Copy full SHA for 3e11a1f

File tree

1 file changed

+11
-6
lines changed
Filter options

1 file changed

+11
-6
lines changed

‎inst/include/RcppParallel/Backend.h

Copy file name to clipboardExpand all lines: inst/include/RcppParallel/Backend.h
+11-6Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <cstring>
77

88
extern "C" {
9-
void REprintf(const char*, ...);
9+
void REprintf(const char*, ...);
1010
}
1111

1212
namespace RcppParallel {
@@ -33,14 +33,16 @@ inline backend_type defaultBackend()
3333

3434
#endif
3535

36-
37-
3836
inline const char* backendToString(backend_type backend)
3937
{
4038
switch (backend)
4139
{
42-
case BACKEND_TBB: return "tbb";
43-
case BACKEND_TINYTHREAD: return "tinythread";
40+
case BACKEND_TBB:
41+
return "tbb";
42+
case BACKEND_TINYTHREAD:
43+
return "tinythread";
44+
default:
45+
return "tbb";
4446
}
4547
}
4648

@@ -56,7 +58,10 @@ inline backend_type backend()
5658
#if RCPP_PARALLEL_USE_TBB
5759
return BACKEND_TBB;
5860
#else
59-
REprintf("tbb backend is not available; using tinythread instead\n");
61+
const char* msg =
62+
"tbb backend is not available; using tinythread instead";
63+
64+
REprintf("%s\n", msg);
6065
return BACKEND_TINYTHREAD;
6166
#endif
6267
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.