Skip to content

Commit ad26f57

Browse files
committed
updates for gcc-8
1 parent 16440f0 commit ad26f57

File tree

7 files changed

+12
-7
lines changed

7 files changed

+12
-7
lines changed

inst/NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
RcppParallel 4.4.1 (UNRELEASED)
2+
------------------------------------------------------------------------
3+
4+
* Work around warnings emitted by gcc 8
5+
16
RcppParallel 4.4.0
27
------------------------------------------------------------------------
38

inst/include/tbb/concurrent_hash_map.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ namespace interface5 {
166166

167167
//! Initialize buckets
168168
static void init_buckets( segment_ptr_t ptr, size_type sz, bool is_initial ) {
169-
if( is_initial ) std::memset(ptr, 0, sz*sizeof(bucket) );
169+
if( is_initial ) std::memset((void*) ptr, 0, sz*sizeof(bucket) );
170170
else for(size_type i = 0; i < sz; i++, ptr++) {
171171
*reinterpret_cast<intptr_t*>(&ptr->mutex) = 0;
172172
ptr->node_list = rehash_req;

src/tbb/include/tbb/concurrent_hash_map.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ namespace interface5 {
155155

156156
//! Initialize buckets
157157
static void init_buckets( segment_ptr_t ptr, size_type sz, bool is_initial ) {
158-
if( is_initial ) std::memset(ptr, 0, sz*sizeof(bucket) );
158+
if( is_initial ) std::memset((void*) ptr, 0, sz*sizeof(bucket) );
159159
else for(size_type i = 0; i < sz; i++, ptr++) {
160160
*reinterpret_cast<intptr_t*>(&ptr->mutex) = 0;
161161
ptr->node_list = rehash_req;

src/tbb/src/tbb/concurrent_queue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ concurrent_queue_base_v3::concurrent_queue_base_v3( size_t item_sz ) {
353353
__TBB_ASSERT( is_aligned(&my_rep->head_counter, NFS_GetLineSize()), "alignment error" );
354354
__TBB_ASSERT( is_aligned(&my_rep->tail_counter, NFS_GetLineSize()), "alignment error" );
355355
__TBB_ASSERT( is_aligned(&my_rep->array, NFS_GetLineSize()), "alignment error" );
356-
memset(my_rep,0,sizeof(concurrent_queue_rep));
356+
memset((void*)my_rep,0,sizeof(concurrent_queue_rep));
357357
new ( &my_rep->items_avail ) concurrent_monitor();
358358
new ( &my_rep->slots_avail ) concurrent_monitor();
359359
this->item_size = item_sz;

src/tbb/src/tbb/dynamic_link.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ OPEN_INTERNAL_NAMESPACE
373373
size_t full_len = name_len+ap_data._len;
374374
if ( full_len < len ) {
375375
strncpy( path, ap_data._path, ap_data._len );
376-
strncpy( path+ap_data._len, name, name_len );
376+
memcpy( path+ap_data._len, name, name_len );
377377
path[full_len] = 0;
378378
}
379379
return full_len;

src/tbb/src/tbb/tools_api/ittnotify_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ ITT_INLINE long __itt_interlocked_increment(volatile long* ptr)
294294
#ifdef SDL_STRNCPY_S
295295
#define __itt_fstrcpyn(s1, b, s2, l) SDL_STRNCPY_S(s1, b, s2, l)
296296
#else
297-
#define __itt_fstrcpyn(s1, b, s2, l) strncpy(s1, s2, l)
297+
#define __itt_fstrcpyn(s1, b, s2, l) memcpy(s1, s2, l)
298298
#endif /* SDL_STRNCPY_S */
299299

300300
#define __itt_fstrdup(s) strdup(s)

src/tbb/src/tbbmalloc/proxy.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,15 @@ void *__libc_realloc(void *ptr, size_t size)
231231

232232
#include <new>
233233

234-
void * operator new(size_t sz) throw (std::bad_alloc) {
234+
void * operator new(size_t sz) {
235235
void *res = scalable_malloc(sz);
236236
#if TBB_USE_EXCEPTIONS
237237
if (NULL == res)
238238
throw std::bad_alloc();
239239
#endif /* TBB_USE_EXCEPTIONS */
240240
return res;
241241
}
242-
void* operator new[](size_t sz) throw (std::bad_alloc) {
242+
void* operator new[](size_t sz) {
243243
void *res = scalable_malloc(sz);
244244
#if TBB_USE_EXCEPTIONS
245245
if (NULL == res)

0 commit comments

Comments
 (0)